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

# Save organization-level Voice AI configuration (superadmin)

> Persists the AI voice provider selection, ElevenLabs API key, and Sinch EST credentials. Optionally generates a fresh ElevenLabs tool secret (32-byte hex). After save, attempts to auto-configure the ElevenLabs workspace post-call webhook and stores the returned HMAC `webhookSecret`. Webhook configuration failures are logged but don't fail the save. Superadmin only.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/calls/voice-ai/config
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/voice-ai/config:
    post:
      tags:
        - Calls
      summary: Save organization-level Voice AI configuration (superadmin)
      description: >-
        Persists the AI voice provider selection, ElevenLabs API key, and Sinch
        EST credentials. Optionally generates a fresh ElevenLabs tool secret
        (32-byte hex). After save, attempts to auto-configure the ElevenLabs
        workspace post-call webhook and stores the returned HMAC
        `webhookSecret`. Webhook configuration failures are logged but don't
        fail the save. Superadmin only.
      operationId: post_calls_voice_ai_config
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallsSaveVoiceAiConfigRequest'
      responses:
        '200':
          description: Configuration saved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsSimpleSuccessResponse'
        '401':
          description: Unauthorized or not a superadmin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CallsSaveVoiceAiConfigRequest:
      type: object
      description: >-
        Only the supplied fields are updated (no field is required, since admins
        partially edit).
      properties:
        aiVoiceProvider:
          type: string
          nullable: true
          description: e.g. `elevenlabs`. Pass `null` to clear.
        elevenlabsApiKey:
          type: string
        generateToolSecret:
          type: boolean
          description: >-
            When true, a fresh 32-byte hex `elevenlabsToolSecret` is generated
            and stored.
        sinchEstKeyId:
          type: string
        sinchEstKeySecret:
          type: string
        sinchEstProjectId:
          type: string
        sinchEstTrunkId:
          type: string
        sinchEstTrunkDomain:
          type: string
      additionalProperties: true
      example:
        aiVoiceProvider: elevenlabs
        elevenlabsApiKey: sk_eleven_xxxxxxxxxxxxxxxx
        generateToolSecret: true
        sinchEstProjectId: sinch-est-project-abc
        sinchEstTrunkId: sinch-est-trunk-xyz
        sinchEstTrunkDomain: example.sip.sinch.com
    CallsSimpleSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
      required:
        - success
      additionalProperties: true
      example:
        success: true
        message: Configuration saved
    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

````