Skip to content

Add a domain to prove

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

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

The domain, unverified, with its record

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, or a public mail domain (sso_public_mail_domain)

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 caller is not in it

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

sso_domain_taken or sso_limit

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