Skip to content

Add a domain to the tenant

POST
/v1/domains
curl --request POST \
--url https://example.com/v1/domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant-ID: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "domain": "example" }'
X-Tenant-ID
required
string format: uuid

Tenant identifier. Must match the tenant associated with the credential. Returns 403 tenant_mismatch if the credential and header belong to different tenants.

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

Created

Media type application/json
object
id
required
string format: uuid
domain
required
string
verified
required
boolean
verified_at
string format: date-time
nullable
verification_token
required
string
dns_record
required
string
dns_value
required
string
created_at
required
string format: date-time
Example generated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"domain": "example",
"verified": true,
"verified_at": "2026-04-15T12:00:00Z",
"verification_token": "example",
"dns_record": "example",
"dns_value": "example",
"created_at": "2026-04-15T12:00:00Z"
}

Unauthenticated

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Forbidden

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Domain already exists

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}

Domain is blocked (common email provider).

Media type application/json
object
code
required

Machine-readable error code (e.g. “not_found”, “tenant_mismatch”).

string
message
required

Human-readable description of the error.

string
details

Optional additional context about the error.

object
key
additional properties
any
notices

Policy notices from determining Cedar rules, if applicable.

Array<string>
Example generated
{
"code": "example",
"message": "example",
"details": {},
"notices": [
"example"
]
}