Create a topic

Creates an announcement topic. Assign it to announcements so contacts can unsubscribe from that category without leaving your whole list.

POST/v2/accounts/{accountId}/topics

Base URL https://api.sendstreak.com. All v2 endpoints require a bearer token - see Authentication.

Path parameters

accountIdstringrequired

The account the request is scoped to.

Request body

Request body for creating an announcement topic.

namestringrequired

Topic name; contacts see it on the unsubscribe page when choosing what to keep receiving.

descriptionstringoptional

Optional explanation of what this category of email covers.

Response

The created topic.

Errors

400

The request body or parameters failed validation.

401

Missing or invalid token, or the token is not authorized for this account/user.

See Errors and rate limits for what error responses look like.

curl --location --request POST 'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/topics' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Example name",
  "description": "Product news and announcements"
}'
response200application/json
{
  "_id": "665f0a2b1c9d440012ab34cd",
  "name": "Example name",
  "description": "Product news and announcements"
}