> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify an email domain

> Re-check the domain's DNS records and refresh its status. `404` only for a domain that is not this project's; `503 verification_unavailable` when the check could not run (nothing changed, retry). A domain with no DKIM records (`verifiable: false`) cannot verify whatever DNS says: verify runs the check (it may recover the records), and when the domain still has none it answers `409 domain_setup_failed` with the same `setupError` the domain carries.



## OpenAPI

````yaml /api-reference/v2/openapi.json post /v2/email-domains/{emailDomainId}/verify
openapi: 3.0.3
info:
  title: Zavu API v2
  version: 2.0.0
  description: >-
    The second version of the Zavu API. It runs on the same engine as /v1: the
    same API keys, the same per-project rate limit, the same sending limits,
    prices and reviews. /v1 keeps working unchanged, and you can mix calls to
    both.


    **Addresses, not senders.** /v2 has no sender object. Where a message leaves
    from is named the way the recipient sees it: an E.164 number, an email
    address, `@botname` for Telegram, `@username` for Instagram, the Facebook
    Page id for Messenger, and the literal `sms_oneway` for one-way SMS (sent
    from shared numbers, never a number of your own). `GET /v2/channels` lists
    one entry per (address, type); a number that carries WhatsApp and SMS is two
    entries with the same address.


    **What else changes.** No `Zavu-Sender` header (`from` or `conversationId`
    instead); every send reports how it was routed; one project webhook carries
    every event; every error is `{code, message, details}` at the root.


    **Wrong method.** A path under `/v2/messages`, `/v2/conversations`,
    `/v2/contacts`, `/v2/channels`, `/v2/templates`, `/v2/campaigns`,
    `/v2/agents`, `/v2/webhook` or `/v2/email-domains` called with a method it
    does not take answers `405 method_not_allowed`, with `details.allowed` and
    an `Allow` header.


    **Money.** Every amount is USD, rounded to 6 decimals.
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
tags:
  - name: Messages
    description: Send, list and read messages.
  - name: Conversations
    description: Inbox threads, one per contact across channels.
  - name: Contacts
    description: Contacts and the identifiers they are reached at.
  - name: Channels
    description: 'Where the project can send from: one entry per (address, type).'
  - name: Templates
    description: WhatsApp message templates.
  - name: Campaigns
    description: One message to many recipients.
  - name: Webhook
    description: The one project webhook for every event.
  - name: Agents
    description: AI agents and the addresses they answer on.
  - name: Numbers
    description: Search and buy phone numbers.
  - name: Email Domains
    description: Domains to send email from.
  - name: Functions
    description: Configure Zavu Functions.
paths:
  /v2/email-domains/{emailDomainId}/verify:
    post:
      tags:
        - Email Domains
      summary: Verify an email domain
      description: >-
        Re-check the domain's DNS records and refresh its status. `404` only for
        a domain that is not this project's; `503 verification_unavailable` when
        the check could not run (nothing changed, retry). A domain with no DKIM
        records (`verifiable: false`) cannot verify whatever DNS says: verify
        runs the check (it may recover the records), and when the domain still
        has none it answers `409 domain_setup_failed` with the same `setupError`
        the domain carries.
      operationId: verifyEmailDomainV2
      parameters:
        - name: emailDomainId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Re-checked.
          content:
            application/json:
              schema:
                type: object
                required:
                  - domain
                properties:
                  domain:
                    $ref: '#/components/schemas/EmailDomain'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '`Email domain not found`: not a domain of this project.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            `domain_setup_failed`: the domain has no DKIM records, so it cannot
            verify (`details.setupError`, `details.recommendation`: remove it
            and add it again, or contact support).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            `verification_unavailable`: the DNS check could not run. Nothing
            changed; retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    EmailDomain:
      type: object
      required:
        - id
        - domain
        - status
        - dkimStatus
      properties:
        id:
          type: string
          example: emd_abc123
        domain:
          type: string
          example: example.com
        status:
          type: string
          description: Overall verification status.
          example: pending
        dkimStatus:
          type: string
          example: not_started
        dnsRecords:
          type: array
          description: >-
            DNS records to publish. Present when fetching a single domain or
            after adding one.
          items:
            $ref: '#/components/schemas/EmailDomainDnsRecord'
        verifiable:
          type: boolean
          description: >-
            Present with `dnsRecords`. False when the DKIM records could not be
            generated: such a domain cannot verify whatever DNS you publish, and
            `setupError` says what to do.
        setupError:
          type: object
          description: >-
            Present when `verifiable` is false. `recommendation` is the same
            everywhere this domain is refused (`POST .../verify`, `POST
            /v2/channels`): remove the domain and add it again, which sets it up
            from scratch; contact support if the new one has no `dkim` record
            either. It never says to retry verify or to publish the other
            records.
          properties:
            code:
              type: string
              enum:
                - dkim_records_unavailable
            message:
              type: string
            recommendation:
              type: string
    Error:
      type: object
      required:
        - code
        - message
      description: >-
        Every v2 error has this shape at the root. There is no `{error: {...}}`
        wrapper anywhere in v2. A missing resource is `404 not_found` with the
        message `<Resource> not found`; an address the project does not have is
        `404 not_found`, `None of this project's channels has the address
        <address>.`, with the address in `details` under the name the request
        used (`from` or `address`). A `message` is written for the caller and
        never carries a stack trace or a source path. A body that is not JSON is
        `400 invalid_json`, with `details.errors` (`path: []`, the parse error
        in `message`).
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
        details:
          type: object
          additionalProperties: true
          description: >-
            Machine-readable context. Keys that mean the same thing everywhere:

            - `errors`: present on every `400 invalid_request` for an invalid
            body or query parameter, `[{path, message, ...}]`, `path` naming the
            field (`["to"]`, `["contacts", 2, "recipient"]`, `["limit"]`).

            - `recommendation`: one sentence saying what to do next.

            - `dashboardUrl`: the dashboard screen that fixes it.

            - `connect`: on `409 no_channel`, the channels this project can
            connect to reach the recipient, each `{type, request, note,
            available, dashboardUrl?}`; `request` is the exact call (`POST
            /v2/channels` with its body, or `POST /v2/numbers`), or null for a
            channel connected from the dashboard (WhatsApp, Instagram,
            Messenger). `available: false` says why in `note` (one-way SMS
            closed until business verification is approved).

            - `address` / `from`: the address the error is about, under the name
            the request used for it.
          properties:
            errors:
              type: array
              items:
                type: object
                required:
                  - path
                  - message
                properties:
                  path:
                    type: array
                    items:
                      oneOf:
                        - type: string
                        - type: integer
                  message:
                    type: string
                  code:
                    type: string
                additionalProperties: true
    EmailDomainDnsRecord:
      type: object
      required:
        - type
        - name
        - value
        - purpose
        - required
      properties:
        type:
          type: string
          description: DNS record type.
          example: CNAME
        name:
          type: string
          description: Record host/name to create.
        value:
          type: string
          description: Record value.
        priority:
          type: integer
          description: Priority (MX records only).
        purpose:
          type: string
          description: What the record is for.
          enum:
            - dkim
            - spf
            - dmarc
            - mail_from
        required:
          type: boolean
          description: >-
            Whether the record is required to verify + send (DKIM) or
            recommended for deliverability.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.