Warteliste offen: Hol dir früh Zugang

API-Referenz: Konto

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

Single sign-on of the dashboard (owner or admin in the dashboard)

GET/v1/account/sso

Beispiel

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

Antworten

StatusBeschreibung
200 The configuration (without the secret) SSO
Felder der Antwort
configuredboolean
redirect_uristringRegister this at the identity provider
issuerstring
client_idstring
has_secretboolean
email_domainsarray<string>As configured
domainsarray<SSODomain>Proof of ownership per email domain
domains[].domainstring
domains[].statusenum: pending | verifiedOnly verified domains route logins
domains[].verified_viaenum: dns | dkim | null
domains[].verified_atstring | null (date-time)
domains[].checked_atstring | null (date-time)
domains[].recordobjectThe TXT record that proves ownership
domains[].record.typeenum: TXT
domains[].record.namestringExample: _sendtide-sso.acme.ch
domains[].record.valuestringExample: sendtide-sso-verification=0f3a9c1d5e7b4a2c8d6e1f0a3b5c7d9e
default_roleenum: admin | developer | readonly
enforceboolean
enabledboolean

Configure OpenID Connect single sign-on (Business and Scale)

PUT/v1/account/sso

Issuer (https, discovery at /.well-known/openid-configuration is checked now), client id and secret (stored encrypted; omit it to keep the stored one), the email domains that may sign in (no webmail domains; each needs proof of ownership, see domains of GET and POST /v1/account/sso/domains/{domain}/verify: a domain only counts for login and enforcement once it is verified, and a domain verified by one account cannot be claimed by another), the role of new users, and enforce: members then cannot use a password (owners can, with two-factor authentication; every owner needs it before this can be set). The redirect URI to register at the provider is redirect_uri of GET. A session from SSO opens this account only.

Request-Body application/json

FeldTypBeschreibung
issuer *string
client_id *string
client_secretstring
email_domains *array<string>
default_role *enum: admin | developer | readonly
enforceboolean
enabledbooleanDefault: true

Beispiel

curl -X PUT "https://api.sendtide.ch/v1/account/sso" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"issuer":"string","client_id":"string","email_domains":["string"],"default_role":"admin"}'

Antworten

StatusBeschreibung
200 Saved SSO
Felder der Antwort
configuredboolean
redirect_uristringRegister this at the identity provider
issuerstring
client_idstring
has_secretboolean
email_domainsarray<string>As configured
domainsarray<SSODomain>Proof of ownership per email domain
domains[].domainstring
domains[].statusenum: pending | verifiedOnly verified domains route logins
domains[].verified_viaenum: dns | dkim | null
domains[].verified_atstring | null (date-time)
domains[].checked_atstring | null (date-time)
domains[].recordobjectThe TXT record that proves ownership
domains[].record.typeenum: TXT
domains[].record.namestringExample: _sendtide-sso.acme.ch
domains[].record.valuestringExample: sendtide-sso-verification=0f3a9c1d5e7b4a2c8d6e1f0a3b5c7d9e
default_roleenum: admin | developer | readonly
enforceboolean
enabledboolean
403 Fehler im üblichen Format, Fehler und Limits
409 Fehler im üblichen Format, Fehler und Limits
422 Fehler im üblichen Format, Fehler und Limits

Remove single sign-on (sessions that came from it end)

DELETE/v1/account/sso

Beispiel

curl -X DELETE "https://api.sendtide.ch/v1/account/sso" \
  -H "Authorization: Bearer sk_test_…"

Antworten

StatusBeschreibung
204 Removed

Look for the TXT record of an SSO email domain now (owner or admin in the dashboard)

POST/v1/account/sso/domains/{domain}/verify

Each email domain of the single sign-on needs proof that the account owns it: publish the TXT record from domains[].record (_sendtide-sso.<domain>, value sendtide-sso-verification=<token>), or have a sending domain of the same account verified by SES (DKIM), which proves the domain automatically. The scheduler looks every five minutes; this call looks right away. 409 sso_domain_taken: another account has already verified the domain. 429: at most 30 checks per 15 minutes.

