# Initiate Call Test

> POST /api/v1/public/agent/test/{uuid} — request parameters and responses from the Menace Voice API schema.

`POST /api/v1/public/agent/test/{uuid}`

{/* Generated by scripts/sync_docs_api.mjs. Edit the API schema source to change the contract. */}

See [authentication](/api-reference/authentication) for workspace API access. Public embed and artifact endpoints use their documented session or access tokens.

## API contract for documentation tools

Generated from the OpenAPI schema. Do not infer a different parameter type from an example. Authentication headers are alternatives as explained in the authentication guide.

### Parameters

| Name | Location | Type | Required | Description and constraints |
| --- | --- | --- | --- | --- |
| uuid | path | string | yes |  |
| X-API-Key | header | string | yes |  |

### Request body: application/json

Required body. Schema: TriggerCallRequest (object).

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| phone_number | string | yes |  |
| initial_context | object or null | no |  |
| telephony_configuration_id | integer or null | no |  |
| from_phone_number_id | integer or null | no |  |

### Response 200

Successful Response

application/json: TriggerCallResponse (object).

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| status | string | yes |  |
| workflow_run_id | integer | yes |  |
| workflow_run_name | string | yes |  |

### Response 404

Not found

### Response 422

Validation Error

application/json: HTTPValidationError (object).

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| detail | array of ValidationError (object) | no |  |

## OpenAPI

````yaml api-reference/openapi.json post /api/v1/public/agent/test/{uuid}
openapi: 3.1.0
info:
  title: Menace Voice API
  description: API for Menace Voice agents
  version: 1.0.0
servers:
  - url: https://voice.menaceui.com
    description: Production
  - url: http://localhost:8000
    description: Local development
paths:
  /api/v1/public/agent/test/{uuid}:
    post:
      tags:
        - main
      summary: Initiate Call Test
      description: |-
        Initiate a phone call against the latest draft of the agent.

        Useful for verifying changes before publishing. Falls back to the
        published definition when no draft exists.
      operationId: initiate_call_test_api_v1_public_agent_test__uuid__post
      parameters:
        - name: uuid
          in: path
          required: true
          schema:
            type: string
            title: Uuid
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/TriggerCallRequest"
      responses:
        "200":
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TriggerCallResponse"
        "404":
          description: Not found
        "422":
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HTTPValidationError"
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: "#/components/schemas/ValidationError"
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TriggerCallRequest:
      properties:
        phone_number:
          type: string
          title: Phone Number
        initial_context:
          anyOf:
            - additionalProperties: true
              type: object
            - type: "null"
          title: Initial Context
        telephony_configuration_id:
          anyOf:
            - type: integer
            - type: "null"
          title: Telephony Configuration Id
        from_phone_number_id:
          anyOf:
            - type: integer
            - type: "null"
          title: From Phone Number Id
      type: object
      required:
        - phone_number
      title: TriggerCallRequest
      description: Request model for triggering a call via API
    TriggerCallResponse:
      properties:
        status:
          type: string
          title: Status
        workflow_run_id:
          type: integer
          title: Workflow Run Id
        workflow_run_name:
          type: string
          title: Workflow Run Name
      type: object
      required:
        - status
        - workflow_run_id
        - workflow_run_name
      title: TriggerCallResponse
      description: Response model for successful call initiation
    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
````
