Organisations
Add an email domain
Adds a domain and answers the TXT record to publish at _plotwork-verify.<domain>.
POST
/orgs/{org}/sso/domainsTL;DR
| Question | Answer |
|---|---|
| What does it do? | Add an email domain. |
| What does it take? | A JSON body of type SsoDomainBody. |
| What does it return? | Status 201 with a body of type SsoDomain. |
| What can go wrong? | 400 the body is not valid; 401 not signed in; 403 a member or a reader (orgs.forbidden), a plan without single sign-on (plan.sso_not_included), or the request came from an origin that may not make changes; 404 no such organisation, or the caller is not a member of it; 409 another organisation verified this domain (sso.domain_taken); 422 not a domain a provider can be proved for (sso.domain_invalid); 429 too many requests; 503 single sign-on is not set up on this server (sso.unavailable), or organisations are not. Every failure uses the one error envelope. |
What it does
Adds a domain and answers the TXT record to publish at _plotwork-verify.<domain>. It counts once verified. Public mail domains are refused; at most 20; one another organisation verified is 409 sso.domain_taken.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Request body
The body has the type SsoDomainBody.
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | yes | at least 3 characters; at most 253 characters. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | The domain and its record. | SsoDomain |
| 400 | The body is not valid. | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | A member or a reader (orgs.forbidden), a plan without single sign-on (plan.sso_not_included), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation, or the caller is not a member of it. | ErrorResponse |
| 409 | Another organisation verified this domain (sso.domain_taken). | ErrorResponse |
| 422 | Not a domain a provider can be proved for (sso.domain_invalid). | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Single sign-on is not set up on this server (sso.unavailable), or organisations are not. | ErrorResponse |
Response body
A 201 answer has the type SsoDomain.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
domain | string | yes | |
verified | boolean | yes | |
verifiedAt | integer | null | yes | |
checkedAt | integer | null | yes | |
createdAt | integer | yes | |
record | object | yes | |
record.name | string | yes | |
record.type | "TXT" | yes | |
record.value | string | yes |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |