Api referenceTopics

Set topic subscriptions

Upserts explicit subscribed or unsubscribed status for one channel.

POST
/v1/topics/{id}/subscriptions

Upserts explicit subscribed or unsubscribed status for one channel. Each contact is named by ID, email, or phone. New addresses create contacts in the topic's namespace. Repeating the same status is idempotent.

x-api-key<token>

In: header

Path Parameters

id*string
Match^unsub_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

contacts*array<||>
Items1 <= items <= 1000
channel*"email"

Value in

  • "email"
status*string

Value in

  • "subscribed"
  • "unsubscribed"
source?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/topics/string/subscriptions" \  -H "Content-Type: application/json" \  -d '{    "contacts": [      {        "contactId": "string"      }    ],    "channel": "email",    "status": "subscribed"  }'
{  "updated": 0}