Skip to content

Verify a domain by its DNS record

POST
/v1/companies/{id}/sso/domains/verify
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.

id
required
string
Media type application/json
object
domain
required
string
Example
{
"domain": "acme.example"
}

The domain, verified

Media type application/json
object
domain
required
string
verified
required
boolean
verifiedAt
required
string format: date-time
nullable
record
required

The DNS TXT record that proves the domain: put value in a TXT record at name, then ask for the verification.

object
type
required
string
Allowed values: TXT
name
required
string
value
required
string
Example
{
"domain": "acme.example",
"record": {
"type": "TXT",
"name": "_plune-sso.acme.example",
"value": "plune-sso-verification=Zt3b…"
}
}

Not a domain name

Media type application/json
object
error
required
string
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)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No such company, or the domain is not in its list

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

sso_record_not_found (with the record) or sso_domain_taken

Media type application/json
object
error
required
string
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.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over

DNS could not be read

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}