Waitlist open: get early access

API reference: Account

8 endpoints of the Account group.

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

GET/v1/account/sso

Example

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

Responses

StatusDescription
200 The configuration (without the secret) SSO
Response fields
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

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

Example

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"}'

Responses

StatusDescription
200 Saved SSO
Response fields
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 Error in the usual format, errors and limits
409 Error in the usual format, errors and limits
422 Error in the usual format, errors and limits

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

DELETE/v1/account/sso

Example

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

Responses

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

Parameters

NameInTypeDescription
domain *pathstring

Example

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

Responses

StatusDescription
200 The domain with its status SSODomain
Response fields
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 Error in the usual format, errors and limits
409 Error in the usual format, errors and limits
429 Error in the usual format, errors and limits
502 Error in the usual format, errors and limits

The account, its status, retention and reputation

GET/v1/account

Example

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

Responses

StatusDescription
200 Account
Response fields
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

FieldTypeDescription
namestring
settingsobject

Example

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}}'

Responses

StatusDescription
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

FieldTypeDescription
confirm *stringThe exact account name

Example

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

Responses

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

Parameters

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

Example

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

Responses

StatusDescription
200 Erased
Response fields
markerstring
suppression_keptboolean
erasedobject
422 Not a valid address