8 Endpunkte der Gruppe «Konto». Die Referenz stammt aus der englischen OpenAPI-Spezifikation und ist nicht übersetzt.
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
| Feld | Typ | Beschreibung |
issuer * | string | |
client_id * | string | |
client_secret | string | |
email_domains * | array<string> | |
default_role * | enum: admin | developer | readonly | |
enforce | boolean | |
enabled | boolean | Default: 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
| Status | Beschreibung |
200 | Saved SSO Felder der Antwort configured | boolean | | redirect_uri | string | Register this at the identity provider | issuer | string | | client_id | string | | has_secret | boolean | | email_domains | array<string> | As configured | domains | array<SSODomain> | Proof of ownership per email domain | domains[].domain | string | | domains[].status | enum: pending | verified | Only verified domains route logins | domains[].verified_via | enum: dns | dkim | null | | domains[].verified_at | string | null (date-time) | | domains[].checked_at | string | null (date-time) | | domains[].record | object | The TXT record that proves ownership | domains[].record.type | enum: TXT | | domains[].record.name | string | Example: _sendtide-sso.acme.ch | domains[].record.value | string | Example: sendtide-sso-verification=0f3a9c1d5e7b4a2c8d6e1f0a3b5c7d9e | default_role | enum: admin | developer | readonly | | enforce | boolean | | enabled | boolean | |
|
403 | Fehler im üblichen Format, Fehler und Limits |
409 | Fehler im üblichen Format, Fehler und Limits |
422 | Fehler im üblichen Format, Fehler und Limits |
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
| Name | Ort | Typ | Beschreibung |
domain * | path | string | |
Beispiel
curl -X POST "https://api.sendtide.ch/v1/account/sso/domains/{domain}/verify" \
-H "Authorization: Bearer sk_test_…"
Antworten
| Status | Beschreibung |
200 | The domain with its status SSODomain Felder der Antwort domain | string | | status | enum: pending | verified | Only verified domains route logins | verified_via | enum: dns | dkim | null | | verified_at | string | null (date-time) | | checked_at | string | null (date-time) | | record | object | The TXT record that proves ownership | record.type | enum: TXT | | record.name | string | Example: _sendtide-sso.acme.ch | record.value | string | Example: 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 |
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
| Name | Ort | Typ | Beschreibung |
email * | path | string | |
keep_suppression | query | boolean | Keep the address on the suppression list |
tenant | query | string | Slug 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
| Status | Beschreibung |
200 | Erased Felder der Antwort marker | string | | suppression_kept | boolean | | erased | object | |
|
422 | Not a valid address |