Skip to main content
PATCH
/
api
/
email
/
domains
/
{id}
Update an email domain's status
curl --request PATCH \
  --url https://app.puffle.ai/api/email/domains/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "pending"
}
'
{
  "domain": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "domain": "<string>",
    "agentmail_domain_id": "<string>",
    "status": "pending",
    "dns_records": [
      {
        "type": "<string>",
        "name": "<string>",
        "value": "<string>",
        "priority": 123
      }
    ],
    "verified_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Overview

Override the cached domain status. Intended for client-driven state changes like marking a domain failed after the frontend’s verification timeout elapses. This does NOT touch AgentMail or DNS — the next /verify or list sync will overwrite this value if the live AgentMail state disagrees.
This operation shares the URL path /api/email/domains/{id} with other verbs. See the sibling page for related operations on the same resource.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Email domain (email_domains.id) UUID.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json

Client-driven status override. Used primarily by the frontend polling loop to mark a domain failed after the verification timeout window elapses.

status
enum<string>
required

New lifecycle status. verified is NOT allowed via this endpoint — only the AgentMail-backed /verify endpoint can mark a domain verified.

Available options:
pending,
verifying,
failed

Response

Domain updated. Returns the full domain row.

domain
object
required

A custom sending domain. Domains are created in AgentMail, optionally auto-synced to Cloudflare, and then polled (via the domain-verify-poller background task) until AgentMail confirms DNS propagation.