Add a domain to prove
const url = 'https://beta-api.plune.ai/v1/companies/example/sso/domains';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 \ --header 'Content-Type: application/json' \ --cookie plune_session=<plune_session> \ --data '{ "domain": "acme.example" }'Owner only. Returns the DNS TXT record to create (_plune-sso.<domain>, value plune-sso-verification=<token>). A mail provider’s domain (gmail.com, outlook.com and the like) is refused: a company cannot prove it. A domain another company has already verified is 409. At most 20 a company. 20 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, unverified, with its record
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, or a public mail domain (sso_public_mail_domain)
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 caller is not in it
object
Example generated
{ "error": "example"}sso_domain_taken or sso_limit
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