sendsend.email

Update a contact’s topics

PATCH/v1/audiences/{id}/contacts/{contact}/topics

Subscribe or unsubscribe a contact from topics.

Required scope: contacts:manage

Parameters

NameInDescription
idrequiredpathThe audience id.
contactrequiredpathThe contact id or email address.

Request body

FieldType
topicsrequiredobject[]

Unknown fields are rejected, so a typo never silently does nothing.

Example

curl -X PATCH 'https://api.sendsend.email/v1/audiences/ID/contacts/{contact}/topics' \
  -H "Authorization: Bearer $SENDSEND_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "topics": [
    {
      "id": "top_Xa9…",
      "subscription": "opt_out"
    }
  ]
}'

Response 200

{
  "object": "contact",
  "id": "con_Hk3v…",
  "updated": 1
}

Errors

StatusCodeWhen
400validation_errorThe request body or parameters are invalid. The message says which field.
404not_foundNo such resource in this project.
401unauthorizedThe API key is missing, invalid or revoked.
403forbiddenThe key does not have the scope this endpoint needs.

Every error has the same shape. See Errors.