Parameter

NameOrtTypBeschreibung
domain *pathstring

Beispiel

curl -X POST "https://api.sendtide.ch/v1/account/sso/domains/{domain}/verify" \
  -H "Authorization: Bearer sk_test_…"

Antworten

StatusBeschreibung
200 The domain with its status SSODomain
Felder der Antwort
domainstring
statusenum: pending | verifiedOnly verified domains route logins
verified_viaenum: dns | dkim | null
verified_atstring | null (date-time)
checked_atstring | null (date-time)
recordobjectThe TXT record that proves ownership
record.typeenum: TXT
record.namestringExample: _sendtide-sso.acme.ch
record.valuestringExample: sendtide-sso-verification=0f3a9c1d5e7b4a2c8d6e1f0a3b5c7d9e
404 Fehler im üblichen Format, Fehler und Limits
409 Fehler im üblichen Format, Fehler und Limits
429 Fehler im üblichen Format, Fehler und Limits
502 Fehler im üblichen Format, Fehler und Limits

The account, its status, retention and reputation

GET/v1/account

Beispiel

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

Antworten

StatusBeschreibung
200 Account
Felder der Antwort
idstring
namestring
planstring
statusenum: active | review | paused
paused_reasonstring | nullpayment, bounce_rate, complaint_rate or deleting
deletingboolean
sub_accountboolean
settingsobjectlanguages, default_language, missing_language, tracking, unsubscribe_default (List-Unsubscribe on every mail with one recipient), alerts (object of booleans, false turns an alert off: quota, budget, domain, webhook, reputation), retention_content_days, retention_metadata_days (0: the plan's days)
retentionobject
retention.content_daysinteger
retention.metadata_daysinteger
retention.plan_content_daysinteger
retention.plan_metadata_daysinteger
reputationobjectLast evaluation: level ok, warn or pause, sent_7d, bounce_rate and complaint_rate as fractions
featuresobject
features.ip_poolboolean
features.dedicated_ipsboolean

Rename the account or change its settings (admin)

PATCH/v1/account

settings.retention_content_days and settings.retention_metadata_days shorten how long content and metadata are kept (never longer than the plan).

Request-Body application/json

FeldTypBeschreibung
namestring
settingsobject

Beispiel

curl -X PATCH "https://api.sendtide.ch/v1/account" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme AG","settings":{"tracking":false}}'

Antworten

StatusBeschreibung
200 The account
422 Invalid settings

Delete the account and all its data (owner, dashboard session only)

DELETE/v1/account

Sending stops at once (status paused, reason deleting). Then a final invoice for the usage so far is charged, the SES identities and tracking sets are deleted, and all data is removed. Invoices are kept (accounting records). Not possible with an API key, and not for a sub-account (use DELETE /v1/tenants/{slug}).

Request-Body application/json

FeldTypBeschreibung
confirm *stringThe exact account name

Beispiel

curl -X DELETE "https://api.sendtide.ch/v1/account" \
  -H "Authorization: Bearer sk_test_…" \
  -H "Content-Type: application/json" \
  -d '{"confirm":"string"}'

Antworten

StatusBeschreibung
202 Deletion started
403 Not an owner session
422 The name does not match

Erase a recipient (GDPR), scope full or admin

DELETE/v1/recipients/{email}

Removes the content of every mail to or from the address in this account and replaces the address in mails, events, webhook deliveries, inbound mail and API logs by a hashed marker (erased-<hash>@erased.invalid), so statistics stay. The suppression entry is deleted too, unless keep_suppression=true.

Parameter

NameOrtTypBeschreibung
email *pathstring
keep_suppressionquerybooleanKeep the address on the suppression list
tenantquerystringSlug of a sub-account to act for.

Beispiel

curl -X DELETE "https://api.sendtide.ch/v1/recipients/anna@example.org" \
  -H "Authorization: Bearer sk_test_…"

Antworten

StatusBeschreibung
200 Erased
Felder der Antwort
markerstring
suppression_keptboolean
erasedobject
422 Not a valid address