Set a contact's topic preference (alias of POST)
PUT/api/v1/contacts/{id}/topics
PUT /contacts/{id}/topics
curl -X PUT 'https://www.unitpost.com/api/v1/contacts/con_123/topics' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"topic_id": "top_123",
"subscribed": false
}'Response · 201
{
"object": "contact_topic",
"topic_id": "topic_123",
"subscribed": false,
"status": "subscribed",
"source": "user"
}Identical to Set a contact's topic preference — provided so clients that prefer PUT semantics for an upsert can use it interchangeably. Requires the topics:write capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Request body3 fields
| Field | Type | Description |
|---|---|---|
topic_id | string | — |
topic | string | — |
subscribedrequired | boolean | — |
Response · 201 fields5 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
topic_idrequired | string | — |
subscribedrequired | boolean | — |
statusrequired | enumsubscribed | unsubscribed | — |
sourcerequired | enumuser | manual | import | api | — |
201401404422