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

# Update model assignment for a system section

> Assigns a (provider, model) pair to one of the supported system sections — dataExtraction, automations, or messageGeneration. SUPERADMIN-only and tenant-scoped. Validates that the provider and model both exist in the AiModel registry before saving.



## OpenAPI

````yaml /api-reference/openapi.yaml put /api/ai-models/organization/{organizationId}/assignments
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/ai-models/organization/{organizationId}/assignments:
    put:
      tags:
        - AI Models
      summary: Update model assignment for a system section
      description: >-
        Assigns a (provider, model) pair to one of the supported system sections
        — dataExtraction, automations, or messageGeneration. SUPERADMIN-only and
        tenant-scoped. Validates that the provider and model both exist in the
        AiModel registry before saving.
      operationId: update_model_assignment
      parameters:
        - in: path
          name: organizationId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateModelAssignmentRequest'
      responses:
        '200':
          description: Model assignment updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateModelAssignmentResponse'
        '400':
          description: Invalid section, provider, or model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiModelsErrorResponse'
        '403':
          description: Only superadmins can configure tenant-wide model assignments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiModelsErrorResponse'
        '500':
          description: Failed to update model assignment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiModelsErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateModelAssignmentRequest:
      type: object
      properties:
        section:
          type: string
          enum:
            - dataExtraction
            - automations
            - messageGeneration
          description: >-
            Which system section this assignment governs: `dataExtraction`,
            `automations`, or `messageGeneration`.
        provider:
          type: string
          enum:
            - anthropic
            - openai
            - google
          description: >-
            Provider that will serve this section, identified by its
            `vercelUniqueName`.
        model:
          type: string
          description: >-
            `modelName` from the provider's `modelDetails`; must exist in the
            AiModel registry entry.
      required:
        - section
        - provider
        - model
      additionalProperties: true
      example:
        section: messageGeneration
        provider: anthropic
        model: claude-sonnet-4-6
    UpdateModelAssignmentResponse:
      type: object
      description: Returned after a section's model assignment is updated.
      properties:
        success:
          type: boolean
          enum:
            - true
        message:
          type: string
        data:
          type: object
          properties:
            section:
              type: string
              enum:
                - dataExtraction
                - automations
                - messageGeneration
            assignment:
              type: object
              properties:
                provider:
                  type: string
                  enum:
                    - anthropic
                    - openai
                    - google
                model:
                  type: string
              required:
                - provider
                - model
              additionalProperties: true
          required:
            - section
            - assignment
          additionalProperties: true
      required:
        - success
        - message
        - data
      additionalProperties: true
      example:
        success: true
        message: Model assignment for messageGeneration updated successfully
        data:
          section: messageGeneration
          assignment:
            provider: anthropic
            model: claude-sonnet-4-6
    AiModelsErrorResponse:
      type: object
      description: >-
        Error envelope returned by AI Models endpoints. `error` may be present
        on contract-validation failures.
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
        error:
          description: >-
            Optional error detail (string or structured object on validation
            failures).
      required:
        - success
      additionalProperties: true
      example:
        success: false
        message: Organization credentials not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````