# Consent Management API

> \[!NOTE]
>
> The Consent Management API is in **Public Beta** and is available globally to all Twilio Programmable Messaging customers. It supports cross-channel consent synchronization across RCS, SMS, and MMS channels.
>
> Customers using Twilio's [Compliance Toolkit](/docs/messaging/features/compliance-toolkit) obtain default access to the API.
>
> This Public Beta is available for early adopter customers to test and provide feedback. To request access, reach out to [Twilio Support](https://help.twilio.com/) or contact your sales representative for more information on enablement and pricing.
>
> Consent Management API is available in Public Beta and the information contained in this document is subject to change. Some features are not yet implemented and others may be changed before the product is declared as Generally Available.
> Beta products are not covered by the Twilio Support Terms or the [Twilio Service Level Agreement](https://www.twilio.com/en-us/legal/service-level-agreement/twilio-apis).

> \[!WARNING]
>
> Consent Management API is not a HIPAA Eligible Service and should not be used in workflows that are subject to HIPAA.

Twilio's Consent Management API lets you bulk manage user consent preferences globally across your messaging channels. Use it to store, sync, or update opt-in, opt-out, and re-opt-in statuses for your users across RCS, SMS, and MMS channels, along with details about how and when consent was collected.

## Supported consent preferences

With this API, you can manage the following user consent states across RCS, SMS, and MMS channels:

| Consent status | Description                                                                                                          |
| -------------- | -------------------------------------------------------------------------------------------------------------------- |
| `opt in`       | The user has provided valid consent to receive messages.                                                             |
| `opt out`      | The user has revoked consent or replied with STOP-like keywords. This blocks future messages.                        |
| `opt in`       | Handled as re-opt-in. The user has opted in again after a prior opt-out. Overrides STOP keyword to resume messaging. |

## Rate limits

Twilio limits the Consent Management API to 100 requests per minute. Once you reach this limit, the API returns an HTTP 429 "Too Many Requests" response. If you need support for higher rate limits, contact Twilio Support.

## Timeouts

Consent Management API has a timeout value of three seconds.

## Consent Management API Response Properties

These properties are returned in the JSON response.

<OperationTable type="properties" data={{"type":"object","refName":"accounts.v1.bulk_consents","modelName":"accounts_v1_bulk_consents","properties":{"items":{"nullable":true,"description":"A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}}}}} />

## Upsert Consents in Bulk

`POST https://accounts.twilio.com/v1/Consents/Bulk`

Creates up to 25 consents for an authenticated account. If a consent already exists, it will be updated (via upsert) to match the requested object.

Every Consent object should be associated with a unique `correlation_id`, allowing you to track each individual request within the bulk operation.

If any issues arise during the processing of a consent object, an error will be returned and mapped specifically to that consent's `correlation_id`. This allows you to pinpoint and address issues for individual contacts.

For detailed information on possible failures and how to resolve them, refer to [error code 30646](/docs/api/errors/30646), which provides guidance on common errors such as incorrect phone number format, missing required fields, and other validation issues.

### Request body parameters

```json
{"schema":{"type":"object","title":"CreateBulkConsentsRequest","required":["Items"],"properties":{"Items":{"type":"array","description":"This is a list of objects that describes a contact's opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`]; `date_of_consent`, an optional datetime string field in ISO-8601 format that captures the exact date and time when the user gave or revoked consent. If not provided, it will be empty.","x-twilio":{"pii":{"handling":"standard","deleteSla":30}}}}},"examples":{"post":{"value":{"lang":"json","value":"{\n  \"Items\": [\n    \"{\\\"contact_id\\\":\\\"+19999999999\\\",\\\"correlation_id\\\":\\\"ad388b5a46b33b874b0d41f7226db2ef\\\",\\\"sender_id\\\":\\\"MG00000000000000000000000000000001\\\",\\\"date_of_consent\\\":\\\"2025-02-28T10:05:27Z\\\",\\\"status\\\":\\\"opt-out\\\",\\\"source\\\":\\\"website\\\"}\",\n    \"{\\\"contact_id\\\":\\\"+19\\\",\\\"correlation_id\\\":\\\"02520cfa6c432f0e3ec3a38c122d428d\\\",\\\"sender_id\\\":\\\"123456\\\",\\\"date_of_consent\\\":\\\"2025-03-25\\\",\\\"status\\\":\\\"opt-in\\\",\\\"source\\\":\\\"opt-in-message\\\"}\"\n  ]\n}","meta":"","code":"{\n  \"Items\": [\n    \"{\\\"contact_id\\\":\\\"+19999999999\\\",\\\"correlation_id\\\":\\\"ad388b5a46b33b874b0d41f7226db2ef\\\",\\\"sender_id\\\":\\\"MG00000000000000000000000000000001\\\",\\\"date_of_consent\\\":\\\"2025-02-28T10:05:27Z\\\",\\\"status\\\":\\\"opt-out\\\",\\\"source\\\":\\\"website\\\"}\",\n    \"{\\\"contact_id\\\":\\\"+19\\\",\\\"correlation_id\\\":\\\"02520cfa6c432f0e3ec3a38c122d428d\\\",\\\"sender_id\\\":\\\"123456\\\",\\\"date_of_consent\\\":\\\"2025-03-25\\\",\\\"status\\\":\\\"opt-in\\\",\\\"source\\\":\\\"opt-in-message\\\"}\"\n  ]\n}","tokens":[["{","#C9D1D9"],"\n  ",["\"Items\"","#7EE787"],[": [","#C9D1D9"],"\n    ",["\"{","#A5D6FF"],["\\\"","#79C0FF"],["contact_id","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["+19999999999","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["correlation_id","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["ad388b5a46b33b874b0d41f7226db2ef","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["sender_id","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["MG00000000000000000000000000000001","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["date_of_consent","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["2025-02-28T10:05:27Z","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["status","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["opt-out","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["source","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["website","#A5D6FF"],["\\\"","#79C0FF"],["}\"","#A5D6FF"],[",","#C9D1D9"],"\n    ",["\"{","#A5D6FF"],["\\\"","#79C0FF"],["contact_id","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["+19","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["correlation_id","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["02520cfa6c432f0e3ec3a38c122d428d","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["sender_id","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["123456","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["date_of_consent","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["2025-03-25","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["status","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["opt-in","#A5D6FF"],["\\\"","#79C0FF"],[",","#A5D6FF"],["\\\"","#79C0FF"],["source","#A5D6FF"],["\\\"","#79C0FF"],[":","#A5D6FF"],["\\\"","#79C0FF"],["opt-in-message","#A5D6FF"],["\\\"","#79C0FF"],["}\"","#A5D6FF"],"\n  ",["]","#C9D1D9"],"\n",["}","#C9D1D9"]],"annotations":[],"themeName":"github-dark","style":{"color":"#c9d1d9","background":"#0d1117"}}}},"encodingType":"application/x-www-form-urlencoded","conditionalParameterMap":{}}
```

Upsert Consents in Bulk

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function createBulkConsents() {
  const bulkConsent = await client.accounts.v1.bulkConsents.create({
    items: [
      {
        contact_id: "+19999999991",
        correlation_id: "ad388b5a46b33b874b0d41f7226db2ef",
        sender_id: "MG00000000000000000000000000000000",
        date_of_consent: "2025-02-28T10:05:27Z",
        status: "opt-in",
        source: "website",
      },
      {
        contact_id: "+447700900077",
        correlation_id: "02520cfa6c432f0e3ec3a38c122d428d",
        sender_id: "+12345678901",
        date_of_consent: "2025-02-25T14:30:00Z",
        status: "opt-out",
        source: "opt-out-message",
      },
      {
        contact_id: "+173800900067",
        correlation_id: "8u344b9a46b33b874b0d41f7776hb72f",
        sender_id: "rcs:test_-_twilio_4n2azqfk_agent",
        date_of_consent: "2025-02-25T14:30:00Z",
        status: "opt-out",
        source: "offline",
      },
    ],
  });

  console.log(bulkConsent.items);
}

createBulkConsents();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

bulk_consent = client.accounts.v1.bulk_consents.create(
    items=[
        {
            "contact_id": "+19999999991",
            "correlation_id": "ad388b5a46b33b874b0d41f7226db2ef",
            "sender_id": "MG00000000000000000000000000000000",
            "date_of_consent": "2025-02-28T10:05:27Z",
            "status": "opt-in",
            "source": "website",
        },
        {
            "contact_id": "+447700900077",
            "correlation_id": "02520cfa6c432f0e3ec3a38c122d428d",
            "sender_id": "+12345678901",
            "date_of_consent": "2025-02-25T14:30:00Z",
            "status": "opt-out",
            "source": "opt-out-message",
        },
        {
            "contact_id": "+173800900067",
            "correlation_id": "8u344b9a46b33b874b0d41f7776hb72f",
            "sender_id": "rcs:test_-_twilio_4n2azqfk_agent",
            "date_of_consent": "2025-02-25T14:30:00Z",
            "status": "opt-out",
            "source": "offline",
        },
    ]
)

print(bulk_consent.items)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Accounts.V1;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var bulkConsents = await BulkConsentsResource.CreateAsync(
            items: new List<Object> {
                new Dictionary<string, Object>() {
                    { "contact_id", "+19999999991" },
                    { "correlation_id", "ad388b5a46b33b874b0d41f7226db2ef" },
                    { "sender_id", "MG00000000000000000000000000000000" },
                    { "date_of_consent", "2025-02-28T10:05:27Z" },
                    { "status", "opt-in" },
                    { "source", "website" }
                },
                new Dictionary<string, Object>() {
                    { "contact_id", "+447700900077" },
                    { "correlation_id", "02520cfa6c432f0e3ec3a38c122d428d" },
                    { "sender_id", "+12345678901" },
                    { "date_of_consent", "2025-02-25T14:30:00Z" },
                    { "status", "opt-out" },
                    { "source", "opt-out-message" }
                },
                new Dictionary<string, Object>() {
                    { "contact_id", "+173800900067" },
                    { "correlation_id", "8u344b9a46b33b874b0d41f7776hb72f" },
                    { "sender_id", "rcs:test_-_twilio_4n2azqfk_agent" },
                    { "date_of_consent", "2025-02-25T14:30:00Z" },
                    { "status", "opt-out" },
                    { "source", "offline" }
                }
            });

        Console.WriteLine(bulkConsents.Items);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import com.twilio.Twilio;
import com.twilio.rest.accounts.v1.BulkConsents;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        BulkConsents bulkConsents = BulkConsents
                                        .creator(Arrays.asList(
                                            new HashMap<String, Object>() {
                                                {
                                                    put("contact_id", "+19999999991");
                                                    put("correlation_id", "ad388b5a46b33b874b0d41f7226db2ef");
                                                    put("sender_id", "MG00000000000000000000000000000000");
                                                    put("date_of_consent", "2025-02-28T10:05:27Z");
                                                    put("status", "opt-in");
                                                    put("source", "website");
                                                }
                                            },
                                            new HashMap<String, Object>() {
                                                {
                                                    put("contact_id", "+447700900077");
                                                    put("correlation_id", "02520cfa6c432f0e3ec3a38c122d428d");
                                                    put("sender_id", "+12345678901");
                                                    put("date_of_consent", "2025-02-25T14:30:00Z");
                                                    put("status", "opt-out");
                                                    put("source", "opt-out-message");
                                                }
                                            },
                                            new HashMap<String, Object>() {
                                                {
                                                    put("contact_id", "+173800900067");
                                                    put("correlation_id", "8u344b9a46b33b874b0d41f7776hb72f");
                                                    put("sender_id", "rcs:test_-_twilio_4n2azqfk_agent");
                                                    put("date_of_consent", "2025-02-25T14:30:00Z");
                                                    put("status", "opt-out");
                                                    put("source", "offline");
                                                }
                                            }))
                                        .create();

        System.out.println(bulkConsents.getItems());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	accounts "github.com/twilio/twilio-go/rest/accounts/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &accounts.CreateBulkConsentsParams{}
	params.SetItems([]interface{}{
		map[string]interface{}{
			"contact_id":      "+19999999991",
			"correlation_id":  "ad388b5a46b33b874b0d41f7226db2ef",
			"sender_id":       "MG00000000000000000000000000000000",
			"date_of_consent": "2025-02-28T10:05:27Z",
			"status":          "opt-in",
			"source":          "website",
		},
		map[string]interface{}{
			"contact_id":      "+447700900077",
			"correlation_id":  "02520cfa6c432f0e3ec3a38c122d428d",
			"sender_id":       "+12345678901",
			"date_of_consent": "2025-02-25T14:30:00Z",
			"status":          "opt-out",
			"source":          "opt-out-message",
		},
		map[string]interface{}{
			"contact_id":      "+173800900067",
			"correlation_id":  "8u344b9a46b33b874b0d41f7776hb72f",
			"sender_id":       "rcs:test_-_twilio_4n2azqfk_agent",
			"date_of_consent": "2025-02-25T14:30:00Z",
			"status":          "opt-out",
			"source":          "offline",
		},
	})

	resp, err := client.AccountsV1.CreateBulkConsents(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.Items != nil {
			fmt.Println(*resp.Items)
		} else {
			fmt.Println(resp.Items)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$bulk_consent = $twilio->accounts->v1->bulkConsents->create(
    [
        [
            "contact_id" => "+19999999991",
            "correlation_id" => "ad388b5a46b33b874b0d41f7226db2ef",
            "sender_id" => "MG00000000000000000000000000000000",
            "date_of_consent" => "2025-02-28T10:05:27Z",
            "status" => "opt-in",
            "source" => "website",
        ],
        [
            "contact_id" => "+447700900077",
            "correlation_id" => "02520cfa6c432f0e3ec3a38c122d428d",
            "sender_id" => "+12345678901",
            "date_of_consent" => "2025-02-25T14:30:00Z",
            "status" => "opt-out",
            "source" => "opt-out-message",
        ],
        [
            "contact_id" => "+173800900067",
            "correlation_id" => "8u344b9a46b33b874b0d41f7776hb72f",
            "sender_id" => "rcs:test_-_twilio_4n2azqfk_agent",
            "date_of_consent" => "2025-02-25T14:30:00Z",
            "status" => "opt-out",
            "source" => "offline",
        ],
    ] // Items
);

print $bulk_consent->items;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

bulk_consent = @client
               .accounts
               .v1
               .bulk_consents
               .create(
                 items: [
                   {
                     'contact_id' => '+19999999991',
                     'correlation_id' => 'ad388b5a46b33b874b0d41f7226db2ef',
                     'sender_id' => 'MG00000000000000000000000000000000',
                     'date_of_consent' => '2025-02-28T10:05:27Z',
                     'status' => 'opt-in',
                     'source' => 'website'
                   },
                   {
                     'contact_id' => '+447700900077',
                     'correlation_id' => '02520cfa6c432f0e3ec3a38c122d428d',
                     'sender_id' => '+12345678901',
                     'date_of_consent' => '2025-02-25T14:30:00Z',
                     'status' => 'opt-out',
                     'source' => 'opt-out-message'
                   },
                   {
                     'contact_id' => '+173800900067',
                     'correlation_id' => '8u344b9a46b33b874b0d41f7776hb72f',
                     'sender_id' => 'rcs:test_-_twilio_4n2azqfk_agent',
                     'date_of_consent' => '2025-02-25T14:30:00Z',
                     'status' => 'opt-out',
                     'source' => 'offline'
                   }
                 ]
               )

puts bulk_consent.items
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:accounts:v1:consents:bulk:create \
   --items "{\"contact_id\":\"+19999999991\",\"correlation_id\":\"ad388b5a46b33b874b0d41f7226db2ef\",\"sender_id\":\"MG00000000000000000000000000000000\",\"date_of_consent\":\"2025-02-28T10:05:27Z\",\"status\":\"opt-in\",\"source\":\"website\"}" "{\"contact_id\":\"+447700900077\",\"correlation_id\":\"02520cfa6c432f0e3ec3a38c122d428d\",\"sender_id\":\"+12345678901\",\"date_of_consent\":\"2025-02-25T14:30:00Z\",\"status\":\"opt-out\",\"source\":\"opt-out-message\"}" "{\"contact_id\":\"+173800900067\",\"correlation_id\":\"8u344b9a46b33b874b0d41f7776hb72f\",\"sender_id\":\"rcs:test_-_twilio_4n2azqfk_agent\",\"date_of_consent\":\"2025-02-25T14:30:00Z\",\"status\":\"opt-out\",\"source\":\"offline\"}"
```

```bash
curl -X POST "https://accounts.twilio.com/v1/Consents/Bulk" \
--data-urlencode "Items={\"contact_id\":\"+19999999991\",\"correlation_id\":\"ad388b5a46b33b874b0d41f7226db2ef\",\"sender_id\":\"MG00000000000000000000000000000000\",\"date_of_consent\":\"2025-02-28T10:05:27Z\",\"status\":\"opt-in\",\"source\":\"website\"}" \
--data-urlencode "Items={\"contact_id\":\"+447700900077\",\"correlation_id\":\"02520cfa6c432f0e3ec3a38c122d428d\",\"sender_id\":\"+12345678901\",\"date_of_consent\":\"2025-02-25T14:30:00Z\",\"status\":\"opt-out\",\"source\":\"opt-out-message\"}" \
--data-urlencode "Items={\"contact_id\":\"+173800900067\",\"correlation_id\":\"8u344b9a46b33b874b0d41f7776hb72f\",\"sender_id\":\"rcs:test_-_twilio_4n2azqfk_agent\",\"date_of_consent\":\"2025-02-25T14:30:00Z\",\"status\":\"opt-out\",\"source\":\"offline\"}" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "items": [
    {
      "contact_id": "+19999999991",
      "correlation_id": "ad388b5a46b33b874b0d41f7226db2ef",
      "sender_id": "MG00000000000000000000000000000000",
      "date_of_consent": "2025-02-28T10:05:27Z",
      "status": "opt-in",
      "source": "website"
    },
    {
      "contact_id": "+447700900077",
      "correlation_id": "02520cfa6c432f0e3ec3a38c122d428d",
      "sender_id": "+12345678901",
      "date_of_consent": "2025-02-25T14:30:00Z",
      "status": "opt-out",
      "source": "opt-out-message"
    },
    {
      "contact_id": "+173800900067",
      "correlation_id": "8u344b9a46b33b874b0d41f7776hb72f",
      "sender_id": "rcs:test_-_twilio_4n2azqfk_agent",
      "date_of_consent": "2025-02-25T14:30:00Z",
      "status": "opt-out",
      "source": "offline"
    }
  ]
}
```

Each item in the response matches the submitted `correlation_id`. This enables tracing of validation errors for specific contacts.

**Note**: **STOP** keyword override applies to all messages sent, except US Toll-free numbers. Toll-free opt out handling is managed at the network level in the US.

## Best practices

* Use a Messaging Service SID (MGXX...) as your `sender_id` to ensure consent and opt-outs are seamlessly synchronized across RCS, SMS, and MMS channels.
* Always use a unique `correlation_id` per contact update.
* Store and update the `date_of_consent` to establish proper consent timelines.
* Use `status`=`opt-in` with `source` to update re-opt-in consent records.
* Ensure `contact_id` is in proper E.164 format.
