NmsRoute channel and then the profile on connection_events, and each is applied when its event arrives, so 202 means published, not applied.connection-orig-match-pattern is required and is the profile's key. It must be unique across the platform, not only the domain: a value any connection already uses returns 409. The API sets the address itself: the domain in capitals, _, and the part of connection-orig-match-pattern after any @, in angle brackets, such as <EXAMPLE.COM_tollfree>. The name inside the brackets is the route's route-destination-match-pattern. connection-connectivity-type is always route_profile.call-routing. route-method defaults to percentage, route-is-enabled to yes, and description to the profile's description. Each entry in routecon needs route-connection-translation-destination-host. route-connection-ordinal-index is optional: an entry without one takes the next free index. The whole of call-routing is checked before anything is published, so a missing host, or an index that is repeated or not a positive whole number, returns 400 with nothing created. Without call-routing, no route is created.synchronous=yes, in the body or the query string, to wait up to 2 seconds for the change to be applied. You then get 200 with the profile. If it is not applied in time, you get the usual 202 and the write still completes.Authorization: Bearer ********************synchronous=yes once the profile is applied: the route profile.curl --location 'https://awqacore01.crexendocloud.com/ns-api/v2/domains/example.com/routeprofiles' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"connection-orig-match-pattern": "tollfree",
"description": "Toll-free outbound chain",
"call-routing": {
"route-method": "percentage",
"routecon": [
{
"route-connection-ordinal-index": 1,
"route-connection-translation-destination-host": "carrier1.example.com",
"route-connection-integer-percentage": 60
},
{
"route-connection-ordinal-index": 2,
"route-connection-translation-destination-host": "carrier2.example.com",
"route-connection-integer-percentage": 40
}
]
}
}'{
"connection-id": "dG9sbGZyZWU",
"connection-orig-match-pattern": "tollfree",
"connection-term-match-pattern": "tollfree",
"domain": "example.com",
"description": "Toll-free outbound chain",
"connection-usage-role": "customer",
"connection-connectivity-type": "route_profile",
"call-routing": {
"route-destination-match-pattern": "EXAMPLE.COM_tollfree",
"route-source-match-pattern": "*",
"route-class": "*",
"route-match-server-hostname": "*",
"route-is-enabled": "yes",
"description": "Toll-free outbound chain",
"route-method": "percentage",
"routecon": [
{
"route-connection-ordinal-index": 1,
"route-connection-translation-destination-user": "[*]",
"route-connection-translation-destination-host": "carrier1.example.com",
"route-connection-integer-percentage": 60,
"route-connection-integer-cost": 0
},
{
"route-connection-ordinal-index": 2,
"route-connection-translation-destination-user": "[*]",
"route-connection-translation-destination-host": "carrier2.example.com",
"route-connection-integer-percentage": 40,
"route-connection-integer-cost": 0
}
]
}
}