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

# Dispatch call

> Dispatch an outbound call for a voice agent.

Note: outbound calls require the agent to be configured with an outbound connection.




## OpenAPI

````yaml /api-reference/agents/agents.oas.yaml post /v1/agents/{agent_id}/calls
openapi: 3.0.3
info:
  title: SLNG Voice Agents API
  version: 1.0.0
  description: >
    Public API for managing Voice Agents, dispatching outbound calls, and
    creating web (non-telephony) sessions.


    Base URL: `https://api.agents.slng.ai`
  contact:
    name: SLNG Support
    email: support@slng.ai
servers:
  - url: https://api.agents.slng.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Voice agent CRUD.
  - name: Calls
    description: Call dispatch and status.
  - name: Sessions
    description: Web (non-telephony) sessions.
paths:
  /v1/agents/{agent_id}/calls:
    parameters:
      - $ref: '#/components/parameters/AgentIdPath'
    post:
      tags:
        - Calls
      summary: Dispatch call
      description: >
        Dispatch an outbound call for a voice agent.


        Note: outbound calls require the agent to be configured with an outbound
        connection.
      operationId: dispatchCall
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentCallCreate'
      responses:
        '200':
          description: Call dispatched.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentCallResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                outbound-telephony-not-configured:
                  summary: Agent is missing an outbound connection
                  value:
                    detail: >-
                      Outbound telephony is not configured for this agent
                      (missing outbound connection).
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          description: Payment required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                insufficient-credits:
                  summary: Organisation balance is depleted
                  value:
                    detail: >-
                      Insufficient credit balance. Please top up credits or
                      upgrade your plan.
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid-phone-number:
                  summary: Phone number failed request validation
                  value:
                    detail:
                      - loc:
                          - body
                          - phone_number
                        msg: String should match pattern '^\\+[1-9]\\d{1,14}$'
                        type: string_pattern_mismatch
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          description: Bad gateway.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                call-dispatch-failed:
                  summary: Upstream dispatch failure
                  value:
                    detail: 'Failed to dispatch call: upstream dispatcher unavailable'
components:
  parameters:
    AgentIdPath:
      name: agent_id
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
      description: Voice agent ID.
  schemas:
    AgentCallCreate:
      type: object
      additionalProperties: false
      required:
        - phone_number
      properties:
        phone_number:
          type: string
          description: E.164 format phone number or template that resolves to E.164.
        arguments:
          type: object
          maxProperties: 32
          additionalProperties:
            type: string
            maxLength: 1024
          default: {}
          description: >-
            Per-call template argument overrides. Maximum 32 keys. Each value
            may be up to 1024 characters. Combined value payload may not exceed
            8192 characters.
    AgentCallResponse:
      type: object
      additionalProperties: false
      required:
        - call_id
        - message
      properties:
        call_id:
          $ref: '#/components/schemas/UUID'
        message:
          type: string
          example: Call dispatched successfully
    ErrorResponse:
      type: object
      additionalProperties: true
      description: >
        Error payloads can vary depending on where the error is raised (edge
        gateway vs backend).


        Common shapes include:

        - `{ "error": "message" }`

        - `{ "detail": "message" }`

        - `{ "detail": [ { "loc": [...], "msg": "...", "type": "..." } ] }`
        (validation)
      properties:
        error:
          type: string
        detail:
          oneOf:
            - type: string
            - type: array
              items:
                type: object
    UUID:
      type: string
      format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
  responses:
    UnauthorizedError:
      description: Unauthorized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            unauthorized:
              summary: Authentication failed
              value:
                detail: Authentication is required for this endpoint.
    ForbiddenError:
      description: Forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            forbidden:
              summary: Access denied
              value:
                detail: You do not have access to this resource.
    NotFoundError:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            not-found:
              summary: Resource not found
              value:
                detail: The requested resource was not found.
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal-server-error:
              summary: Unexpected application error
              value:
                detail: An unexpected internal error occurred.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````