> ## 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.

# Record an outbound SDK call (browser to phone)

> Persists a `Call` record (and conversation, if a contact is resolved) for a browser-initiated outbound call placed via the active voice provider's SDK. Either `contactId` or `phoneNumber` must be provided; if both are absent the request is rejected. Emits the `call_initiated` socket event.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/calls/sdk/initiate
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/sdk/initiate:
    post:
      tags:
        - Calls
      summary: Record an outbound SDK call (browser to phone)
      description: >-
        Persists a `Call` record (and conversation, if a contact is resolved)
        for a browser-initiated outbound call placed via the active voice
        provider's SDK. Either `contactId` or `phoneNumber` must be provided; if
        both are absent the request is rejected. Emits the `call_initiated`
        socket event.
      operationId: post_calls_sdk_initiate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallsInitiateSdkCallRequest'
      responses:
        '200':
          description: Call record created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsCallSuccessResponse'
        '400':
          description: Validation failure or contactId/phoneNumber missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CallsInitiateSdkCallRequest:
      type: object
      description: At least one of `contactId` or `phoneNumber` must be provided.
      properties:
        contactId:
          type: string
          description: >-
            Contact ObjectId to dial; the contact's phone number is used as the
            destination.
        phoneNumber:
          type: string
          description: >-
            Destination number in E.164; if no contact matches, the call is
            recorded without one.
      anyOf:
        - required:
            - contactId
        - required:
            - phoneNumber
      additionalProperties: true
      example:
        contactId: 64f0a1b2c3d4e5f6a7b8c9d0
        phoneNumber: '+14165550199'
    CallsCallSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        call:
          $ref: '#/components/schemas/CallDocument'
        message:
          type: string
      required:
        - success
      additionalProperties: true
      example:
        success: true
        call:
          _id: 64f0a1b2c3d4e5f6a7b8cb00
          callId: 64f0a1b2c3d4e5f6a7b8cb00
          provider: sinch
          direction: outbound
          status: initiated
          from: '+14165550100'
          to: '+14165550199'
        message: Call recorded
    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
    CallDocument:
      type: object
      description: >-
        A `Call` document. Many fields are provider-specific; clients should be
        tolerant of additional properties.
      properties:
        _id:
          type: string
        callId:
          type: string
        provider:
          type: string
          enum:
            - twilio
            - sinch
            - elevenlabs
            - external
        providerCallId:
          type: string
        direction:
          type: string
          enum:
            - inbound
            - outbound
        status:
          type: string
          description: >-
            e.g. initiated, ringing, in-progress, answered, completed,
            no-answer, busy, failed.
        from:
          type: string
        to:
          type: string
        contactId:
          description: >-
            ObjectId or populated Contact subset (firstName, lastName,
            phoneNumber, email).
        conversationId:
          type: string
        organizationId:
          type: string
        userId:
          description: ObjectId or populated User subset (fullName, email).
        providerPhoneNumber:
          type: string
        startTime:
          type: string
          format: date-time
        answerTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        duration:
          type: number
        recordings:
          type: array
          items:
            type: object
            additionalProperties: true
        aiAgentId:
          type: string
        aiTranscript:
          type: array
          items:
            type: object
            additionalProperties: true
        aiSummary:
          type: string
        aiHandledDuration:
          type: number
        metadata:
          type: object
          additionalProperties: true
        providerMetadata:
          type: object
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: true
      example:
        _id: 64f0a1b2c3d4e5f6a7b8cb00
        callId: 64f0a1b2c3d4e5f6a7b8cb00
        provider: sinch
        providerCallId: sinch-call-abc123
        direction: outbound
        status: completed
        from: '+14165550100'
        to: '+14165550199'
        contactId: 64f0a1b2c3d4e5f6a7b8c9d0
        conversationId: 64f0a1b2c3d4e5f6a7b8c9e0
        organizationId: 64f0a1b2c3d4e5f6a7b8c9d3
        userId: 64f0a1b2c3d4e5f6a7b8c9d4
        providerPhoneNumber: '+14165550100'
        startTime: '2026-05-15T09:10:00.000Z'
        answerTime: '2026-05-15T09:10:08.000Z'
        endTime: '2026-05-15T09:12:34.000Z'
        duration: 154
        recordings: []
        createdAt: '2026-05-15T09:10:00.000Z'
        updatedAt: '2026-05-15T09:12:34.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````