Warteliste offen: Hol dir früh Zugang

API-Referenz: Submandanten

6 Endpunkte der Gruppe «Submandanten». Die Referenz stammt aus der englischen OpenAPI-Spezifikation und ist nicht übersetzt.

List sub-accounts

GET/v1/tenants

Parameter

NameOrtTypBeschreibung
limitqueryintegerPage size. The default and the maximum depend on the endpoint (emails 50 up to 500, received mail 50 up to 200, audit up to 200, the others 100 up to 500 or 1000). Default: 100
cursorquerystringThe next_cursor of the previous page. Opaque; pass it unchanged to the same endpoint with the same filters.

Beispiel

curl "https://api.sendtide.ch/v1/tenants" \
  -H "Authorization: Bearer sk_test_…"

Antworten

StatusBeschreibung
200 Sub-accounts
Felder der Antwort
dataarray<Tenant>
data[].idstring
data[].slugstring
data[].namestring
data[].statusstring
data[].sent_30dinteger
data[].adapted_templatesinteger
data[].created_atstring (date-time)
next_cursorstring | null

Add a sub-account (Business up to 10, Scale unlimited)

POST/v1/tenants

Admin endpoint, needs an admin key.

Request-Body application/json

FeldTypBeschreibung
slug *stringExample: baeckerei-moser
namestring

Beispiel

curl -X POST "https://api.sendtide.ch/v1/tenants" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"slug":"baeckerei-moser","name":"Bäckerei Moser"}'

Antworten

StatusBeschreibung
201 Added Tenant
Felder der Antwort
idstring
slugstring
namestring
statusstring
sent_30dinteger
adapted_templatesinteger
created_atstring (date-time)

Remove a sub-account with its data

DELETE/v1/tenants/{slug}

Admin endpoint, needs an admin key.

Parameter

NameOrtTypBeschreibung
slug *pathstring

Beispiel

curl -X DELETE "https://api.sendtide.ch/v1/tenants/baeckerei-moser" \
  -H "Authorization: Bearer sk_test_…"

Antworten

StatusBeschreibung
204 Removed

Create a key of a sub-account

POST/v1/tenants/{slug}/keys

Admin endpoint, needs an admin key. The scope of the new key follows the rules of Create an API key (never admin through a key).

Parameter

NameOrtTypBeschreibung
slug *pathstring

Request-Body application/json

FeldTypBeschreibung
namestring
envenum: live | test
scopeenum: full | send | read

Beispiel

curl -X POST "https://api.sendtide.ch/v1/tenants/baeckerei-moser/keys" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"Bäckerei Moser","env":"live","scope":"send"}'

Antworten

StatusBeschreibung
201 Created ApiKey
Felder der Antwort
idstring
namestring
prefixstring
envenum: live | test
scopeenum: admin | full | send | read
allowed_ipsarray<string>CIDRs, IPv4 or IPv6; empty: from anywhere
allowed_domainsarray<string>From domain must be one of these or a subdomain; empty: any verified domain
allowed_streamsarray<string>Streams the key may send through; empty: all
api_versionstringAPI version the key was created with Example: 2026-11-29
keystringOnly in the answer to POST
expires_atstring | null (date-time)The key is refused from then on; null: never
rotated_fromstring | nullId of the key this one replaced
last_used_atstring | null (date-time)
created_atstring (date-time)
403 Fehler im üblichen Format, Fehler und Limits

Adapt a main template for a sub-account (locked blocks stay)

PUT/v1/tenants/{slug}/templates/{alias}

Parameter

NameOrtTypBeschreibung
slug *pathstring
alias *pathstring

Request-Body application/json

FeldTypBeschreibung
aliasstring
namestring
kindenum: visual | code
styleobject
langsobject
sub_allowboolean
publishboolean
notestring

Beispiel

curl -X PUT "https://api.sendtide.ch/v1/tenants/baeckerei-moser/templates/welcome" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"langs":{"de-CH":{"subject":"Willkommen bei der Bäckerei Moser"}}}'

Antworten

StatusBeschreibung
200 Adapted Template
Felder der Antwort
idstring
aliasstring
namestring
kindenum: visual | code
published_versioninteger | null
sub_allowboolean
draftTemplateVersion
draft.kindenum: visual | code
draft.styleobject
draft.style.accentstring
draft.style.bgstring
draft.style.fontstring
draft.style.widthinteger
draft.langsobject
languagesarray<string>
updated_atstring (date-time)

Back to the main template

DELETE/v1/tenants/{slug}/templates/{alias}

Parameter

NameOrtTypBeschreibung
slug *pathstring
alias *pathstring

Beispiel

curl -X DELETE "https://api.sendtide.ch/v1/tenants/baeckerei-moser/templates/welcome" \
  -H "Authorization: Bearer sk_test_…"

Antworten

StatusBeschreibung
204 Reset