Verify an email domain with its DNS TXT record
const url = 'http://localhost:8080/api/v1/orgs/example/sso/domains/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/verify';const options = {method: 'POST', headers: {cookie: 'cetra_session=<cetra_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/v1/orgs/example/sso/domains/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/verify \ --cookie cetra_session=<cetra_session>Looks up _cetra-verify.<domain> and verifies the domain when its value cetra-verify=<token> is there (D-P-54, D-P-64). An already verified domain answers 200 without a lookup. A domain another org holds moves to this org only when the holder’s record is gone from the answer. At most 10 lookups per minute per org. A failed lookup answers 503. Needs the Teams add-on or an enterprise licence (D-P-61). Owners only, session only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Org UUID or slug.
Domain id.
Responses
Section titled “Responses”The SSO settings, with the domain verified.
GET /api/v1/orgs/{org}/sso and every settings write.
object
The redirect URI to register at the identity provider.
Ordered by domain.
One email domain of the org and how to prove it.
object
Creation time.
Lowercase domain name.
The domain row id.
Last lookup, found or not. Omitted before the first one.
Pending or verified.
TXT record name, _cetra-verify.<domain>.
TXT record value, cetra-verify=<token>.
When the TXT record was found. Omitted while pending.
The provider, when the org has one.
object
The OAuth client id. Set for an OIDC provider only.
Creation time.
Shown on the login page.
Discovery sends users to this provider (D-P-57).
Password and other sign-ins are refused for the org’s domains (D-P-58).
The OIDC issuer URL. Set for an OIDC provider only.
Role of people who join through the provider.
The last successful sign-in through the provider. Absent before the first one.
OpenID Connect or SAML. The OIDC fields are set for an OIDC provider, saml for a SAML one.
The SAML settings. Set for a SAML provider only.
object
The attribute names the owner set. An absent field uses the default.
object
The attribute that carries the display name.
The attribute that carries the email address.
The attribute that carries the first name.
The attribute that carries the last name.
The trusted IdP signing certificates.
A trusted IdP signing certificate, shown by hash and validity (D-SA-11).
object
End of validity.
Start of validity.
The hex SHA-256 of the certificate’s DER encoding.
When the set of certificates last changed. Omitted before the first change.
The IdP’s entity ID (the Issuer of its responses).
The metadata URL, when the metadata was fetched from one.
Why the last scheduled refresh failed.
When the metadata was last fetched. Omitted for pasted metadata or manual fields.
The IdP’s HTTP-Redirect sign-on URL.
Last change to the settings.
The values for the org’s SAML provider (D-SA-12). The same for every protocol.
object
The assertion consumer service URL.
The SP entity ID.
Starts a login; also the IdP’s tile URL.
Example
{ "domains": [ { "status": "pending" } ], "provider": { "jit_role": "viewer", "protocol": "oidc", "saml": { "refresh_error": "fetch_failed" } }}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The resource does not exist.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The request conflicts with the current state.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The server is busy or a dependency is unavailable. Retry later.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}