Preview an AI call
GET
/api/v1/ext/calls/ai/preview
Which voice agent would call this contact, without dialling.
Auth: Bearer access_token
Scope: calls.read
The same resolver *Place an AI call* uses, so the name shown before a call is the agent that calls. can_call: false carries the refusal the call would get. Nothing is created or dialled.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| workspace_id | query | number | yes | A workspace of the installer. |
| contact_id | query | number | yes | The contact. |
Responses
| Status | When |
|---|---|
200 | OK |
200 | OK — the call would be refused |
401 | Missing or invalid token |
403 | Voice agents are switched off for the account |
403 | Missing scope |
404 | Contact does not exist or is not the installer's (same response for both) |
RequestResponses
curl -X GET "https://backend.mysmsgateway.app/api/v1/ext/calls/ai/preview" \
-H "Authorization: Bearer <ACCESS_TOKEN>"OK
{
"success": true,
"data": {
"can_call": true,
"voice_agent_id": "va_01HZX",
"voice_agent_name": "Sales Voice",
"agent_name": "Sales Agent",
"matched_by": "tag",
"tag": "sales"
}
}Try It!
This endpoint needs a bearer token. Open Settings (top right) and paste your access_token.
Query parameters
A workspace of the installer.
The contact.
Request URL
GEThttps://backend.mysmsgateway.app/api/v1/ext/calls/ai/preview
Previous
« Place an AI call
Next
Get AI call »
