Skip to documentation

API · Contacts

Update Contact Topics

Update up to 100 topic subscription choices for a contact (requires full access). Explicit choices override each topic’s default.

PATCH/contacts/{id}/topicsFull access

Request parameters

ParameterTypeDescription
id
path · required
stringContact id or URL-encoded email (case-insensitive).
topics
body · required
(object)[]
Up to 100 items
See operation behavior.
topics[].id
body · required
stringSee operation behavior.
topics[].subscription
body · required
"opt_in" | "opt_out"See operation behavior.

Request example

Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.

bash
curl -X PATCH "$OPENSEND_BASE_URL/contacts/YOUR_id/topics" \
  -H "Authorization: Bearer $OPENSEND_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"topics":[{"id":"YOUR_TOPIC_ID","subscription":"opt_out"}]}'

Response

200 · application/json. Example IDs stand for IDs returned by your installation.

json
{
  "object": "contact_topics",
  "id": "YOUR_ID"
}

Behavior and errors

A changed choice emits contact.updated. Repeating the same choice emits no event.

Use a full-access credential. Resource IDs belong to your team; an unknown or foreign resource returns 404. See authentication, errors, rate limits, and compatibility for the shared contract.