Sign inGet Started

List sending domains

GET
/v1/email/domains
for await (const domain of bird.domains.list()) {
  console.log(domain.id, domain.status);
}
Antwort200
{
  "data": [
    {
      "id": "dom_01krdgeqcxet5s7t44vh8rt9mg",
      "workspace_id": "ws_01krdgeqcxet5s7t44vh8rt9mg",
      "domain": "mail.acme.com",
      "vendor": "other",
      "status": "pending",
      "next": [
        {
          "kind": "operation"
        }
      ],
      "dkim": {
        "mode": "txt",
        "selector": "bird1",
        "key_size": 2048
      },
      "capabilities": {
        "sending": {
          "status": "verified",
          "pending": {
            "domain": "rp.mail.acme.com",
            "status": "pending"
          }
        },
        "return_path": {
          "status": "verified",
          "pending": {
            "domain": "rp.mail.acme.com",
            "status": "pending"
          }
        },
        "dmarc": {
          "status": "verified",
          "pending": {
            "domain": "rp.mail.acme.com",
            "status": "pending"
          }
        },
        "tracking": {
          "status": "verified",
          "pending": {
            "domain": "rp.mail.acme.com",
            "status": "pending"
          }
        },
        "inbound": {
          "status": "verified",
          "pending": {
            "domain": "rp.mail.acme.com",
            "status": "pending"
          }
        }
      },
      "receiving": {
        "state": "enabled"
      },
      "dns_records": [
        {
          "type": "TXT",
          "purpose": "dkim",
          "state": "active",
          "status": "pending"
        }
      ]
    }
  ],
  "next_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9",
  "prev_cursor": null,
  "refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE2OjQyOjAxWlwiIiwiaSI6IjAxOTJmM2IxLTllMDQtN2NkMy1iODE3LTJhNmY0ZDFjOGUwOSJ9"
}

Returns all sending domains for the current workspace, newest first by default. Each item is the full domain object, including capability statuses and dns_records, so no per-domain follow-up read is needed. Filter with name to find a specific domain.

Abfrageparameter

namestring

Substring match against the domain name (case-insensitive).

sortstring

Field to sort by. Defaults to created_at.

Possible values: created_at, name

orderstring

Sort direction. Defaults to desc, which sorts from newest to oldest or largest to smallest, depending on the selected sort field.

Possible values: asc, desc

limitinteger

Maximum number of items to return per page.

starting_afterstring

Cursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.

ending_beforestring

Cursor from the prev_cursor or refresh_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev_cursor returns the preceding page. refresh_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.

include_totalboolean

When true, the response includes a total field with the total number of items matching the request's filters across all pages.

Antwort-Payload

data
array of object
erforderlich

Page of sending domains, newest first by default.

Untergeordnete Attribute anzeigen
data.id
string
erforderlich
data.workspace_id
string
erforderlich
data.domain
string
erforderlich

The sending domain name. Set at creation and immutable.

data.vendor
string
erforderlich

The DNS provider hosting this domain's nameservers, so you know which provider's dashboard to manage the required DNS records in. Returns other when the provider has not been detected or is not recognized.

Possible values: other, cloudflare, route53, godaddy, namecheap, google, azure, digitalocean, squarespace

data.status
string
erforderlich

Domain ownership verification, proven by the DKIM record. Readiness to send or track is reported separately per capability under capabilities.*.status.

  • pending: the DKIM record has not been published yet.
  • verified: the DKIM record is in place; ownership is confirmed.
  • failed: a DKIM record exists but does not match the expected value (for example a stale record from an earlier setup), or a previously verified record was removed. Correct the record to recover.
  • temporary_failure: DNS resolution failed transiently, such as from a timeout or unreachable nameserver. Verification retries automatically; do not change the DNS records unless they are incorrect.
  • rejected: the domain was refused for policy reasons and cannot be used for sending. Contact support if you believe this is an error.

Possible values: pending, verified, failed, temporary_failure, rejected

data.settings
object
erforderlich

Per-domain behavior toggles. Changes apply immediately to new sends.

Untergeordnete Attribute anzeigen
data.next
array of object

What to do next about this domain, given the state it is in. Each entry names one action and says why it is worth taking, so you can act on this response without working out the order yourself. Present on reads that compute it: an empty list means there is nothing to do, and the field is absent entirely on responses that do not report next actions.

This answers whether you own the domain, which is what status reports. What each capability still needs before it can send or receive is reported separately under capabilities, so an empty list here does not on its own mean the domain is ready.

Untergeordnete Attribute anzeigen
data.dkim
object
erforderlich

Active DKIM signing configuration for the domain.

Untergeordnete Attribute anzeigen
data.capabilities
object
erforderlich
Untergeordnete Attribute anzeigen
data.receiving
object
erforderlich

Receiving state and whether it is managed from another workspace.

Untergeordnete Attribute anzeigen
data.dns_records
array of object
erforderlich

