Updates the consent status of the messaging end user for the specified conversation channel.
This API applies to the following product:
- Bring Your Own Channel for Contact Center as a Service
This API is available in version 62.0 and later.
URI
v1/consent
HTTP Method
PATCH
Headers
Authorization (User-Level Authentication)
Format: Bearer <Salesforce Access Token>
String. Standard header. Used to authenticate the user, where <Salesforce Access Token> is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required.
Content-Type
Format: application/json
String. Standard header. Format of the request payload. Required for any request that includes a body.
OrgId
Format: <Salesforce Org ID>
String. Custom header. The Salesforce org. <Salesforce Org ID> is the 15-character Org ID of the Salesforce org. Required.
RequestId
Format: <UUID>
String. Custom header. Universally Unique Identifier (<UUID>) that references and tracks this request. Required.
AuthorizationContext
Format: <AuthorizationContext>
String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes.
- For Bring Your Own Channel for CCaaS, set
<AuthorizationContext>to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required.
Sample Header
-H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \
-H "content-type: application/json" \
-H "OrgId: 00DSG000009SWby" \
-H "AuthorizationContext: Partner1_ChannelDefinition1" \
-H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \
Parameters
| Property Name | Type | Description | Required |
|---|---|---|---|
| endUserClientId | string | The end user client identifier. This value comes from the partner system and can be up to 240 characters long. | Yes |
| channelAddressIdentifier | string | The globally unique ID for the conversation channel. This value comes from the MessagingChannel.channelAddressIdentifier standard object field. |
Yes |
| consentStatus | The end user’s consent status. Valid values include: <br>-ImplicitlyOptedIn - Sending the company a message automatically indicates the end user’s consent to receive messages from this channel. <br>- ExplicitlyOptedIn - The end user explicitly consents to receive messages from this channel. <br>-DoublyOptedIn - The end user explicitly consents to receive messages from this channel, and then confirms their consent. <br>- OptedOut - The end user sends a keyword, such as STOP, to opt out of receiving messages. | Yes |
Example
{
"endUserClientId" : "end-user-0001",
"channelAddressIdentifier" : "a12bc345-1303-44c2-866c-f30d546b58de",
"consentStatus" : "ExplicitlyOptedIn"
}
See Also
- GitHub: Interaction Service APIs