Skip to Content
SendlySendly
API ReferenceTopics

Retrieve a topic

GET
/api/v1/topics/{id}

Requires the topics:read scope — View the topics you mail about and who is subscribed to each.

headerAuthorizationBearer <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*string

Resource id.

Formatuuid

Response Body

The topic

application/json
  1. response

One subject this project mails about.

id*string
key*string

Stable, 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.

Match^[a-z0-9][a-z0-9_-]*$
Length1 <= length <= 64
name*string
description*string|null
default_opt_in*boolean

What 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*boolean

Hidden 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*integer

Contacts who explicitly said yes. Excludes those covered only by default_opt_in.

unsubscribed_count*integer
created_at*string
Formatdate-time
Example Request
curl -X GET 'https://api.sendly.now/api/v1/topics/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "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"}