Verify a domain by its DNS record
const url = 'https://beta-api.plune.ai/v1/companies/example/sso/domains/verify';const options = { method: 'POST', headers: { cookie: 'plune_session=<plune_session>', 'Content-Type': 'application/json' }, body: '{"domain":"acme.example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://beta-api.plune.ai/v1/companies/example/sso/domains/verify \ --header 'Content-Type: application/json' \ --cookie plune_session=<plune_session> \ --data '{ "domain": "acme.example" }'Owner only. Reads the TXT record and, if it holds the value, marks the domain verified (the server asks again once a day; a record that is gone takes the verification, and with it the requirement, away). 409 sso_record_not_found while the record is not there yet; 502 when DNS could not be read. 10 a minute a person.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Example
{ "domain": "acme.example"}Responses
Section titled “ Responses ”The domain, verified
object
The DNS TXT record that proves the domain: put value in a TXT record at name, then ask for the verification.
object
Example
{ "domain": "acme.example", "record": { "type": "TXT", "name": "_plune-sso.acme.example", "value": "plune-sso-verification=Zt3b…" }}Not a domain name
object
Example generated
{ "error": "example"}No / invalid session
The company does not have the saml option (code: tier_option_required, option: saml): a Team plan with the option, or Enterprise. Also: the caller is not the owner (or, for the read, a manager)
object
Example generated
{ "error": "example"}No such company, or the domain is not in its list
object
Example generated
{ "error": "example"}sso_record_not_found (with the record) or sso_domain_taken
object
Example generated
{ "error": "example"}Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over
DNS could not be read
object
Example generated
{ "error": "example"}