Domain Verification API
Verify domain ownership via DNS for email sending, custom hostnames, webhooks, and more.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /v1/domain-verification/domains | Register domain |
GET | /v1/domain-verification/domains | List 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}/verify | Verify domain |
GET | /v1/domain-verification/domains/{domain_id}/history | Get 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 domaincustom_host- For custom hostnames/CNAMEswebhook- For webhook endpoint verificationlink_branding- For branded tracking linksverify_channel- For communication channel verificationother- General domain ownership verification
Request Body:
| Field | Type | Description |
|---|---|---|
domain | string | Required. Domain to verify (e.g., example.com) |
purpose | string | Required. Values: email, custom_host, webhook, link_branding, verify_channel, other |
verification_method | string | Values: DNS_TXT, DNS_CNAME |
metadata | object | Optional metadata |
Example:
{
"domain": "example.com",
"purpose": "email",
"verification_method": "DNS_TXT"
}Response:
| Field | Type | Description |
|---|---|---|
id | string | |
domain | string | Domain name (normalized to lowercase/punycode) |
purpose | string | Values: email, custom_host, webhook, link_branding, verify_channel, other |
status | string | Values: pending, verified, failed, revoked |
verification_method | string | INTERNAL_DNS_AUTHORITY when the domain is hosted in WAYSCloud DNS and verified without a record Values: DNS_TXT, DNS_CNAME, INTERNAL_DNS_AUTHORITY |
verification_token | string | Token to add to the DNS record; null for INTERNAL_DNS_AUTHORITY |
instructions | object | DNS setup instructions |
internal_dns_zone_id | string | Your WAYSCloud DNS zone, when verified through INTERNAL_DNS_AUTHORITY |
dns_challenge | string | Same as verification_token |
dns_record_name | string | Same as instructions.record_name |
verification_attempts | integer | |
verified_at | string | |
last_checked_at | string | |
failed_reason | string | |
created_at | string | |
updated_at | string | |
metadata | object |
Example:
curl -X POST https://api.wayscloud.services/v1/domain-verification/domains \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com",
"purpose": "email",
"verification_method": "DNS_TXT"
}'Response:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domain": "example.com",
"purpose": "email",
"status": "pending",
"verification_method": "DNS_TXT",
"verification_token": "abc123xyz789",
"instructions": {
"method": "DNS_TXT",
"record_type": "TXT",
"record_name": "_wayscloud.example.com",
"record_value": "wayscloud-domain-verification=abc123xyz789",
"ttl_recommendation": 300,
"example_bind": "_wayscloud.example.com. 300 IN TXT \"wayscloud-domain-verification=abc123xyz789\"",
"auto_verified": false,
"message": null,
"cname_record_name": null,
"cname_record_value": null,
"cname_example_bind": null
},
"internal_dns_zone_id": null,
"dns_challenge": "abc123xyz789",
"dns_record_name": "_wayscloud.example.com",
"verification_attempts": 0,
"verified_at": null,
"last_checked_at": null,
"failed_reason": null,
"created_at": "2025-12-08T10:00:00Z",
"updated_at": null,
"metadata": {}
}GET /v1/domain-verification/domains
List domains
List all domain verifications for your account. Supports filtering by purpose and status.
Response:
| Field | Type | Description |
|---|---|---|
domains | array | |
total | integer | |
page | integer | |
page_size | integer |
Example:
curl https://api.wayscloud.services/v1/domain-verification/domains \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
{
"domains": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domain": "example.com",
"purpose": "email",
"status": "verified"
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"domain": "app.example.com",
"purpose": "custom_host",
"status": "pending"
}
],
"total": 2,
"page": 1,
"page_size": 20
}GET /v1/domain-verification/domains/
Get domain details
Get details for a specific domain verification including DNS instructions.
Response:
| Field | Type | Description |
|---|---|---|
id | string | |
domain | string | Domain name (normalized to lowercase/punycode) |
purpose | string | Values: email, custom_host, webhook, link_branding, verify_channel, other |
status | string | Values: pending, verified, failed, revoked |
verification_method | string | INTERNAL_DNS_AUTHORITY when the domain is hosted in WAYSCloud DNS and verified without a record Values: DNS_TXT, DNS_CNAME, INTERNAL_DNS_AUTHORITY |
verification_token | string | Token to add to the DNS record; null for INTERNAL_DNS_AUTHORITY |
instructions | object | DNS setup instructions |
internal_dns_zone_id | string | Your WAYSCloud DNS zone, when verified through INTERNAL_DNS_AUTHORITY |
dns_challenge | string | Same as verification_token |
dns_record_name | string | Same as instructions.record_name |
verification_attempts | integer | |
verified_at | string | |
last_checked_at | string | |
failed_reason | string | |
created_at | string | |
updated_at | string | |
metadata | object |
Example:
curl https://api.wayscloud.services/v1/domain-verification/domains/{domain_id} \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domain": "example.com",
"purpose": "email",
"status": "pending",
"verification_method": "DNS_TXT",
"verification_token": "abc123xyz789",
"instructions": {
"method": "DNS_TXT",
"record_type": "TXT",
"record_name": "_wayscloud.example.com",
"record_value": "wayscloud-domain-verification=abc123xyz789",
"ttl_recommendation": 300,
"example_bind": "_wayscloud.example.com. 300 IN TXT \"wayscloud-domain-verification=abc123xyz789\"",
"auto_verified": false,
"message": null,
"cname_record_name": null,
"cname_record_value": null,
"cname_example_bind": null
},
"internal_dns_zone_id": null,
"dns_challenge": "abc123xyz789",
"dns_record_name": "_wayscloud.example.com",
"verification_attempts": 0,
"verified_at": null,
"last_checked_at": null,
"failed_reason": null,
"created_at": "2025-12-08T10:00:00Z",
"updated_at": null,
"metadata": {}
}PATCH /v1/domain-verification/domains/
Revoke domain
Revoke a verified domain. Only status change to revoked is allowed.
Request Body:
| Field | Type | Description |
|---|---|---|
status | string | Values: revoked |
metadata | object | Replace the metadata stored on the verification |
Response:
| Field | Type | Description |
|---|---|---|
id | string | |
domain | string | Domain name (normalized to lowercase/punycode) |
purpose | string | Values: email, custom_host, webhook, link_branding, verify_channel, other |
status | string | Values: pending, verified, failed, revoked |
verification_method | string | INTERNAL_DNS_AUTHORITY when the domain is hosted in WAYSCloud DNS and verified without a record Values: DNS_TXT, DNS_CNAME, INTERNAL_DNS_AUTHORITY |
verification_token | string | Token to add to the DNS record; null for INTERNAL_DNS_AUTHORITY |
instructions | object | DNS setup instructions |
internal_dns_zone_id | string | Your WAYSCloud DNS zone, when verified through INTERNAL_DNS_AUTHORITY |
dns_challenge | string | Same as verification_token |
dns_record_name | string | Same as instructions.record_name |
verification_attempts | integer | |
verified_at | string | |
last_checked_at | string | |
failed_reason | string | |
created_at | string | |
updated_at | string | |
metadata | object |
Example:
curl -X PATCH https://api.wayscloud.services/v1/domain-verification/domains/{domain_id} \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"status": "revoked"
}'Response:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domain": "example.com",
"purpose": "email",
"status": "pending",
"verification_method": "DNS_TXT",
"verification_token": "abc123xyz789",
"instructions": {
"method": "DNS_TXT",
"record_type": "TXT",
"record_name": "_wayscloud.example.com",
"record_value": "wayscloud-domain-verification=abc123xyz789",
"ttl_recommendation": 300,
"example_bind": "_wayscloud.example.com. 300 IN TXT \"wayscloud-domain-verification=abc123xyz789\"",
"auto_verified": false,
"message": null,
"cname_record_name": null,
"cname_record_value": null,
"cname_example_bind": null
},
"internal_dns_zone_id": null,
"dns_challenge": "abc123xyz789",
"dns_record_name": "_wayscloud.example.com",
"verification_attempts": 0,
"verified_at": null,
"last_checked_at": null,
"failed_reason": null,
"created_at": "2025-12-08T10:00:00Z",
"updated_at": null,
"metadata": {}
}DELETE /v1/domain-verification/domains/
Delete domain
Delete a domain verification. This is a soft delete - records are preserved for audit.
Response:
| Field | Type | Description |
|---|---|---|
message | string |
Example:
curl -X DELETE https://api.wayscloud.services/v1/domain-verification/domains/{domain_id} \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
{
"message": "Domain verification deleted"
}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:
| Field | Type | Description |
|---|---|---|
id | string | |
domain | string | |
status | string | |
verified | boolean | |
message | string | |
dns_records_found | array | |
checked_at | string |
Example:
curl -X POST https://api.wayscloud.services/v1/domain-verification/domains/{domain_id}/verify \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"domain": "example.com",
"status": "verified",
"verified": true,
"message": "Domain verified successfully",
"dns_records_found": [
"wayscloud-domain-verification=abc123xyz789"
],
"checked_at": "2025-12-08T10:30:00Z"
}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:
[
{
"id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"event_type": "check_completed",
"previous_status": "pending",
"new_status": "verified",
"dns_response": {
"records_found": true,
"actual_values": [
"wayscloud-domain-verification=abc123xyz789"
]
},
"performed_by": "api",
"created_at": "2025-12-08T10:30:00Z"
}
]Example:
curl https://api.wayscloud.services/v1/domain-verification/domains/{domain_id}/history \
-H "X-API-Key: wayscloud_pat_abc12_YOUR_SECRET"Response:
[
{
"id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"event_type": "check_completed",
"previous_status": "pending",
"new_status": "verified",
"dns_response": {
"records_found": true,
"actual_values": [
"wayscloud-domain-verification=abc123xyz789"
]
},
"performed_by": "api",
"created_at": "2025-12-08T10:30:00Z"
}
]