List lines
/api/v1/ext/calls/lines
Every line of a workspace that can carry a call, on every medium, and whether calling is on for it.
The dashboard's Calling overview for one workspace: its Mac (FaceTime), each SIM in its Android gateway phone (one line per SIM slot, with the SIM's number and carrier), its WhatsApp numbers, and its Twilio numbers and verified caller IDs. calling_enabled is the line's calling switch; can_enable whether it could be switched on now (the phone on with a SIM in, the WhatsApp session ready, the Twilio number voice-capable). Calling is switched on per line in the dashboard's Calling settings (a billed add-on), so this is read-only here. A medium whose store cannot be read at the moment is named in meta.unavailable instead of failing the call.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workspace_id | query | number | yes | A workspace of the installer. |
| channel | query | enum | no | One medium only. |
Responses
| Status | When |
|---|---|
200 | OK |
400 | Unknown channel |
401 | Missing or invalid token |
403 | Missing scope |
404 | Workspace does not exist or is not the installer's (same response for both) |
curl -X GET "https://backend.mysmsgateway.app/api/v1/ext/calls/lines" \
-H "Authorization: Bearer <ACCESS_TOKEN>"{
"success": true,
"data": [
{
"id": "11",
"channel": "imessage",
"name": "Office Mac",
"number": null,
"status": "online",
"calling_enabled": true,
"can_enable": true,
"is_default": true,
"device_id": "A1B2C3D4-MAC"
},
{
"id": "7:0",
"channel": "android",
"name": "Pixel 7",
"number": "+61400000077",
"status": "online",
"calling_enabled": true,
"can_enable": true,
"is_default": null,
"device_id": 7,
"slot": 0,
"sim_name": "Sales SIM",
"carrier": "Telstra",
"model": "Pixel 7"
},
{
"id": "7:1",
"channel": "android",
"name": "Pixel 7",
"number": null,
"status": "online",
"calling_enabled": false,
"can_enable": false,
"is_default": null,
"device_id": 7,
"slot": 1,
"sim_name": null,
"carrier": null,
"model": "Pixel 7"
},
{
"id": "21",
"channel": "whatsapp",
"name": "Sales",
"number": "+61400000099",
"status": "ready",
"calling_enabled": true,
"can_enable": true,
"is_default": true
},
{
"id": "3|n:40",
"channel": "twilio",
"name": null,
"number": "+15550001111",
"status": "number",
"calling_enabled": false,
"can_enable": true,
"is_default": null,
"twilio_account_id": 3,
"ref": "n:40"
}
]
}A workspace of the installer.
One medium only.
« Place a missed call
Get call routing »
