---
schema_version: "1"
id: d4791ed767918211b9123bfa2f3fe9a1606d665e8c7c6fc2f0e8cf29c3fa3ebe
title: Update the Consent Status
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/interaction-service-api/references/api-consent.md
canonical_url: https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-consent.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bbd18f7aa111c621e4101b32d30b3cdebd34d5f58f3ed09027c8c9ce3a49e321
products:
  - Interaction Service API
  - Service Cloud Developer Content
---
# Update the Consent Status

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

```json
{
 "endUserClientId" : "end-user-0001",
 "channelAddressIdentifier" : "a12bc345-1303-44c2-866c-f30d546b58de",
 "consentStatus" : "ExplicitlyOptedIn"
}
```

## See Also

- _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis)
