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

# Add custom SIP domain

> Registers a hostname you control as a SIP domain for registered inbound calls. The domain starts in
PendingVerification. Publish the DNS records from the response, then call verify. Once Active, pass its id as
sipDomainId when registering a call to receive sip:{callId}@{your-domain}.

## DNS records

The response contains two kinds of records:

* **Verification** — a `TXT` record at `_dasha-verify.{domain}` proving you control the hostname. Required before the domain can be verified.
* **Routing** — a `CNAME` from the domain to the Dasha SIP host, so that calls placed to `sip:{callId}@{domain}` reach Dasha. SIP phones and PBXs resolve the host with A records, which the CNAME provides. Use a dedicated hostname: a CNAME cannot share its name with other records.

DNS changes can take a few minutes to propagate. Call the verify endpoint once the TXT record is visible.


## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json post /api/v1/sip-domains
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipDomains
  - name: SipPhoneNumbers
  - name: SipRegisterCallWebhook
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/sip-domains:
    post:
      tags:
        - SipDomains
      summary: Add custom SIP domain
      description: >-
        Registers a hostname you control as a SIP domain for registered inbound
        calls. The domain starts in

        PendingVerification. Publish the DNS records from the response, then
        call verify. Once Active, pass its id as

        sipDomainId when registering a call to receive
        sip:{callId}@{your-domain}.
      requestBody:
        description: Domain to add
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SipDomainRequestDto'
              description: >-
                Request to add a custom SIP domain for registered inbound calls.
                The domain must be a hostname you control; you prove ownership
                with a DNS TXT record before it becomes usable.
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SipDomainRequestDto'
              description: >-
                Request to add a custom SIP domain for registered inbound calls.
                The domain must be a hostname you control; you prove ownership
                with a DNS TXT record before it becomes usable.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SipDomainRequestDto'
              description: >-
                Request to add a custom SIP domain for registered inbound calls.
                The domain must be a hostname you control; you prove ownership
                with a DNS TXT record before it becomes usable.
      responses:
        '201':
          description: Domain created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SipDomainResponseDto'
        '400':
          description: Invalid hostname, or domain limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Authentication failed or API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Custom SIP domains are not enabled for this organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: Hostname already registered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server error
components:
  schemas:
    SipDomainRequestDto:
      required:
        - domain
      type: object
      properties:
        domain:
          minLength: 1
          type: string
          description: >-
            Hostname to register, e.g. "calls.example.com". Lowercased and
            stored without a trailing dot. Wildcards, IP addresses, ports and
            schemes are not accepted.
      additionalProperties: false
      description: >-
        Request to add a custom SIP domain for registered inbound calls. The
        domain must be a hostname you control; you prove ownership with a DNS
        TXT record before it becomes usable.
    SipDomainResponseDto:
      required:
        - createdTime
        - dns
        - domain
        - exampleSipUri
        - id
        - lastUpdateTime
        - orgId
        - status
      type: object
      properties:
        id:
          type: string
          description: >-
            Unique identifier of the domain record. Pass it as sipDomainId when
            registering a call.
          format: uuid
        orgId:
          minLength: 1
          type: string
          description: Organization that owns the domain.
        domain:
          minLength: 1
          type: string
          description: Normalized hostname.
        status:
          allOf:
            - $ref: '#/components/schemas/SipDomainStatus'
          description: >-
            PendingVerification until the TXT record is found and the platform
            registration succeeds; Active when usable; Failed when the platform
            refused the domain.
        lastError:
          type: string
          description: >-
            Reason for the last failed verification or registration attempt, if
            any.
          nullable: true
        verifiedTime:
          type: string
          description: When the domain became Active.
          format: date-time
          nullable: true
        defaultAgentId:
          type: string
          description: >-
            Agent that answers inbound calls on this domain whose SIP user part
            is not a registered call id. Null means such calls are rejected with
            SIP 404.
          nullable: true
        defaultAgentName:
          type: string
          description: Display name of the default agent, when set.
          nullable: true
        createdTime:
          type: string
          description: Timestamp when the domain was added.
          format: date-time
        lastUpdateTime:
          type: string
          description: Timestamp of the last change.
          format: date-time
        exampleSipUri:
          minLength: 1
          type: string
          description: Example of the SIP URI registered calls will get on this domain.
        dns:
          allOf:
            - $ref: '#/components/schemas/SipDomainDnsInstructionsDto'
          description: DNS records to publish for verification and routing.
        routingRecordsDetected:
          type: boolean
          description: >-
            Result of the last routing DNS check: true when the domain already
            resolves to the Dasha SIP host (CNAME or copied A records). Only set
            by the verify endpoint.
          nullable: true
      additionalProperties: false
      description: >-
        Custom SIP domain with its verification state and the DNS records to
        publish.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    SipDomainStatus:
      enum:
        - PendingVerification
        - Active
        - Failed
      type: string
      description: Lifecycle of a custom SIP domain used for registered inbound calls.
    SipDomainDnsInstructionsDto:
      required:
        - routing
        - sipTarget
        - verification
      type: object
      properties:
        verification:
          allOf:
            - $ref: '#/components/schemas/DnsRecordDto'
          description: >-
            TXT record proving ownership. Must exist before verification
            succeeds.
        routing:
          allOf:
            - $ref: '#/components/schemas/DnsRecordDto'
          description: >-
            CNAME from the domain to the Dasha SIP host. SIP phones and PBXs
            resolve the host with A records, so a CNAME is what makes
            sip:{callId}@{domain} reach Dasha. A CNAME cannot share its name
            with other records, so the domain must be a dedicated hostname.
        sipTarget:
          minLength: 1
          type: string
          description: Dasha SIP host that the CNAME points at.
      additionalProperties: false
      description: >-
        DNS records the customer must publish for a custom SIP domain: one TXT
        record to prove ownership, and one CNAME so calls to the domain reach
        Dasha.
    DnsRecordDto:
      required:
        - name
        - type
        - value
      type: object
      properties:
        type:
          minLength: 1
          type: string
          description: 'Record type: TXT or CNAME.'
        name:
          minLength: 1
          type: string
          description: Fully qualified record name, e.g. "_dasha-verify.calls.example.com".
        value:
          minLength: 1
          type: string
          description: >-
            Record data as it should appear in the zone, e.g.
            "dasha-domain-verification=abc123" or "sip.us.dasha.ai".
        target:
          type: string
          description: Target hostname. Set for CNAME records.
          nullable: true
      additionalProperties: false
      description: One DNS record the customer must create.
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````