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

# Initiate an outbound AI voice call

> Places an outbound call to a contact using the configured AI voice provider (currently ElevenLabs over Sinch EST). Resolves or creates the contact, picks a voice-enabled agent (Prompt), picks an AI-enabled Sinch number to call from, and asks the provider to dial. Guarded by a 30s Redis idempotency lock keyed on user+contact+agent+toNumber; concurrent retries return 429 with `OUTBOUND_IN_FLIGHT`. Caches conversation context for the post-call webhook.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/calls/ai/outbound
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/calls/ai/outbound:
    post:
      tags:
        - Calls
      summary: Initiate an outbound AI voice call
      description: >-
        Places an outbound call to a contact using the configured AI voice
        provider (currently ElevenLabs over Sinch EST). Resolves or creates the
        contact, picks a voice-enabled agent (Prompt), picks an AI-enabled Sinch
        number to call from, and asks the provider to dial. Guarded by a 30s
        Redis idempotency lock keyed on user+contact+agent+toNumber; concurrent
        retries return 429 with `OUTBOUND_IN_FLIGHT`. Caches conversation
        context for the post-call webhook.
      operationId: post_calls_ai_outbound
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallsInitiateOutboundAiCallRequest'
      responses:
        '200':
          description: AI call initiated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsOutboundAiCallResponse'
        '400':
          description: Missing contact/phone, agent not synced, or no AI-enabled number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsErrorResponse'
        '404':
          description: Contact or user not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsErrorResponse'
        '429':
          description: Duplicate outbound dial in flight
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsErrorResponse'
        '500':
          description: Provider failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CallsInitiateOutboundAiCallRequest:
      type: object
      description: >-
        Either `contactId` or `phoneNumber` must be supplied. `phoneNumber` will
        find-or-create a contact.
      properties:
        contactId:
          type: string
        phoneNumber:
          type: string
          description: E.164 phone number (the `+` prefix will be added if missing).
        agentId:
          type: string
          description: >-
            Prompt._id — ElevenLabs-synced voice agent to use. Defaults to the
            first voice-enabled agent in the org.
        fromNumber:
          type: string
          description: >-
            Specific Sinch number to call from. Defaults to the first AI-enabled
            Sinch number in the user's `voicePhoneNumbers`.
        callReason:
          type: string
          description: >-
            Free-text context passed to the agent as the `call_reason` dynamic
            variable.
      additionalProperties: true
      example:
        contactId: 64f0a1b2c3d4e5f6a7b8c9d0
        agentId: 64f0a1b2c3d4e5f6a7b8cc00
        fromNumber: '+14165550100'
        callReason: Follow up on insurance quote
    CallsOutboundAiCallResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        conversationId:
          type: string
          description: ElevenLabs conversation ID for the placed call.
        sipCallId:
          type: string
        message:
          type: string
        deduplicated:
          type: boolean
          description: >-
            True when the request matched an in-flight idempotency lock and the
            cached conversationId/sipCallId is returned.
      required:
        - success
      additionalProperties: true
      example:
        success: true
        conversationId: eleven-conv-abc123
        sipCallId: sip-call-xyz789
        message: AI call initiated
        deduplicated: false
    CallsErrorResponse:
      type: object
      description: >-
        Error envelope used across most calls endpoints. Some endpoints wrap a
        string error; validation endpoints (parseContractInput) return a
        structured `error` object with `code` and `details`.
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          oneOf:
            - type: string
            - type: object
              properties:
                code:
                  type: string
                message:
                  type: string
                details:
                  type: array
                  items:
                    type: object
                    additionalProperties: true
              additionalProperties: true
        code:
          type: string
          description: >-
            Stable error code on certain errors (e.g. `NUMBER_NOT_ON_TRUNK`,
            `AGENT_NOT_SYNCED`, `OUTBOUND_IN_FLIGHT`).
      additionalProperties: true
      example:
        success: false
        error: Call not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````