Skip to content

Domain Verification API

Verify domain ownership via DNS for email sending, custom hostnames, webhooks, and more.

Endpoints

MethodPathDescription
POST/v1/domain-verification/domainsRegister domain
GET/v1/domain-verification/domainsList domains
GET/v1/domain-verification/domains/{domain_id}Get domain details
PATCH/v1/domain-verification/domains/{domain_id}Revoke domain
DELETE/v1/domain-verification/domains/{domain_id}Delete domain
POST/v1/domain-verification/domains/{domain_id}/verifyVerify domain
GET/v1/domain-verification/domains/{domain_id}/historyGet verification history

POST /v1/domain-verification/domains

Register domain

Register a domain for verification. Returns DNS setup instructions.

After registration, add the DNS record to your domain to prove ownership. Then call the verify endpoint to check.

Purposes:

  • email - For sending email from this domain
  • custom_host - For custom hostnames/CNAMEs
  • webhook - For webhook endpoint verification
  • link_branding - For branded tracking links
  • verify_channel - For communication channel verification
  • other - General domain ownership verification

Request Body:

FieldTypeDescription
domainstringRequired. Domain to verify (e.g., example.com)
purposestringRequired. Values: email, custom_host, webhook, link_branding, verify_channel, other
verification_methodstringValues: DNS_TXT, DNS_CNAME
metadataobjectOptional metadata

Example:

json
{
  "domain": "example.com",
  "purpose": "email",
  "verification_method": "DNS_TXT"
}

Response:

FieldTypeDescription
idstring
domainstringDomain name (normalized to lowercase/punycode)
purposestringValues: email, custom_host, webhook, link_branding, verify_channel, other
statusstringValues: pending, verified, failed, revoked
verification_methodstringValues: DNS_TXT, DNS_CNAME
verification_tokenstringToken to add to DNS record
dns_instructionsobjectInstructions for DNS setup
verification_attemptsinteger
verified_atstring
last_checked_atstring
failed_reasonstring
created_atstring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/domain-verification/domains \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

GET /v1/domain-verification/domains

List domains

List all domain verifications for your account. Supports filtering by purpose and status.

Response:

FieldTypeDescription
domainsarray
totalinteger
pageinteger
page_sizeinteger

Example:

bash
curl https://api.wayscloud.services/v1/domain-verification/domains \
  -H "X-API-Key: YOUR_API_KEY"

GET /v1/domain-verification/domains/

Get domain details

Get details for a specific domain verification including DNS instructions.

Response:

FieldTypeDescription
idstring
domainstringDomain name (normalized to lowercase/punycode)
purposestringValues: email, custom_host, webhook, link_branding, verify_channel, other
statusstringValues: pending, verified, failed, revoked
verification_methodstringValues: DNS_TXT, DNS_CNAME
verification_tokenstringToken to add to DNS record
dns_instructionsobjectInstructions for DNS setup
verification_attemptsinteger
verified_atstring
last_checked_atstring
failed_reasonstring
created_atstring

Example:

bash
curl https://api.wayscloud.services/v1/domain-verification/domains/{domain_id} \
  -H "X-API-Key: YOUR_API_KEY"

PATCH /v1/domain-verification/domains/

Revoke domain

Revoke a verified domain. Only status change to revoked is allowed.

Request Body:

FieldTypeDescription
statusstringValues: revoked

Response:

FieldTypeDescription
idstring
domainstringDomain name (normalized to lowercase/punycode)
purposestringValues: email, custom_host, webhook, link_branding, verify_channel, other
statusstringValues: pending, verified, failed, revoked
verification_methodstringValues: DNS_TXT, DNS_CNAME
verification_tokenstringToken to add to DNS record
dns_instructionsobjectInstructions for DNS setup
verification_attemptsinteger
verified_atstring
last_checked_atstring
failed_reasonstring
created_atstring

Example:

bash
curl -X PATCH https://api.wayscloud.services/v1/domain-verification/domains/{domain_id} \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

DELETE /v1/domain-verification/domains/

Delete domain

Delete a domain verification. This is a soft delete - records are preserved for audit.

Response:

FieldTypeDescription
successboolean
messagestring

Example:

bash
curl -X DELETE https://api.wayscloud.services/v1/domain-verification/domains/{domain_id} \
  -H "X-API-Key: YOUR_API_KEY"

POST /v1/domain-verification/domains/{domain_id}/verify

Verify domain

Trigger a DNS verification check for the domain.

Performs DNS lookup to verify that the required record exists. Returns the verification result immediately.

DNS record must be in place before calling this endpoint.

Response:

FieldTypeDescription
idstring
domainstring
statusstring
verifiedboolean
messagestring
dns_records_foundarray
checked_atstring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/domain-verification/domains/{domain_id}/verify \
  -H "X-API-Key: YOUR_API_KEY"

GET /v1/domain-verification/domains/{domain_id}/history

Get verification history

Get the verification history for a domain including all check attempts and status changes.

Response:

Example:

bash
curl https://api.wayscloud.services/v1/domain-verification/domains/{domain_id}/history \
  -H "X-API-Key: YOUR_API_KEY"

WAYSCloud AS