Calls
Trigger a call
Call one person now.
curl -X POST https://app.scalysis.com/api/v1/calls/trigger \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scriptId": 2207,
"customerPhone": "9149874123",
"customerName": "Rahul",
"orderNumber": "ORD-1001",
"brand_name": "Acme Store"
}'
const res = await fetch("https://app.scalysis.com/api/v1/calls/trigger", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SCALYSIS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
scriptId: 2207,
customerPhone: "9149874123",
customerName: "Rahul",
brand_name: "Acme Store",
}),
});
const { order_id } = await res.json();
import os, requests
res = requests.post(
"https://app.scalysis.com/api/v1/calls/trigger",
headers={"Authorization": f"Bearer {os.environ['SCALYSIS_API_KEY']}"},
json={
"scriptId": 2207,
"customerPhone": "9149874123",
"customerName": "Rahul",
"brand_name": "Acme Store",
},
)
order_id = res.json()["order_id"]
{
"success": true,
"action": "trigger_call",
"order_id": 1368642,
"script_id": 2207,
"call_status": "in_progress",
"message": "Call started"
}
{
"success": false,
"error": "Missing required script variables: brand_name"
}
{
"success": false,
"error": "Could not start the call. Please try again.",
"order_id": 1368642,
"call_status": "queued"
}
Starts one outbound call right away and returns an
order_id to track it.
Body
number
required
Agent ID. The number in the agent’s dashboard URL.
string
required
Number to call.
9149874123 or +919149874123.string
Fills
{customer_name} in the agent.string
Fills
{order_number}. Also shown in the dashboard.string
Fills
{order_notes}.string
Groups API calls under this name in the dashboard.
string
Any other variable your agent uses, by name. For example
"brand_name": "Acme". See variables.curl -X POST https://app.scalysis.com/api/v1/calls/trigger \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scriptId": 2207,
"customerPhone": "9149874123",
"customerName": "Rahul",
"orderNumber": "ORD-1001",
"brand_name": "Acme Store"
}'
const res = await fetch("https://app.scalysis.com/api/v1/calls/trigger", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SCALYSIS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
scriptId: 2207,
customerPhone: "9149874123",
customerName: "Rahul",
brand_name: "Acme Store",
}),
});
const { order_id } = await res.json();
import os, requests
res = requests.post(
"https://app.scalysis.com/api/v1/calls/trigger",
headers={"Authorization": f"Bearer {os.environ['SCALYSIS_API_KEY']}"},
json={
"scriptId": 2207,
"customerPhone": "9149874123",
"customerName": "Rahul",
"brand_name": "Acme Store",
},
)
order_id = res.json()["order_id"]
{
"success": true,
"action": "trigger_call",
"order_id": 1368642,
"script_id": 2207,
"call_status": "in_progress",
"message": "Call started"
}
{
"success": false,
"error": "Missing required script variables: brand_name"
}
{
"success": false,
"error": "Could not start the call. Please try again.",
"order_id": 1368642,
"call_status": "queued"
}
Response
number
Save this. Use it to get the result.
string
in_progress when the call is dialing.Errors
| Status | Why |
|---|---|
400 | Missing scriptId, customerPhone or an agent variable, or the agent is inbound-only. |
401 | Bad API key. |
404 | Agent not found in your account. |
502 | Saved, but the call could not start. Retry in a minute. |
⌘I
curl -X POST https://app.scalysis.com/api/v1/calls/trigger \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scriptId": 2207,
"customerPhone": "9149874123",
"customerName": "Rahul",
"orderNumber": "ORD-1001",
"brand_name": "Acme Store"
}'
const res = await fetch("https://app.scalysis.com/api/v1/calls/trigger", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SCALYSIS_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
scriptId: 2207,
customerPhone: "9149874123",
customerName: "Rahul",
brand_name: "Acme Store",
}),
});
const { order_id } = await res.json();
import os, requests
res = requests.post(
"https://app.scalysis.com/api/v1/calls/trigger",
headers={"Authorization": f"Bearer {os.environ['SCALYSIS_API_KEY']}"},
json={
"scriptId": 2207,
"customerPhone": "9149874123",
"customerName": "Rahul",
"brand_name": "Acme Store",
},
)
order_id = res.json()["order_id"]
{
"success": true,
"action": "trigger_call",
"order_id": 1368642,
"script_id": 2207,
"call_status": "in_progress",
"message": "Call started"
}
{
"success": false,
"error": "Missing required script variables: brand_name"
}
{
"success": false,
"error": "Could not start the call. Please try again.",
"order_id": 1368642,
"call_status": "queued"
}

