Skip to content

List Domains

GET
/v0/domains
curl -s "https://api.yoagent.dev/v0/domains" \
-H "Authorization: Bearer $YOAGENT_KEY"

List the organization’s mail domains (each project’s shared subdomain and its custom domains), newest first; project_id, kind and status narrow it.

limit
Limit
integer
default: 20 >= 1 <= 100

How many items a page holds.

page_token
Page Token
Any of:

The next_page_token of the previous page

string

The previous page’s next_page_token, for the page after it; omitted: the first page.

project_id
Project Id
Any of:
string
/^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$/

Only those of this project; omitted: of every project the caller sees.

kind
Kind
Any of:
DomainKind

Where a domain comes from: our shared domain or the customer’s own.

string
Allowed values: shared custom

Only the projects’ shared subdomains, or only the custom domains.

status
Status
Any of:
DomainStatus

Whether mail for the domain is accepted: pending (a custom domain waiting for its DNS records), verified (accepted), failed (its records were not found in time, or were lost: its failure says which).

string
Allowed values: pending verified failed

Only the domains in this status.

Successful Response

Media typeapplication/json
DomainList

A page of domains.

object
count
required
Count
integer
next_page_token
required
Next Page Token
Any of:
string
domains
required
Domains
Array<object>
DomainOut

A mail domain as the caller sees it: what it may do with it, and when mail to it stops being accepted.

object
version
required
Version

Goes up by one on every change: of two copies, the one with the higher version is the newer.

integer
domain_id
required
Domain Id
string
/^dom_[0-7][0-9a-hjkmnp-tv-z]{25}$/
project_id
required
Project Id
string
/^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$/
name
required
Name

Chosen by whoever added it (a person or another agent).

string
kind
required
DomainKind

Where a domain comes from: our shared domain or the customer’s own.

string
Allowed values: shared custom
status
required
DomainStatus

Whether mail for the domain is accepted: pending (a custom domain waiting for its DNS records), verified (accepted), failed (its records were not found in time, or were lost: its failure says which).

string
Allowed values: pending verified failed
failure
required

Why it is failed: a record missing (txt_missing, mx_missing), another MX beside ours (mx_foreign), or another organization holds the name (taken).

Any of:
DomainFailure

Why a custom domain is failed: what its DNS lacked at the last check, or that another organization holds the name.

string
Allowed values: txt_missing mx_missing mx_foreign taken
sending_status
required
SendingStatus

Whether its inboxes send: off; pending until SES finds its DKIM records; verified; failed — SES did not find them in time, or lost them (turn it off and on again).

string
Allowed values: off pending verified failed
records
required
Records

The records to add at the domain’s DNS host, each marked when the last check saw it (none for a shared domain).

Array<object>
DnsRecord

One DNS record the customer adds at their DNS host, and whether the last check that got an answer saw it.

object
key
required
RecordKey

What it is for: receiving (verification, mx), sending (dkim) or recommended for it — the bounce domain’s MX (mail_from) and SPF (spf), the domain’s DMARC (dmarc).

string
Allowed values: verification mx dkim mail_from spf dmarc
type
required
Type
string
Allowed values: TXT MX CNAME
name
required
Name

The record’s full name, without a trailing dot (the domain’s name: chosen by whoever added it).

string
value
required
Value
string
priority
Priority

An MX record’s priority.

Any of:
integer
found
required
Found

The last reading that got an answer saw it (an MX: only ours there); dkim and mail_from: as SES last saw them.

boolean
zone_file
required
Zone File

The same records as a zone file, for DNS hosts that import one (empty for a shared domain).

string
checked_at
required
Checked At
Any of:
string format: date-time
next_check_at
required
Next Check At

When its DNS is read next (null: no more checks — a shared domain, a claim given up).

Any of:
string format: date-time
failing_since
required
Failing Since

Since when a verified domain’s records are missing: three days later it is failed and mail to it refused.

Any of:
string format: date-time
verified_at
required
Verified At
Any of:
string format: date-time
fails_at
required
Fails At

When it fails unless its records are found by then (mail to it is refused from then on): a claim’s deadline, or a verified domain’s while its records are missing; null otherwise, and once it has passed (only a resolver that does not answer keeps the domain as it was).

Any of:
string format: date-time
editable
required
Editable

Whether the caller may check it now and turn its sending on or off (domain_update in its project; a custom domain only).

boolean
deletable
required
Deletable

Whether the caller may delete it with its inboxes (domain_delete in its project; a custom domain only).

boolean
sendable
required
Sendable

Whether its inboxes may send now: a custom domain’s sending verified on a plan that has it (the send refuses otherwise); a shared domain always.

boolean

Example

{
"count": 1,
"next_page_token": null,
"domains": [
{
"version": 1,
"domain_id": "dom_01je56wqswfmn9pgbc1wq8tjgq",
"project_id": "prj_01je56wqswfmn9pgbc1wq8tjgq",
"name": "mail.example.com",
"kind": "custom",
"status": "verified",
"failure": null,
"sending_status": "off",
"records": [
{
"key": "verification",
"type": "TXT",
"name": "_yoagent.mail.example.com",
"value": "yoagent-verification=4f8a2c9e1b7d3f6a0c5e8b2d9f1a4c7e",
"priority": null,
"found": true
},
{
"key": "mx",
"type": "MX",
"name": "mail.example.com",
"value": "mx.yoagent.email",
"priority": 10,
"found": true
}
],
"zone_file": "; DNS records for mail.example.com\n_yoagent.mail.example.com.\t3600\tIN\tTXT\t\"yoagent-verification=4f8a2c9e1b7d3f6a0c5e8b2d9f1a4c7e\"\nmail.example.com.\t3600\tIN\tMX\t10 mx.yoagent.email.\n",
"checked_at": "2026-12-01T12:00:00Z",
"next_check_at": "2026-12-01T18:00:00Z",
"failing_since": null,
"verified_at": "2026-12-01T12:00:00Z",
"fails_at": null,
"editable": true,
"deletable": true,
"sendable": false
}
]
}

An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.