Save call routing
PUT
/api/v1/ext/calls/routing
Set the order of lines a workspace's calls try.
Auth: Bearer access_token
Scope: calls.write
Up to 4 rows, one line per row, each line in one row only; an empty list clears the routing. Twilio can be named only when Twilio calling is enabled for the account. The same rules as the dashboard's Call Routing page.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workspace_id | body | number | yes | A workspace of the installer. |
| routing | body | array<array<string>> | yes | Rows of one line each, from imessage, android, whatsapp, twilio. |
Responses
| Status | When |
|---|---|
200 | OK |
400 | A rule failed |
401 | Missing or invalid token |
403 | Missing scope |
404 | Workspace does not exist or is not the installer's (same response for both) |
RequestResponses
curl -X PUT "https://backend.mysmsgateway.app/api/v1/ext/calls/routing" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": 7,
"routing": [
[
"whatsapp"
],
[
"imessage"
]
]
}'OK
{
"success": true,
"message": "Call routing saved",
"data": {
"workspace_id": 7,
"routing": [
[
"whatsapp"
],
[
"imessage"
]
]
}
}Try It!
This endpoint needs a bearer token. Open Settings (top right) and paste your access_token.
Body (JSON)
Request URL
PUThttps://backend.mysmsgateway.app/api/v1/ext/calls/routing
Previous
« Get call routing
Next
List ringing calls »
