Api referenceTopics
Set topic subscriptions
Upserts explicit subscribed or unsubscribed status for one channel.
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.
Authorization
apiKey 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<||>
Items
1 <= items <= 1000channel*"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}