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

# Dial outbound (Twilio or SIP trunk)

> Call a phone number with this agent. Provide `number` or `destination` (same meaning). Optionally use a SIP trunk, override the opening message or prompt, and pass variables in the request body.



## OpenAPI

````yaml post /v1/agents/{id}/dial
openapi: 3.0.3
info:
  title: Vatel AI REST API
  description: >-
    Programmatic access for agents, telephony, and session tokens. Send
    `Authorization: Bearer <organization API key>` on all requests unless noted.
    Most error responses return JSON with an `error` string message.
  version: 0.2.4
servers:
  - url: https://api.vatel.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: organization
    description: Organization tied to your API key
  - name: llms
    description: LLM model identifiers
  - name: voices
    description: TTS voice catalog
  - name: agents
    description: Agents, outbound dial, agent versions
  - name: twilio
    description: Imported Twilio phone numbers
  - name: sip-trunks
    description: SIP trunk configuration
  - name: session
    description: Session tokens and voice WebSocket connections.
  - name: calls
    description: Call history, recordings, and live eavesdrop for your organization
  - name: eavesdrop
    description: Listen to live calls and send supervisor commands over WebSocket.
paths:
  /v1/agents/{id}/dial:
    post:
      tags:
        - agents
      summary: Place an outbound call
      description: >-
        Call a phone number with this agent. Provide `number` or `destination`
        (same meaning). Optionally use a SIP trunk, override the opening message
        or prompt, and pass variables in the request body.
      operationId: dialAgent
      parameters:
        - name: id
          in: path
          required: true
          description: Agent id
          schema:
            type: string
            format: uuid
        - name: number
          in: query
          required: false
          description: Phone number to call. Same as `destination`.
          schema:
            type: string
        - name: destination
          in: query
          required: false
          description: Phone number to call. Same as `number`.
          schema:
            type: string
        - name: sipTrunkId
          in: query
          required: false
          description: SIP trunk to use for this call.
          schema:
            type: string
            format: uuid
        - name: callerId
          in: query
          required: false
          description: Caller ID to show the callee when using a SIP trunk.
          schema:
            type: string
        - name: firstMessage
          in: query
          required: false
          description: Override the agent's first message for this call.
          schema:
            type: string
        - name: prompt
          in: query
          required: false
          description: Override the agent's system prompt for this call.
          schema:
            type: string
      requestBody:
        required: false
        description: Optional. Pass `variables` for data the agent can use on this call.
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                variables:
                  type: array
                  description: Custom data for the agent on this call.
                  items:
                    $ref: '#/components/schemas/SessionTokenVariable'
      responses:
        '200':
          description: Outbound call accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DialAgentResponse'
        '400':
          description: >-
            Invalid request — check the phone number, parameters, and agent
            configuration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing Bearer token or invalid organization API key for this agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: This agent cannot use the requested SIP trunk.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Agent, inactive agent, phone number record, or SIP trunk not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server or telephony error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            Media or SIP credentials required for the trunk dial path are not
            configured on the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SessionTokenVariable:
      type: object
      additionalProperties: false
      required:
        - key
        - value
      properties:
        key:
          type: string
          description: Variable name.
        value:
          description: Variable value (string, boolean, or number).
          oneOf:
            - type: string
            - type: boolean
            - type: number
        dataType:
          type: string
          enum:
            - string
            - number
            - boolean
          readOnly: true
          description: >-
            Value type (`string`, `number`, or `boolean`). Returned in
            responses; omit when sending variables.
    DialAgentResponse:
      type: object
      description: Result of the dial request.
      required:
        - success
      properties:
        success:
          type: boolean
          description: Whether the call was accepted.
    ErrorResponse:
      type: object
      description: Standard error body for most non-2xx JSON responses on this API.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable message; may include validation detail.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Send your organization API key as `Authorization: Bearer <key>`.'

````