For AI agents: markdown of this page — /docs-content-en/telephony/outbound/auto-call-audio.md documentation index — /llms.txt
Start an auto-call with audio file playback
POST /v1/calls/auto-call-audio
Dials toNumber and, after the call is answered, plays back the MP3 file at url. Bitrix24 downloads the file when the call is placed. No operator is involved. Used for call campaigns with a pre-recorded voice message.
Request fields (body)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
ParameterfromLine |
Typestring | Requiredyes | Default— | DescriptionOutbound call line ID. List of lines — GET /v1/voximplant-lines |
ParametertoNumber |
Typestring | Requiredyes | Default— | DescriptionPhone number in international format |
Parameterurl |
Typestring | Requiredyes | Default— | DescriptionDirect HTTPS link to an MP3 file |
Examples
curl — personal key
curl -X POST https://vibecode.bitrix24.com/v1/calls/auto-call-audio \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fromLine": "YOUR_LINE_ID",
"toNumber": "+12025550123",
"url": "https://example.com/audio/greeting.mp3"
}'
curl — OAuth application
curl -X POST https://vibecode.bitrix24.com/v1/calls/auto-call-audio \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fromLine": "YOUR_LINE_ID",
"toNumber": "+12025550124",
"url": "https://example.com/audio/greeting.mp3"
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/calls/auto-call-audio', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
fromLine: 'YOUR_LINE_ID',
toNumber: '+12025550125',
url: 'https://example.com/audio/greeting.mp3',
}),
})
const { success, data } = await res.json()
const callId = data.callId
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/calls/auto-call-audio', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
fromLine: 'YOUR_LINE_ID',
toNumber: '+12025550126',
url: 'https://example.com/audio/greeting.mp3',
}),
})
const { success, data } = await res.json()
const callId = data.callId
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionResult of starting the call |
Fielddata.result |
Typeboolean | Descriptiontrue when the call is initiated successfully |
Fielddata.callId |
Typestring | DescriptionIdentifier of the initiated call with the infocall. prefix |
Response example
HTTP 200 — call initiated:
{
"success": true,
"data": {
"result": true,
"callId": "infocall.b7e1d4c2a9f03e8b6d5c2a1f4e9b7d03.1777975100"
}
}
Error response example
400 — required parameters not provided:
{
"success": false,
"error": {
"code": "MISSING_PARAMS",
"message": "Required: fromLine (string — ID from GET /v1/voximplant-lines), toNumber (string), url (string — URL to audio file)"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeMISSING_PARAMS |
DescriptionfromLine, toNumber, or url not provided |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionX-Api-Key header not provided |
| HTTP401 | CodeINVALID_API_KEY |
DescriptionThe key is not recognized — no such key exists on the platform |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no configured Bitrix24 tokens |
| HTTP401 | CodeKEY_INACTIVE |
DescriptionAPI key is inactive or revoked |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the telephony scope |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 returned an error (message in error.message) |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRequest limit exceeded |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 is unavailable |
Full list of common API errors — Errors.
Known specifics
File format and availability. The file must be in MP3 format and accessible via a direct HTTPS link without authorization. Bitrix24 downloads the file when the call is placed — if the link is unavailable, BITRIX_ERROR is returned.
Record in statistics. After the call ends, it appears in the statistics with CALL_TYPE: "5".
Limit and line restrictions — the same as for the auto-call with speech synthesis: the monthly quota and the ban on using the base line.