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

# Edit a draft (only allowed while status='draft')



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/email/drafts/{draft_id}
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.21.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/email/drafts/{draft_id}:
    patch:
      tags:
        - email-drafts
      summary: Edit a draft (only allowed while status='draft')
      operationId: updateEmailDraft
      parameters:
        - name: draft_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Draft Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDraftRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DraftResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    UpdateDraftRequest:
      properties:
        subject:
          anyOf:
            - type: string
              maxLength: 998
              minLength: 1
            - type: 'null'
          title: Subject
        body_html:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Body Html
        body_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Text
        to:
          anyOf:
            - items:
                $ref: '#/components/schemas/EmailAddress'
              type: array
            - type: 'null'
          title: To
        cc:
          anyOf:
            - items:
                $ref: '#/components/schemas/EmailAddress'
              type: array
            - type: 'null'
          title: Cc
        bcc:
          anyOf:
            - items:
                $ref: '#/components/schemas/EmailAddress'
              type: array
            - type: 'null'
          title: Bcc
        reply_to:
          anyOf:
            - items:
                $ref: '#/components/schemas/EmailAddress'
              type: array
            - type: 'null'
          title: Reply To
      additionalProperties: false
      type: object
      title: UpdateDraftRequest
      description: |-
        Partial update — only fields explicitly set are touched. ``None``
        on an optional list is "no change"; passing an empty list clears that
        recipient list.
    DraftResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        session_id:
          type: string
          format: uuid
          title: Session Id
        account_id:
          type: string
          format: uuid
          title: Account Id
        agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent Id
        in_reply_to_turn_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: In Reply To Turn Id
        mode:
          $ref: '#/components/schemas/DraftMode'
        status:
          $ref: '#/components/schemas/DraftStatus'
        approval_state:
          $ref: '#/components/schemas/DraftApprovalState'
        subject:
          type: string
          title: Subject
        body_html:
          type: string
          title: Body Html
        body_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Text
        to:
          items:
            $ref: '#/components/schemas/EmailAddress'
          type: array
          title: To
        cc:
          items:
            $ref: '#/components/schemas/EmailAddress'
          type: array
          title: Cc
        bcc:
          items:
            $ref: '#/components/schemas/EmailAddress'
          type: array
          title: Bcc
        reply_to:
          items:
            $ref: '#/components/schemas/EmailAddress'
          type: array
          title: Reply To
        approved_by_member_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Approved By Member Id
        approved_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Approved At
        sent_turn_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Sent Turn Id
        evidence_snapshot:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Evidence Snapshot
        auto_send_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Auto Send Reason
        discarded_by_member_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Discarded By Member Id
        discarded_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Discarded At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      additionalProperties: false
      type: object
      required:
        - id
        - organization_id
        - session_id
        - account_id
        - agent_id
        - in_reply_to_turn_id
        - mode
        - status
        - approval_state
        - subject
        - body_html
        - body_text
        - to
        - cc
        - bcc
        - reply_to
        - approved_by_member_id
        - approved_at
        - sent_turn_id
        - evidence_snapshot
        - auto_send_reason
        - discarded_by_member_id
        - discarded_at
        - created_at
        - updated_at
      title: DraftResponse
      description: |-
        One draft row, including the v1 audit snapshot when present.

        ``evidence_snapshot`` is exposed as the raw dict from
        ``metadata_["evidence_snapshot"]`` — the shape is captured by
        ``EVIDENCE_SCHEMA_VERSION`` so consumers can branch on it.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EmailAddress:
      properties:
        address:
          type: string
          maxLength: 320
          pattern: ^[^@\s]+@[^@\s]+\.[^@\s]+$
          title: Address
        name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Name
      additionalProperties: false
      type: object
      required:
        - address
      title: EmailAddress
      description: A single RFC 5321 mailbox + optional display name.
    DraftMode:
      type: string
      enum:
        - human_only
        - copilot
      title: DraftMode
    DraftStatus:
      type: string
      enum:
        - draft
        - submitted
        - approved
        - sending
        - sent
        - failed
        - discarded
      title: DraftStatus
    DraftApprovalState:
      type: string
      enum:
        - unsubmitted
        - pending
        - approved
        - rejected
        - auto_approved
      title: DraftApprovalState
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````