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

# Create a SIP trunk

> Create a SIP trunk for your domain. Returns the `sip_uri` to point your carrier at, plus the generated `hmac`. `notification.webhook_url` is required and must be LIVE: create sends a signed one-shot `sip_trunk.test` POST that must return 2xx, or the create fails with 400. A trunk must be gated by `allowed_ips`/`credential` or explicitly `is_open: true`.



## OpenAPI

````yaml POST /sip-trunk
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:
    post:
      tags:
        - dialin
      summary: /sip-trunk
      description: >-
        Create a SIP trunk for your domain. Returns the `sip_uri` to point your
        carrier at, plus the generated `hmac`. `notification.webhook_url` is
        required and must be LIVE: create sends a signed one-shot
        `sip_trunk.test` POST that must return 2xx, or the create fails with
        400. A trunk must be gated by `allowed_ips`/`credential` or explicitly
        `is_open: true`.
      operationId: CreateSipTrunk
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - trunk_name
                - room_template
                - notification
              properties:
                trunk_name:
                  type: string
                  description: >-
                    Lowercase alphanumeric, 3-63 chars, no hyphens; the combined
                    `<domain>-<trunk_name>` label must be <= 63 chars. Immutable
                    after create.
                  example: support
                description:
                  type: string
                  description: >-
                    Free text (max 2048). Echoed to your webhook as
                    trunk.description.
                room_template:
                  type: object
                  additionalProperties: true
                  description: >-
                    Room-creation properties, passed to room create. An optional
                    `sip` block (applied at dial-in start) may set display name,
                    codecs, dialin_config, etc. Absolute `exp`/`nbf` are
                    rejected - use trunk_config.exp_offset.
                notification:
                  type: object
                  required:
                    - webhook_url
                  properties:
                    webhook_url:
                      type: string
                      format: uri
                      description: HTTPS URL Daily POSTs sip_trunk.incoming to. Required.
                    hmac:
                      type: string
                      description: >-
                        Base64 secret for the X-Siptrunk-Signature header.
                        Optional - Daily generates one if omitted.
                trunk_config:
                  type: object
                  properties:
                    allowed_ips:
                      type: array
                      items:
                        type: string
                      description: >-
                        IPv4 addresses or canonical CIDR blocks (max 25) allowed
                        to send INVITEs.
                    credential:
                      type: object
                      properties:
                        username:
                          type: string
                        password:
                          type: string
                          description: >-
                            Write-only (never returned by GET). 12-64 chars, at
                            least one letter and one digit.
                    is_open:
                      type: boolean
                      default: false
                      description: >-
                        Set true to accept calls with NO admission control
                        (dev/testing only). A trunk must be gated (allowed_ips
                        and/or credential) XOR explicitly open.
                    exp_offset:
                      type: integer
                      default: 3600
                      description: Provisioned-room lifetime in seconds (60-86400).
                enabled:
                  type: boolean
                  default: true
      responses:
        '200':
          description: The created SIP trunk.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  description:
                    type: string
                  trunk_name:
                    type: string
                  sip_uri:
                    type: string
                    example: sip:examplecorp-support.siptrunk.sip-us.daily.co
                  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

````