> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Set restricted channels

> Replace the channels a contact asked not to be contacted on. Use to honor a confidential communications request or a one-channel opt-out synced from your own system.

Send the contact's full list of restricted channels: it replaces the current one. Channels are any of `email`, `sms`, `whatsapp` and `phone_voice` (phone calls). Duplicates are dropped and the response lists the channels sorted. Send an empty list to lift every restriction.

```bash theme={"dark"}
curl -X PUT "https://api.open.cx/contacts/3f6c1e2a-8b4d-4c7e-9a10-5d2b7e4f9c01/restricted-channels" \
  -H "Authorization: Bearer $OPENCX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "restricted_channels": ["sms", "phone_voice"] }'
```

```json theme={"dark"}
{
  "contact_id": "3f6c1e2a-8b4d-4c7e-9a10-5d2b7e4f9c01",
  "restricted_channels": ["phone_voice", "sms"]
}
```

To add or lift a single channel, read `restricted_channels` from [Get contact](https://docs.open.cx/api-reference/contacts/get.md) first, then send the new full list.

* The API key needs the `contacts:write` scope.
* A contact ID that isn't in your organization returns `404`.
* A change moves the contact's `updated_at` forward, so [List contacts](https://docs.open.cx/api-reference/contacts/list.md) with `updated_after` picks it up. Sending the list the contact already has changes and records nothing.
* Every change is recorded in the audit log with the before and after lists, who made it and from where. See [Audit Logs API](https://docs.open.cx/api-reference/audit-logs/index.md#contact-channel-restrictions).
* Changing restricted channels doesn't fire the **Contact Updated** workflow trigger.

Once a channel is restricted, a send to the contact on it is refused with HTTP `422` and `error: "contact_channel_restricted"`; see [refused sends](https://docs.open.cx/api-reference/contacts/introduction.md#refused-sends). Replies in a session the contact started on that channel are still delivered. [Restricted channels](https://docs.open.cx/contacts/manage-contacts.md#restricted-channels) explains what a restriction stops and what still goes through.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.