Skip to main content
POST
/
api
/
v1
/
sip-credentials
Create SIP credential
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    server: '<string>',
    domain: null,
    authUser: null,
    authPassword: null,
    transport: 'udp',
    description: null,
    cpsLimit: null,
    cpsKey: null
  })
};

fetch('https://blackbox.dasha.ai/api/v1/sip-credentials', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "orgId": "<string>",
  "server": "<string>",
  "transport": "udp",
  "source": "manual",
  "createdTime": "2023-11-07T05:31:56Z",
  "lastUpdateTime": "2023-11-07T05:31:56Z",
  "domain": "<string>",
  "authUser": "<string>",
  "authPassword": "<string>",
  "description": "<string>",
  "cpsLimit": 123,
  "cpsKey": "<string>",
  "providerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

SIP Credential Components

SIP credentials typically include:
  • Server address: The SIP trunk provider’s server hostname or IP
  • Authentication username: Username for SIP authentication (some providers call this “Account” or “Account ID”)
  • Password: Password for SIP authentication
  • Transport protocol: TCP, UDP, or TLS for SIP signaling
  • TLS settings: Optional TLS configuration for encrypted connections

Transport Protocols

Choose the appropriate transport protocol based on your provider’s requirements:
  • UDP: Standard SIP protocol, lightweight but unencrypted
  • TCP: Reliable transport with connection management
  • TLS: Encrypted transport for secure SIP signaling

Body

SIP credential configuration

Configuration for creating or updating SIP trunk credentials. SIP credentials define how to connect to your SIP provider for making and receiving phone calls, including server address, authentication, transport protocol, and rate limiting settings.

server
string
required

SIP server hostname or IP address with optional port, following RFC 3261 specifications. Specifies where to send SIP registration and call signaling. Include port number if using non-standard ports.

Required string length: 1 - 255
domain
string | null

SIP domain for authentication realm as defined in RFC 3261. Used by some SIP providers as the authentication domain. When not specified, the server address is typically used as the domain.

Maximum string length: 255
authUser
string | null

Authentication user identifier as defined in RFC 3261. Provided by your SIP trunk provider for authentication. Different providers may call this "username", "account", "user ID", or other names. May differ from the phone number used for caller ID.

Maximum string length: 255
authPassword
string | null

Password for SIP authentication as defined in RFC 3261. Provided by your SIP trunk provider along with the username.

Maximum string length: 64
transport
enum<string>
default:udp

Transport protocol for SIP signaling. Supported values: UDP (fastest, most common), TCP (more reliable), TLS (encrypted). Defaults to UDP when not specified. Choose based on your SIP provider's requirements and security needs.

Available options:
udp,
tcp,
tls
description
string | null

Human-readable description of these credentials. Useful for identifying which SIP provider or trunk these credentials represent, such as "Primary Twilio Trunk" or "Backup SIP Provider".

Maximum string length: 255
cpsLimit
number<float> | null

Maximum calls per second allowed through this SIP trunk. Used to prevent exceeding your SIP provider's rate limits or to control call pacing. When specified, the system throttles outbound call attempts to stay within this limit.

cpsKey
string | null

Shared rate limiting key for grouping multiple credentials under a common CPS limit. When multiple SIP credentials share the same CpsKey, their combined call rate is limited by the CpsLimit. Useful when you have multiple trunks from the same provider with a shared rate limit.

Maximum string length: 255

Response

SIP credential created successfully

SIP trunk credentials information including connection settings, authentication, rate limiting, and metadata. Contains all configuration needed to connect to a SIP provider for making and receiving calls.

id
string<uuid>
required

Unique identifier for these SIP credentials. Use this ID when configuring phone numbers or referencing these credentials in agent configurations.

orgId
string
required

Organization that owns these SIP credentials. Used for access control and resource isolation.

Minimum string length: 1
server
string
required

SIP server hostname or IP address with optional port, following RFC 3261 specifications. Specifies where to send SIP registration and call signaling.

Minimum string length: 1
transport
enum<string>
required

Transport protocol used for SIP signaling. Indicates whether this trunk uses UDP, TCP, or TLS for communication.

Available options:
udp,
tcp,
tls
source
enum<string>
required

Indicates how these credentials were created. 'manual' means user-entered credentials, 'provider' means automatically configured by a connected VoIP provider integration (such as Twilio).

Available options:
manual,
provider
createdTime
string<date-time>
required

Timestamp when these credentials were originally created.

lastUpdateTime
string<date-time>
required

Timestamp when these credentials were last modified. Updates when configuration changes are made.

domain
string | null

SIP domain for authentication realm as defined in RFC 3261. Used by some SIP providers as the authentication domain.

authUser
string | null

Authentication user identifier as defined in RFC 3261. Different providers may call this "username", "account", "user ID", or other names.

authPassword
string | null

Password for SIP authentication as defined in RFC 3261.

description
string | null

Human-readable description of these credentials. Helps identify which SIP provider or trunk these credentials represent.

cpsLimit
integer<int32> | null

Maximum calls per second allowed through this SIP trunk. Controls call pacing to prevent exceeding provider rate limits.

cpsKey
string | null

Shared rate limiting key for grouping multiple credentials under a common CPS limit. When set, multiple trunks with the same key share the rate limit.

providerId
string<uuid> | null

Reference to the VoIP provider that manages these credentials. Present only for provider-managed credentials where Source is 'provider'. When present, the provider handles credential lifecycle and configuration.