The domain's DNS records and their individual verification state, returned in full on both the list and single-domain responses. This is the complete set to publish across DKIM, return-path, DMARC, tracking, and inbound; records for a staged change carry state: pending. Inbound MX records are always included as a regional reference, even while receiving is off and capabilities.inbound.status is not_configured. Their presence alone does not mean receiving is enabled; see DomainUpdate.inbound.

Untergeordnete Attribute anzeigen
data.dns_records.type
string
erforderlich

The DNS record type to publish, determined by purpose.

  • TXT: used for the dkim and dmarc purposes.
  • CNAME: used for the return_path and tracking purposes.
  • MX: used for the inbound_mx purpose.

Possible values: TXT, CNAME, MX

data.dns_records.name
string
erforderlich

The record name: the part you enter in your DNS provider's Name or Host field, relative to the DNS zone the record belongs in (your registered domain). For a sending domain mail.acme.com the DKIM record name is bird1._domainkey.mail, entered in the acme.com zone. @ for records at the zone apex.

data.dns_records.host
string
erforderlich

The fully qualified hostname for this record (for example, bird1._domainkey.mail.acme.com).

data.dns_records.value
string
erforderlich

The value to publish, as entered in your DNS provider's Value or Content field. For TXT, enter the full record content. For CNAME, enter the target hostname. For MX, enter the priority followed by the mail server hostname.

data.dns_records.purpose
string
erforderlich

What this record is for.

  • dkim: signs outbound mail and proves domain ownership.
  • return_path: identifies the return-path (bounce) CNAME for sending.
  • tracking: identifies the optional branded open/click tracking CNAME.
  • inbound_mx: identifies the MX record routing mail to us for receiving. Always present wherever inbound is available, as a regional reference, regardless of whether receiving is enabled; publishing it does not enable receiving on its own: see DomainUpdate.inbound. It is optional until receiving is enabled, and publishing it before then is destructive: on a domain at the zone apex it replaces the MX records that carry the domain's existing mail.
  • dmarc: identifies the DMARC policy record required for sending.

Possible values: dkim, return_path, tracking, inbound_mx, dmarc

data.dns_records.state
string
erforderlich

Lifecycle state of this record.

  • active: the record backs the domain's current configuration.
  • pending: the record belongs to a staged configuration change; publish it to complete the change.
  • deprecated: the record belonged to a previous configuration. Keep it in DNS until safe_to_remove is true; in-flight mail and previously sent tracked links may still resolve through it.

Possible values: active, pending, deprecated

data.dns_records.optional
boolean
erforderlich

Whether this record can be skipped. An optional record enables extra functionality (branded tracking, or receiving) rather than sending, so publish one only when you want what it enables. The inbound_mx records are optional until you enable receiving on the domain, and publishing one before then changes where mail to the domain is delivered.

data.dns_records.status
string
erforderlich

Verification status of this record's most recent DNS check.

  • pending: the record has not verified yet; publish it (or correct it) and it verifies on the next check.
  • verified: the most recent check matched the expected value.
  • warning: the record verified before and a recent check no longer matched, but it is still within the grace period. Sending is not yet affected; fix the record before the grace period ends to avoid it being blocked.
  • failed: the record verified before but later checks kept failing past the grace period; the configuration has regressed and needs attention.

Possible values: pending, verified, warning, failed

data.dns_records.error
nullable string

Human-readable detail for a check that did not pass on this record: what was found in DNS and why it did not match. Also set while pending when the record is published but does not match the expected value, which is the case you can act on. null when the record is verified, when nothing is published at this name yet, or before the first check.

data.dns_records.safe_to_remove
nullable boolean

Only set on deprecated records: true once the record is no longer referenced by in-flight mail or live tracked links and can be deleted from your DNS. null on active and pending records.

data.last_checked_at
nullable string

When we last checked this domain's DNS records, whether or not the outcome changed. Updated on every verification: your manual refresh and the periodic automatic re-checks alike. null if the domain has never been checked.

data.verified_at
nullable string

When the domain's ownership was confirmed: the moment status became verified via the DKIM record. Unchanged by later re-checks while it stays verified. null if the domain has never been verified.

data.created_at
string
erforderlich

When the domain was added.

data.updated_at
string
erforderlich

When the domain's configuration was last changed (such as a settings or return-path change). Verification re-checks do not change this; see last_checked_at and verified_at for verification timing.

next_cursor
nullable string
erforderlich

Cursor for the next page. Pass back as starting_after to advance forward. null when no next page exists.

prev_cursor
nullable string
erforderlich

Cursor for the previous page. Pass back as ending_before to step backward. null when no previous page exists.

refresh_cursor
nullable string
erforderlich

Refresh anchor, the first row of this response. Pass back as ending_before to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-null whenever data is non-empty; null only on an empty page. Distinct from prev_cursor.

total
nullable integer

Total number of items matching the request's filters across all pages. Present only when include_total=true was passed, and omitted otherwise.

Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.