Set a contact's topics
Record the contact's choices, up to 50 topics at once.
https://app.usenotix.dev/api/v1/contacts/{contactId}/topicsNeeds a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Record the contact's choices, up to 50 topics at once. Only ask for what the person chose: a choice you set is treated as theirs.
{
"topics": [
{ "topicId": "clx9f2k3l0002qz8a7b6c5d4e", "subscribed": false }
]
}
The choice applies to every contact of the team with the same address. The answer is the contact's standing on every topic afterwards. This never changes whether the contact is unsubscribed from everything.
Turning a topic on answers 409 CONFLICT when the contact turned it off themselves, on the page their unsubscribe link opens: only they can turn it back on.
Needs a full access key. Topics carry no domain, so a key limited to one domain may use them too. Read only, send-only and live AI keys answer 403 SCOPE_DENIED.
Path parameters
Body parameters
At most 64 characters.
Headers
Bearer followed by your API key.
Errors
A topic that is not the team's, a topic named twice, or more than 50 at once.
No contact with this id in the team.
Turning on a topic the contact turned off themselves on their preference page.
Every error has the same shape. See all error codes.
curl -X PATCH "https://app.usenotix.dev/api/v1/contacts/<contactId>/topics" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"topics": [
{
"topicId": "cm1x8f3k20001qz7v5b9d2e4a",
"subscribed": true
}
]
}'
{
"contactId": "cm1x8f3k20001qz7v5b9d2e4a",
"data": [
{
"topicId": "cm1x8f3k20001qz7v5b9d2e4a",
"name": "Acme",
"description": "string",
"visibility": "PUBLIC",
"defaultSubscription": "OPT_IN",
"subscribed": true,
"chosen": true
}
]
}