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

# Update SIP trunk assignment

> Patch `number` and/or `alternate_number`. Send `null` to clear a field. Omitted keys are left unchanged. Assignment id is globally unique.



## OpenAPI

````yaml patch /v1/sip-trunks/assignments/{assignmentId}
openapi: 3.0.3
info:
  title: Vatel AI REST API
  description: >-
    Programmatic access for agents, telephony, and session tokens. Send
    `Authorization: Bearer <organization API key>` on all requests unless noted.
    Most error responses return JSON with an `error` string message.
  version: 0.2.4
servers:
  - url: https://api.vatel.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: organization
    description: Organization tied to your API key
  - name: llms
    description: LLM model identifiers
  - name: voices
    description: TTS voice catalog
  - name: agents
    description: Agents, outbound dial, agent versions
  - name: twilio
    description: Imported Twilio phone numbers
  - name: sip-trunks
    description: SIP trunk configuration
  - name: session
    description: Session tokens and voice WebSocket connections.
  - name: calls
    description: Call history, recordings, and live eavesdrop for your organization
  - name: eavesdrop
    description: Listen to live calls and send supervisor commands over WebSocket.
paths:
  /v1/sip-trunks/assignments/{assignmentId}:
    patch:
      tags:
        - sip-trunks
      summary: Update SIP trunk assignment
      description: >-
        Patch `number` and/or `alternate_number`. Send `null` to clear a field.
        Omitted keys are left unchanged. Assignment id is globally unique.
      operationId: patchSipTrunkAgentAssignment
      parameters:
        - name: assignmentId
          in: path
          required: true
          description: Assignment id
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SipTrunkAgentAssignmentPatchInput'
      responses:
        '200':
          description: Updated assignment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SipTrunkAgentAssignment'
        '400':
          description: Invalid id or body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Assignment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Number or alternate number already in use
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SipTrunkAgentAssignmentPatchInput:
      type: object
      description: >-
        Patch only fields present in the JSON. Use null to clear `number` or
        `alternate_number`.
      properties:
        number:
          type: string
          nullable: true
          description: Digest-auth routing number (unique per trunk); null clears.
        alternate_number:
          type: string
          nullable: true
          description: ACL routing alternate dial string (globally unique); null clears.
    SipTrunkAgentAssignment:
      type: object
      description: >-
        Binds an org agent to a SIP trunk. With digest inbound auth, routing
        uses `number`. With ACL inbound auth, routing uses `alternate_number`
        (globally unique).
      properties:
        id:
          type: string
          format: uuid
        agent_id:
          type: string
          format: uuid
        sip_trunk_id:
          type: string
          format: uuid
        number:
          type: string
          description: >-
            Number to dial for this agent when the trunk uses digest inbound
            auth; must be unique among assignments on this trunk.
        alternate_number:
          type: string
          description: >-
            Globally unique alternate dial string when the trunk uses ACL
            inbound auth; used instead of per-trunk `number` routing in that
            mode.
        created_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      description: Standard error body for most non-2xx JSON responses on this API.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable message; may include validation detail.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Send your organization API key as `Authorization: Bearer <key>`.'

````