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

# Update Domain Status

> Override the cached domain status.

**CLI:**

```bash theme={null}
puffle email domain update --id <id> --status <status>
```

## 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 DNS or the backing verification service; the next `/verify` or list sync will overwrite this value if live state disagrees.

<Note>
  This operation shares the URL path `/api/email/domains/{id}` with other verbs. See [the sibling page](/api-reference/senders/delete-email-domain) for related operations on the same resource.
</Note>


## OpenAPI

````yaml patch /api/email/domains/{id}
openapi: 3.0.3
info:
  title: Puffle API
  version: 1.0.0
  description: >-
    HTTP API for the Puffle GTM platform - Feed and Lead Finder search
    preparation, campaign-backed Outbound execution, Puffle Agent runs, sender
    management, and Unibox reply workflows. Designed for operation by both
    humans and autonomous AI agents. Agents should start at the [Agent
    Playbook](/guides/agent-playbook) which prescribes a workspace-context check
    (`GET /api/context`) and core user journeys with exact call ordering.
  contact:
    name: Puffle Support
    url: https://puffle.ai
servers:
  - url: https://app.puffle.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Campaigns
    description: >-
      Campaign-backed Outbound execution. These endpoints manage draft,
      launching, active, paused, and completed Outbound runs with sequence
      nodes, contacts, and sender accounts.
  - name: Accounts
    description: Signed-in user account, settings, and workspace context endpoints.
  - name: Billing
    description: Billing customer portal and account billing endpoints.
  - name: Senders
    description: >-
      Connected sender accounts, email inboxes, sending domains, DNS
      verification, warmup, and sender capacity.
  - name: Socials
    description: >-
      Read connected LinkedIn and X accounts, review current and archived posts,
      and reconcile publication status. Creating, editing, scheduling,
      publishing, OAuth connection, analytics, and mentions remain
      dashboard-managed workflows and are not part of the public Bearer-token
      API.
paths:
  /api/email/domains/{id}:
    patch:
      tags:
        - Senders
      summary: Update Domain Status
      description: >-
        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 DNS or the backing verification
        service; the next `/verify` or list sync will overwrite this value if
        live state disagrees.
      operationId: updateEmailDomain
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            description: Email domain (`email_domains.id`) UUID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - pending
                    - verifying
                    - failed
                  description: >-
                    New lifecycle status. `verified` is NOT allowed via this
                    endpoint — only the `/verify` endpoint can mark a domain
                    verified.
              required:
                - status
              additionalProperties: false
              description: >-
                Client-driven status override. Used primarily by the frontend
                polling loop to mark a domain `failed` after the verification
                timeout window elapses.
      responses:
        '200':
          description: Domain updated. Returns the full domain row.
          content:
            application/json:
              schema:
                type: object
                properties:
                  domain:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      user_id:
                        type: string
                        format: uuid
                      domain:
                        type: string
                      status:
                        type: string
                        enum:
                          - pending
                          - verifying
                          - verified
                          - failed
                    required:
                      - id
                      - user_id
                      - domain
                      - status
                    additionalProperties: {}
                    description: Updated email domain row.
                required:
                  - domain
                additionalProperties: false
        '400':
          description: Missing or unsupported `status` value.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '401':
          description: Missing or invalid Bearer token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: >-
            Domain doesn't exist, isn't owned by the caller, or the update
            failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pk_live_...

````