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

# Post v1voiceagentstest call



## OpenAPI

````yaml https://api.comm.com/docs/api.json post /v1/voice/agents/test-call
openapi: 3.1.0
info:
  title: Commvoice API
  version: '1'
servers:
  - url: https://api.comm.com/api
    description: Live
security:
  - http: []
paths:
  /v1/voice/agents/test-call:
    post:
      tags:
        - Agents
      operationId: agents.testCall
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                from_number:
                  type: integer
                to_number:
                  type: integer
                greeting_message:
                  type:
                    - string
                    - 'null'
                prompt:
                  type: string
                tools:
                  type:
                    - array
                    - 'null'
                  items:
                    type: string
                agent_id:
                  type: string
                voice_id:
                  type:
                    - string
                    - 'null'
                language:
                  type:
                    - string
                    - 'null'
              required:
                - from_number
                - to_number
                - prompt
                - agent_id
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      call_id:
                        type: string
                    required:
                      - call_id
                required:
                  - data
        '400':
          description: An error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error overview.
                    example: >-
                      Greeting message is required when start_with_greeting is
                      enabled.
                required:
                  - message
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
        '429':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      No available slots for calls. Please wait for current
                      calls to complete.
                required:
                  - error
        '500':
          description: ''
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                        example: Failed to create call
                    required:
                      - error
                  - type: object
                    properties:
                      error:
                        type: string
                    required:
                      - error
components:
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT

````