Verify an email domain
POST
/api/v1/email-domains/{domain}/verify
const url = 'http://localhost:3000/api/v1/email-domains/example/verify';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
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:3000/api/v1/email-domains/example/verify \ --header 'Authorization: Bearer <token>'Looks up its TXT record now; a 422 names what is missing and what was found. Proves it for single sign-on too.
Scope: admin.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”domain
required
string
E.g. acme.com
Responses
Section titled “Responses”The email domain
Media typeapplication/json
object
data
required
object
domain
required
string
verified
required
Proved by its TXT record: single sign-on and joining by domain may use it
boolean
join
required
Anyone whose address is at exactly this domain may join the organization, able to read its landing project
boolean
projectId
required
The project whoever joins lands in, able to read; null for the organization’s oldest
string | null
sso
required
The organization’s single sign-on uses it
boolean
record
required
What proves the domain: add this record at your DNS host
object
type
required
string
name
required
string
value
required
string
Example
{ "data": { "record": { "type": "TXT" } }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}