When using the REST API to add or update SMS consent for contacts, the call will fail if any of the required fields are missing or incorrect. The most common cause of errors is an invalid Qualifier ID.
Required fields for the Channel Consent API
Every API call to get or update consent must include all four of the following fields:
- Database ID
- Channel
- Qualifier
- Destination
API endpoints
- Get Consent Value: Retrieves the consent value for a given database, channel, qualifier, and destination. Use the Channel Consent API - GET endpoint.
- Update Consent Value: Updates the consent value for a given database, channel, qualifier, and destination. Use the Channel Consent API - PUT endpoint.
How to find the correct Qualifier ID
The Qualifier ID represents the Text-to-Join program. Many API errors occur because an invalid Qualifier ID is used. The correct Qualifier ID is the Campaign ID of the SMS campaign for which you want to apply consent.
- Navigate to SMS and Group Message.
- Click Campaign.
- Select the campaign for which you want to add consent.
- Copy the Campaign ID — this is the valid Qualifier ID to use in your API call.
Still getting errors?
If the issue persists after confirming the Qualifier ID, verify the following values are also correct in your API call:
- Database ID: Confirm you are referencing the correct database for the contact.
- Channel: Ensure the channel type matches the consent you are trying to set (e.g., SMS).
- Destination: Verify the destination value (mobile number) is correctly formatted and matches the contact record.