Update a topic
Rename it, re-describe it, flip default_opt_in, or archive it.
key is absent from the body on purpose. Every stored preference and every integration refers to a topic by its key, so changing one would orphan them silently. There is no DELETE for the same reason — archived: true removes the topic from the preference centre and from new sends while every opt-out recorded against it survives.
Requires the topics:write scope — Create and edit topics, and change what your contacts are subscribed to — this decides who your campaigns reach.
AuthorizationBearer <API Key>API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
id*stringResource id.
uuidapplication/json- body
key is deliberately absent. It is the name every stored preference and every integration refers to, so changing it would silently orphan them.
name?string1 <= length <= 200description?|length <= 1000default_opt_in?booleanarchived?booleanThe updated topic
application/json- response
One subject this project mails about.
id*stringkey*stringStable, URL-safe, unique within the project. This is what a preference form and an API caller name the topic by, so it must survive a rename of name — which is the whole reason it exists beside one.
^[a-z0-9][a-z0-9_-]*$1 <= length <= 64name*stringdescription*string|nulldefault_opt_in*booleanWhat a contact with NO answer counts as. True is the honest default for a topic added after a list already exists: those contacts consented to hear from you, and inventing an opt-out they never asked for would silence mail they expect. False means the topic must be opted INTO, and absence means not asked rather than no.
archived*booleanHidden from the preference centre and from new sends, WITHOUT discarding the opt-outs recorded against it. There is no delete for the same reason: deleting a topic would delete the choices people made about it.
subscribed_count*integerContacts who explicitly said yes. Excludes those covered only by default_opt_in.
unsubscribed_count*integercreated_at*stringdate-timecurl -X PATCH 'https://api.sendly.now/api/v1/topics/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "key": "string", "name": "string", "description": "string", "default_opt_in": true, "archived": true, "subscribed_count": 0, "unsubscribed_count": 0, "created_at": "2019-08-24T14:15:22Z"}