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

# Test Agent Draft

> Run a dry-run draft reply for the test panel (no WhatsApp send).



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/agents/{agent_id}/test-draft
openapi: 3.1.0
info:
  title: wazzapi Public API
  description: >-
    Public API surface for external API-key clients. Only stable /api/v1
    endpoints are included.


    ## Webhook deliveries

    This reference also includes the webhook requests Wazzapi sends to your
    endpoint for incoming messages, message status updates, and device status
    changes. See the `Incoming webhooks` section in the sidebar for headers,
    payload fields, and concrete examples.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Incoming webhooks
    description: >-
      POST deliveries that Wazzapi sends to your webhook endpoint after you
      subscribe to supported events. Verify the signature against the raw body
      and return a 2xx response quickly.
paths:
  /api/v1/agents/{agent_id}/test-draft:
    post:
      tags:
        - agents
      summary: Test Agent Draft
      description: Run a dry-run draft reply for the test panel (no WhatsApp send).
      operationId: test_agent_draft_api_v1_agents__agent_id__test_draft_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: Authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentTestDraftRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentTestDraftResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgentTestDraftRequest:
      properties:
        inbound_text:
          type: string
          maxLength: 4096
          minLength: 1
          title: Inbound Text
        customer_name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Customer Name
        customer_phone:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Customer Phone
        customer_tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Customer Tags
      type: object
      required:
        - inbound_text
      title: AgentTestDraftRequest
      description: Run a dry-run draft for the test panel (no WhatsApp send).
    AgentTestDraftResponse:
      properties:
        status:
          type: string
          title: Status
        draft:
          anyOf:
            - type: string
            - type: 'null'
          title: Draft
        validated_reply:
          anyOf:
            - type: string
            - type: 'null'
          title: Validated Reply
        skip_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Skip Reason
        escalate:
          type: boolean
          title: Escalate
          default: false
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        latency_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Latency Ms
      type: object
      required:
        - status
      title: AgentTestDraftResponse
      description: Result of a test draft run.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````