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

# Update a SIP trunk

> Only the fields you send are changed.



## OpenAPI

````yaml /openapi.json patch /v1/sip-trunks/{id}
openapi: 3.1.0
info:
  title: Wixzel Phone API
  version: '2026-09-01'
  description: >-
    APIs for AI voice agents. One key, one balance, every voice engine.


    ## Authentication

    Send your key as `Authorization: Bearer wv_live_...`. Keys are scoped —
    grant only what an integration needs. There is no admin scope.


    ## Versioning

    The `/v1` prefix covers additive changes. Behavioural changes ship behind a
    dated `Wixzel-Version` header, and existing keys keep the behaviour they
    were created with.


    ## Money

    Amounts are integer **micro-USD** (1,000,000 = $1.00). Voice usage is billed
    per second, per token and per character, so a float dollar figure cannot
    represent it without disagreeing with the ledger.


    ## Errors

    Every error carries a stable `code` and a `request_id`. Match on `code`; the
    `message` is for humans and may change.
  contact:
    name: Wixzel Phone
    url: https://phone.wixzel.com
servers:
  - url: https://api.phone.wixzel.com
    description: Production
security: []
tags:
  - name: Calls
    description: Place calls and read what happened on them.
  - name: Agents
    description: The prompt, voice and behaviour of a caller.
  - name: Leads
    description: People to call, and data to merge into prompts.
  - name: Campaigns
    description: Call a list of leads with one agent.
  - name: Knowledge bases
    description: Facts an agent can draw on mid-call.
  - name: Phone numbers
    description: Numbers on your SIP trunks.
  - name: SIP trunks
    description: Your carrier connections.
  - name: Appointments
    description: Bookings, including ones agents make on calls.
  - name: Usage
    description: Itemised billing lines.
  - name: Billing
    description: Balance, ledger and top-ups.
  - name: API keys
    description: Create, scope and rotate keys.
  - name: Engines
    description: What the platform can serve, and what it costs.
paths:
  /v1/sip-trunks/{id}:
    patch:
      tags:
        - SIP trunks
      summary: Update a SIP trunk
      description: Only the fields you send are changed.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            example: 6a96a3ead6e886d42462dd3e
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSipTrunk'
      responses:
        '200':
          description: The updated a SIP trunk
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SipTrunk'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited. Retry after the interval in `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    CreateSipTrunk:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
          pattern: ^[a-zA-Z0-9 _-]+$
        host:
          type: string
          minLength: 1
          maxLength: 253
          pattern: ^[a-zA-Z0-9.-]+$
        port:
          type: integer
          minimum: 1
          maximum: 65535
          default: 5060
        transport:
          type: string
          enum:
            - udp
            - tcp
            - tls
          default: udp
        username:
          type: string
          maxLength: 128
          pattern: ^[a-zA-Z0-9._-]*$
        password:
          type: string
          maxLength: 256
        auth_realm:
          type: string
          maxLength: 128
          pattern: ^[a-zA-Z0-9.-]*$
        default_caller_id:
          type: string
          maxLength: 64
          pattern: ^[a-zA-Z0-9+ _-]*$
        dial_prefix:
          type: string
          maxLength: 16
          pattern: ^[0-9+*#]*$
        send_plus:
          type: boolean
          default: true
          description: >-
            Whether to keep the leading "+" when dialling, so the request URI
            reads sip:+15551234567@host. Twilio and Telnyx expect it. Many
            wholesale carriers cannot parse it and answer 408 Request Timeout
            after a few seconds, with the call showing in their portal as
            received but never answered. Set false to send bare digits instead.
        provider_name:
          type: string
          maxLength: 64
      required:
        - name
        - host
    SipTrunk:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-f]{24}$
          example: 6a96a3ead6e886d42462dd3e
        object:
          type: string
          enum:
            - sip_trunk
        name:
          type: string
        host:
          type: string
        port:
          type: integer
        transport:
          type: string
          enum:
            - udp
            - tcp
            - tls
        username:
          type:
            - string
            - 'null'
        send_plus:
          type: boolean
        platform_ip:
          type:
            - string
            - 'null'
          description: >-
            The address calls are placed from. Allowlist it with your carrier:
            most authorise outbound calls by source IP, and without it the trunk
            looks configured while no call completes. Read from the deployment
            rather than written down, so it cannot go stale. Null if this
            install has not set it.
          example: 95.216.218.102
        origination_uri:
          type:
            - string
            - 'null'
          description: >-
            Where your carrier must send INBOUND calls. Paste it into the field
            your provider calls the Origination URI (Twilio Elastic SIP
            Trunking), or the termination point / destination SIP URI — the
            names differ, the string does not. `platform_ip` is the outbound
            half: it tells the carrier to accept calls FROM us. This is the
            inbound half, and it is separate configuration in a different part
            of their console. Without it a number is bought, pointed at an
            agent, and simply never rings, because the carrier has nowhere to
            deliver the call to. Null if this install has not published a SIP
            address.
          example: sip:95.216.218.102:5090
        provider_name:
          type:
            - string
            - 'null'
        status:
          type: string
        created_at:
          type: string
          format: date-time
          description: ISO 8601, always UTC.
          example: '2026-09-01T12:00:00.000Z'
      required:
        - id
        - object
        - name
        - host
        - port
        - transport
        - username
        - send_plus
        - platform_ip
        - origination_uri
        - provider_name
        - status
        - created_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - insufficient_credits
                - not_found_error
                - conflict_error
                - api_error
            code:
              type: string
              description: Stable machine-readable code.
              example: agent_not_found
            message:
              type: string
              description: >-
                Human-readable explanation. Do not match on this — match on
                code.
            param:
              type: string
              description: Which field caused the failure, when applicable.
            doc_url:
              type: string
            request_id:
              type: string
              description: Quote this when asking for help.
              example: req_01HXYZ...
          required:
            - type
            - code
            - message
            - request_id
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Wixzel Phone API key: `Authorization: Bearer wv_live_...`. Keys are
        scoped; grant only what the integration needs.

````