Zum Inhalt springen
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Create a topic

POST/topics
Autorisierung
AuthorizationBearer-Token · headererforderlich

A BillionSend API key (bs_…).

Request-Body
erforderlichapplication/json
namestringerforderlich
min. Länge 1
descriptionstring
default_subscriptionstringerforderlich
Erlaubt:opt_inopt_out
visibilitystring
Erlaubt:privatepublic
domain_idstring<uuid> | null

BillionSend extension: id of one of your domains. The topic then appears only on that domain's unsubscribe page, and a send with this topic_id must come from that domain (422 otherwise). null or omitted: a topic of the whole team, shown for every domain. On update, null makes the topic a team-wide one again.

Antworten
200

Topic created

idstring<uuid>erforderlich
namestringerforderlich
descriptionstring
default_subscriptionstringerforderlich
Erlaubt:opt_inopt_out
visibilitystringerforderlich
Erlaubt:privatepublic
domain_idstring<uuid> | nullerforderlich

BillionSend extension: the domain the topic is bound to; null for a team-wide topic

created_atstringerforderlich
401

Missing, malformed, unknown or revoked API key

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
403

A key held to one domain bound this to another domain, or unbound it

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
422

Validation error, or a domain_id that is not one of your domains

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
Ausprobieren
Server
Autorisierung
Bodyapplication/json
Anfrage
curl -X POST 'https://api.billionsend.com/topics' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "description": "string",
  "default_subscription": "opt_in",
  "visibility": "private",
  "domain_id": "b2f7354f-b74d-4332-ab10-1a5e3c56466c"
}'
Antwort
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "description": "string",
  "default_subscription": "opt_in",
  "visibility": "private",
  "domain_id": "b2f7354f-b74d-4332-ab10-1a5e3c56466c",
  "created_at": "string"
}

War diese Seite hilfreich?