> ## 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 SMS provider configuration

> Upserts the credentials for a single SMS provider (`twilio`, `sinch`, or `textgrid`) on the caller's organization. Whitespace is trimmed from every credential before persistence. Only fields relevant to the chosen `provider` are read; other fields are ignored. Requires SUPERADMIN.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/sms/providers/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/sms/providers/config:
    post:
      tags:
        - SMS
      summary: Save SMS provider configuration
      description: >-
        Upserts the credentials for a single SMS provider (`twilio`, `sinch`, or
        `textgrid`) on the caller's organization. Whitespace is trimmed from
        every credential before persistence. Only fields relevant to the chosen
        `provider` are read; other fields are ignored. Requires SUPERADMIN.
      operationId: post_sms_providers_config
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SmsSaveProviderConfigRequest'
      responses:
        '200':
          description: Configuration saved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsMutationResponse'
        '400':
          description: Invalid provider
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsErrorResponse'
        '403':
          description: Forbidden (requires SUPERADMIN)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsErrorResponse'
        '500':
          description: Failed to save SMS provider configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    SmsSaveProviderConfigRequest:
      type: object
      description: >-
        Save credentials for a single SMS provider. Only the fields relevant to
        `provider` are read; others may be present but are ignored. All
        credential strings are trimmed before persistence.
      properties:
        provider:
          $ref: '#/components/schemas/SmsProviderName'
        twilioAccountSid:
          type: string
          description: Required when `provider` is `twilio`.
        twilioAuthToken:
          type: string
          description: Required when `provider` is `twilio`.
        twilioMessagingServiceSid:
          type: string
          description: Optional but recommended when `provider` is `twilio`.
        sinchServicePlanId:
          type: string
          description: Required when `provider` is `sinch`.
        sinchApiToken:
          type: string
          description: Required when `provider` is `sinch`.
        sinchMmsApiKey:
          type: string
          description: Optional Sinch MMS API key.
        sinchMmsServiceId:
          type: string
          description: Optional Sinch MMS service identifier.
        textGridAccountSid:
          type: string
          description: Required when `provider` is `textgrid`.
        textGridAuthToken:
          type: string
          description: Required when `provider` is `textgrid`.
      required:
        - provider
      additionalProperties: true
      example:
        provider: twilio
        twilioAccountSid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        twilioAuthToken: your-twilio-auth-token
        twilioMessagingServiceSid: MGxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    SmsMutationResponse:
      type: object
      description: Shared response for save / set-active / delete operations.
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
          description: Human-readable confirmation (e.g. "twilio SMS configuration saved").
      required:
        - success
      additionalProperties: true
      example:
        success: true
        message: twilio SMS configuration saved
    SmsErrorResponse:
      type: object
      description: Error envelope for `/api/sms/*` endpoints (provider configuration).
      properties:
        error:
          type: string
        message:
          type: string
        success:
          type: boolean
          enum:
            - false
      required:
        - error
      additionalProperties: true
      example:
        error: Provider configuration not found
    SmsProviderName:
      type: string
      enum:
        - twilio
        - sinch
        - textgrid
      description: >-
        Supported SMS providers. `twilio` and `textgrid` use the
        Twilio-compatible REST API; `sinch` uses Sinch Conversation API for SMS
        and a separate MMS service.
      example: twilio
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````