Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

Update topics for a contact

PATCH/contacts/{contact_id}/topicsUpdate topics for a contact

Parameters

contact_idstringpathrequired

The Contact ID or email address.

Request body

application/json
objectUpdateContactTopicsOptions
topicsarray of objectrequired
Show child attributes
Show array items
idstring

The ID of the topic.

subscriptionstring

The subscription status (opt_in or opt_out).

one of "opt_in", "opt_out"

Example request
{
  "topics": [
    {
      "id": "string",
      "subscription": "opt_in"
    }
  ]
}

Responses

200OKapplication/json
objectUpdateContactTopicsResponseSuccess
contact_idstring

The ID of the contact.

objectstring

The object type.

topicsarray of object

Array of updated topic subscriptions.

Show child attributes
Show array items
idstring

The ID of the topic.

subscriptionstring

The subscription status.

one of "opt_in", "opt_out"

Example response
{
  "contact_id": "string",
  "object": "contact_topics",
  "topics": [
    {
      "id": "string",
      "subscription": "opt_in"
    }
  ]
}
Documentation menu