curl --request POST \
--url https://api.agentline.cloud/v1/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"to_number": "<string>",
"system_prompt": "<string>",
"initial_greeting": "<string>",
"voice_id": "<string>",
"from_number_id": "<string>"
}
'import requests
url = "https://api.agentline.cloud/v1/calls"
payload = {
"agent_id": "<string>",
"to_number": "<string>",
"system_prompt": "<string>",
"initial_greeting": "<string>",
"voice_id": "<string>",
"from_number_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
to_number: '<string>',
system_prompt: '<string>',
initial_greeting: '<string>',
voice_id: '<string>',
from_number_id: '<string>'
})
};
fetch('https://api.agentline.cloud/v1/calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create Call
Make an outbound phone call from your AI agent.
Dials a real person or business from the agent’s number. The agent holds the whole conversation on its own with its system prompt, voice and greeting (or this call’s overrides). The call reaches a third party and is billed to the account at $0.12 per minute, first minute charged in full, so confirm with the user first. Not idempotent: every successful call dials again.
Prerequisites: an agent with an active number from buy_phone_number (HTTP 400 otherwise), plus remaining subscription minutes or at least $0.50 of wallet balance (HTTP 402 otherwise). Included minutes are used first; only uncovered call time is charged to the wallet.
Returns right after dialing with the call id (call_…), agent_id, from_number, to_number, direction, status and started_at; the call runs on its own. Check get_call_details for progress and call get_call_transcript once status is completed.
curl --request POST \
--url https://api.agentline.cloud/v1/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_id": "<string>",
"to_number": "<string>",
"system_prompt": "<string>",
"initial_greeting": "<string>",
"voice_id": "<string>",
"from_number_id": "<string>"
}
'import requests
url = "https://api.agentline.cloud/v1/calls"
payload = {
"agent_id": "<string>",
"to_number": "<string>",
"system_prompt": "<string>",
"initial_greeting": "<string>",
"voice_id": "<string>",
"from_number_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '<string>',
to_number: '<string>',
system_prompt: '<string>',
initial_greeting: '<string>',
voice_id: '<string>',
from_number_id: '<string>'
})
};
fetch('https://api.agentline.cloud/v1/calls', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
AgentLine API key. Get one via the email OTP flow (POST /v1/auth/otp then POST /v1/auth/verify). Pass as: Authorization: Bearer al_live_... (legacy sk_live_... still works).
Body
ID of the AI agent making the call (e.g. 'agt_abc123')
Destination phone number in E.164 format (e.g. '+12125551234')
Per-call system prompt override. Replaces the agent's default prompt for this call ONLY. If omitted, the agent's default system_prompt is used.
Per-call greeting override. Replaces the agent's default greeting for this call ONLY. If omitted, the agent's default initial_greeting is used.
Override the TTS voice for this call: preset name (e.g. 'female-1') or Cartesia UUID
Specific phone number ID to call from; defaults to the agent's assigned number
Response
Successful Response