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

# Update a SIP trunk

> Update a SIP trunk (partial overlay). `trunk_name` is immutable. In `notification`, `hmac: null` ROTATES the secret (Daily regenerates a fresh one); a value sets it; omit to keep the current one. Any update touching `notification` re-sends the signed `sip_trunk.test` probe (with the final hmac) - the endpoint must return 2xx. `trunk_config.credential: null` clears the credential. Admission must remain valid (gated XOR is_open).



## OpenAPI

````yaml PUT /sip-trunk/{id}
openapi: 3.0.3
info:
  title: Daily API
  description: |-
    The Daily REST API offers the ability to manage the following: 
    - Overall Domain Configuration
    - Individual Room creation and config management 
    - Meeting token creation and validation
    - Recording and compositing management 
    - Meeting analytics
    - Logs and metrics
    - Real-time presence

    Please reach out to help@daily.co if we can help with anything
  version: 1.1.1
  contact:
    name: Daily
    url: https://docs.daily.co
    email: help@daily.co
servers:
  - url: https://api.daily.co/v1
security:
  - bearerAuth: []
paths:
  /sip-trunk/{id}:
    put:
      tags:
        - dialin
      summary: /sip-trunk/{id}
      description: >-
        Update a SIP trunk (partial overlay). `trunk_name` is immutable. In
        `notification`, `hmac: null` ROTATES the secret (Daily regenerates a
        fresh one); a value sets it; omit to keep the current one. Any update
        touching `notification` re-sends the signed `sip_trunk.test` probe (with
        the final hmac) - the endpoint must return 2xx.
        `trunk_config.credential: null` clears the credential. Admission must
        remain valid (gated XOR is_open).
      operationId: UpdateSipTrunk
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
                room_template:
                  type: object
                  additionalProperties: true
                notification:
                  type: object
                  properties:
                    webhook_url:
                      type: string
                      format: uri
                    hmac:
                      type: string
                      nullable: true
                      description: >-
                        A base64 value sets it; null rotates it (fresh secret);
                        omit to keep the current one.
                trunk_config:
                  type: object
                  properties:
                    allowed_ips:
                      type: array
                      items:
                        type: string
                    credential:
                      type: object
                      nullable: true
                      properties:
                        username:
                          type: string
                        password:
                          type: string
                    is_open:
                      type: boolean
                    exp_offset:
                      type: integer
                enabled:
                  type: boolean
      responses:
        '200':
          description: The updated SIP trunk.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  description:
                    type: string
                  trunk_name:
                    type: string
                  sip_uri:
                    type: string
                  enabled:
                    type: boolean
                  config:
                    type: object
                    additionalProperties: true
        '400':
          $ref: '#/components/responses/400'
      security:
        - bearerAuth: []
components:
  responses:
    '400':
      description: '400'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
              info:
                type: string
          examples:
            Result:
              value:
                error: invalid-request-error
                info: missing required field
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````