Attach SIP Configuration
SIP Trunks
Attach SIP Configuration
Attach SIP configuration to one or more phone numbers for inbound and/or outbound routing.
POST
Attach SIP Configuration
Headers
string
required
Your API key for authentication.
Body
string
A single phone number to configure. PSTN numbers are normalized to E.164 (e.g.,
+14150000000); when bound to a trunk (trunk_id), non-E.164 SIP identities such as DIDs and extensions are also accepted. Use either phone_number or phone_numbers, not both.string[]
An array of phone numbers or DIDs to configure (up to 100). PSTN numbers are normalized to E.164; trunk-bound numbers also accept DIDs and extensions. Use either
phone_number or phone_numbers, not both.array
required
An array of direction objects. Each specifies either
inbound or outbound routing configuration.string
required
Must be set to
"sip".string
Bind the numbers to a reusable trunk. When set, outbound endpoint and authentication are inherited from the trunk (no need to repeat
sip_endpoint/auth per number), and non-E.164 DIDs and extensions are accepted.Inbound Direction Object
string
required
Set to
"inbound".string
Authentication mode:
"ip" (default) or "register". When set to "register", you must also provide register_auth.object
Required when
auth_mode is "register". Contains username (string) and password (string, min 8 characters).string
Your SIP server address for inbound call forwarding (optional). Format:
sip:host or host.object
Custom SIP header mappings. See header configuration examples below.
object
Connection options:
port (number), transport ("udp", "tcp", or "tls"), secure_media (boolean), sip_username (string), sip_password (string).Outbound Direction Object
string
required
Set to
"outbound".string
required
Your SIP provider’s endpoint, as a valid SIP URI (e.g.,
sip:your.provider.com). Required for outbound unless the numbers are bound to a trunk_id, in which case it is inherited from the trunk.object
Custom SIP header mappings.
object
Connection options:
port (number), transport ("udp", "tcp", or "tls"), secure_media (boolean), sip_username (string), sip_password (string).Response
array
Array of successfully configured phone numbers.
array
Array of phone numbers that failed to configure, with error reasons.
string
Only returned when using registration-based auth. This is the derived password you must configure in your PBX.
Header Configuration Examples
Headers allow you to map SIP headers to Bland pathway variables and vice versa.Example Request (Outbound with Headers)
Example Request (Batch Attach)
Example Request (Bind to a Trunk)
Docs for agents: llms.txt