Update a topic

Updates an announcement topic’s name and description. Existing per-contact unsubscriptions from the topic are preserved.

PATCH/v2/accounts/{accountId}/topics/{topicId}

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.

topicIdstringrequired

Request body

Request body for updating an announcement topic. Both fields are optional - send only what changes.

namestringoptional

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 updated 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.

404

The requested resource does not exist.

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

curl --location --request PATCH 'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/topics/YOUR_TOPIC_ID' \
--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"
}