Start a batch
curl --request POST \
--url https://api.telleo.ai/v1/batches \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c",
"calls": [
{
"phone_number": "+919876543210",
"contact": {
"name": "Asha Verma",
"external_id": "lead-8812"
},
"variables": {
"course": "NEET 2027"
}
},
{
"phone_number": "+919812345678",
"contact": {
"name": "Rohan Das",
"external_id": "lead-8813"
},
"variables": {
"course": "JEE 2027"
}
}
]
}
'import requests
url = "https://api.telleo.ai/v1/batches"
payload = {
"agent_id": "17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c",
"calls": [
{
"phone_number": "+919876543210",
"contact": {
"name": "Asha Verma",
"external_id": "lead-8812"
},
"variables": { "course": "NEET 2027" }
},
{
"phone_number": "+919812345678",
"contact": {
"name": "Rohan Das",
"external_id": "lead-8813"
},
"variables": { "course": "JEE 2027" }
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c',
calls: [
{
phone_number: '+919876543210',
contact: {name: 'Asha Verma', external_id: 'lead-8812'},
variables: {course: 'NEET 2027'}
},
{
phone_number: '+919812345678',
contact: {name: 'Rohan Das', external_id: 'lead-8813'},
variables: {course: 'JEE 2027'}
}
]
})
};
fetch('https://api.telleo.ai/v1/batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "batch_2b9e0c1d4f6a8e7c5b3a1d0f",
"object": "batch",
"agent_id": "<string>",
"test": true,
"accepted_count": 123,
"rejected_count": 123,
"calls": [
{
"index": 123,
"id": "<string>",
"phone_number": "<string>",
"external_id": "<string>"
}
],
"rejected": [
{
"index": 123,
"phone_number": "<string>",
"code": "invalid_request",
"message": "<string>",
"call_id": "<string>"
}
]
}Batches
Start a batch
Queues up to 1,000 calls in one request. Each row is checked on its own: valid rows are queued, invalid rows come back in rejected with the row’s index. Batch calls are dialled as lines free up, behind single calls.
Scope: calls:write.
POST
/
batches
Start a batch
curl --request POST \
--url https://api.telleo.ai/v1/batches \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c",
"calls": [
{
"phone_number": "+919876543210",
"contact": {
"name": "Asha Verma",
"external_id": "lead-8812"
},
"variables": {
"course": "NEET 2027"
}
},
{
"phone_number": "+919812345678",
"contact": {
"name": "Rohan Das",
"external_id": "lead-8813"
},
"variables": {
"course": "JEE 2027"
}
}
]
}
'import requests
url = "https://api.telleo.ai/v1/batches"
payload = {
"agent_id": "17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c",
"calls": [
{
"phone_number": "+919876543210",
"contact": {
"name": "Asha Verma",
"external_id": "lead-8812"
},
"variables": { "course": "NEET 2027" }
},
{
"phone_number": "+919812345678",
"contact": {
"name": "Rohan Das",
"external_id": "lead-8813"
},
"variables": { "course": "JEE 2027" }
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c',
calls: [
{
phone_number: '+919876543210',
contact: {name: 'Asha Verma', external_id: 'lead-8812'},
variables: {course: 'NEET 2027'}
},
{
phone_number: '+919812345678',
contact: {name: 'Rohan Das', external_id: 'lead-8813'},
variables: {course: 'JEE 2027'}
}
]
})
};
fetch('https://api.telleo.ai/v1/batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "batch_2b9e0c1d4f6a8e7c5b3a1d0f",
"object": "batch",
"agent_id": "<string>",
"test": true,
"accepted_count": 123,
"rejected_count": 123,
"calls": [
{
"index": 123,
"id": "<string>",
"phone_number": "<string>",
"external_id": "<string>"
}
],
"rejected": [
{
"index": 123,
"phone_number": "<string>",
"code": "invalid_request",
"message": "<string>",
"call_id": "<string>"
}
]
}Authorizations
Your AI calling API key (vak_call_…). Authorization: Bearer <key> also works.
Body
application/json