domain names. Requires Office Manager, Route Manager, or Call Center Supervisor scope in that domain, Reseller scope in its territory, or Super User scope. The API publishes the connection on the service bus (SBUS) connection_events channel, and each server writes it when the event arrives, so 202 means published, not applied.connection-orig-match-pattern and domain are required. connection-orig-match-pattern is the connection's key and must be unique across the platform, not only the domain: a value any connection already uses returns 409. connection-term-match-pattern defaults to it, and connection-translation-request-host and connection-translation-destination-host default to connection-address, as the API formats it for the connectivity type. connection-source-ip-checking-enabled and connection-include-server-header-enabled default to no. connection-connectivity-type defaults to header_ip_match and sets connection-sip-authenticate-as-client-enabled: yes for outbound_registration, no for every other type. A value you send that contradicts the type is overridden, and the response carries a Warning header and a warnings list. connection-sip-registration-password defaults to a random 8-character value.POST /domains/{domain}/routeprofiles. Sending call-routing here returns 404.synchronous=yes, in the body or the query string, to wait up to 2 seconds for the connection to be written. You then get 200 with the connection. If it is not written in time, you get the usual 202.connection-orig-match-pattern was deleted in the last 15 minutes, and the platform is set to block re-created connections, some servers can refuse the new one after the 202. Read it back, and repeat the create if it is missing.POST /domains/{domain}/connections does the same with the domain in the path.curl --location 'https://awqacore01.crexendocloud.com/ns-api/v2/connections' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"connection-orig-match-pattern": "sip*@apidog",
"connection-term-match-pattern": "sip*@apidog",
"domain": "portal",
"connection-pcmu-only-enabled": "yes",
"dial-policy": "Permit All",
"connection-sip-get-new-dialog-destination-from": "yes",
"connection-prevent-rtp-port-change-enabled": "yes",
"connection-remote-ringback-handling": "no-ringback",
"limits-max-active-calls-orig": "0",
"connection-allow-mid-call-uri-updates-enabled": "yes",
"connection-record-all-calls-enabled": "yes",
"connection-sip-transport-protocol": "TCP",
"connection-custom-p-asserted-id-format": "hello",
"connection-sip-session-timer-enabled": "yes",
"connection-check-orig-matching-sip-header": "contact",
"connection-audio-relay-enabled": "no",
"description": "sample description from apidog",
"dial-plan": "portal",
"connection-sip-registration-realm": "portal",
"connection-term-enabled": "yes",
"connection-linked-billing-user": "domain",
"connection-enforce-minimum-duration-enabled": "yes",
"connection-hide-post-dial-delay-with-ringback-enabled": "yes",
"connection-sip-registration-username": "authusername",
"connection-translation-source-user": "[*]",
"connection-require-encrypted-audio-enabled": "optional",
"connection-include-server-header-enabled": "yes",
"connection-bind-to-alternate-interface-enabled": "yes",
"limits-max-active-calls-total": "0",
"connection-sip-get-response-destination-from": "contact-header",
"connection-translation-request-user": "[*]",
"connection-relay-comfort-noise-enabled": "yes",
"connection-address": "203.0.113.30",
"connection-block-media-in-sip-180-ringing": "yes",
"connection-block-video-in-sdp-enabled": "yes",
"connection-translation-destination-host": "apidogname1",
"limits-max-active-calls-term": "0",
"connection-sip-registration-password": "authkey",
"connection-translation-request-host": "apidogname1",
"connection-source-ip-checking-enabled": "yes",
"connection-orig-enabled": "yes",
"connection-translation-destination-user": "[*]",
"connection-require-sip-authentication-enabled": "yes",
"connection-translation-source-host": "apidogname1",
"utc-offset": "-7",
"time-zone": "US/Pacific",
"minimum-call-duration-second": "1",
"connection-sip-registration-expires-datetime": "2025-05-19 02:41:11",
"connection-sip-authenticate-as-client-enabled": "no",
"connection-is-carrier-trunk": "yes"
}'{
"connection-id": "c2lwOipAMTkyLjAuMi4xMA",
"connection-orig-match-pattern": "sip:*@192.0.2.10",
"connection-term-match-pattern": "sip:*@192.0.2.10",
"domain": "example.com",
"description": "Carrier trunk 1",
"connection-usage-role": "vendor",
"connection-connectivity-type": "header_ip_match",
"connection-address": "192.0.2.10",
"connection-orig-enabled": "yes",
"connection-term-enabled": "yes",
"connection-audio-relay-enabled": "yes",
"connection-require-sip-authentication-enabled": "no",
"connection-sip-authenticate-as-client-enabled": "no",
"connection-linked-billing-user": "1001",
"dial-plan": "example.com",
"dial-policy": "Permit All",
"limits-max-active-calls-orig": 0,
"limits-max-active-calls-term": 0,
"limits-max-active-calls-total": 0,
"minimum-call-duration-seconds": 0,
"connection-translation-request-user": "[*]",
"connection-translation-request-host": "192.0.2.10",
"connection-translation-destination-user": "[*]",
"connection-translation-destination-host": "192.0.2.10",
"connection-translation-source-user": "[*]",
"connection-translation-source-host": "<AppIP>",
"time-zone": "America/Phoenix",
"connection-source-ip-checking-enabled": "yes",
"connection-include-server-header-enabled": "yes",
"connection-relay-comfort-noise-enabled": "system-default",
"connection-pcmu-only-enabled": "no",
"connection-enforce-minimum-duration-enabled": "no",
"connection-bind-to-alternate-interface-enabled": "no",
"connection-block-video-in-sdp-enabled": "no",
"connection-sip-get-new-dialog-destination-from": "default-ip",
"connection-sip-get-response-destination-from": "default-ip",
"connection-require-encrypted-audio-enabled": "no",
"connection-sip-transport-protocol": "UDP",
"connection-check-orig-matching-sip-header": "from",
"connection-sip-session-timer-enabled": "system-default",
"connection-prevent-rtp-port-change-enabled": "no",
"connection-hide-post-dial-delay-with-ringback-enabled": "no",
"connection-remote-ringback-handling": "allowed",
"connection-block-media-in-sip-180-ringing": "no",
"connection-allow-mid-call-uri-updates-enabled": "no",
"connection-record-all-calls-enabled": "no",
"active-calls-orig-current": 0,
"active-calls-term-current": 0,
"active-calls-orig-since-startup": 0,
"active-calls-term-since-startup": 0,
"active-calls-max-this-month": 0,
"active-calls-max-last-month": 0
}