لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/voximplant-lines/default.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Get default outgoing line
GET /v1/voximplant-lines/default
Returns the outgoing telephony line that the Bitrix24 account uses by default. The setting is shared across the entire account. To set another line, use PUT /v1/voximplant-lines/default.
Scope: telephony | Base URL: https://vibecode.bitrix24.com/v1 | Authorization: X-Api-Key
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/voximplant-lines/default" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/voximplant-lines/default" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/voximplant-lines/default', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
console.log('Default line:', data.lineId)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/voximplant-lines/default', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
console.log('Default line:', data.lineId)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata |
Typeobject | DescriptionLine setting |
Fielddata.lineId |
Typestring | null | DescriptionID of the default outgoing line from GET /v1/voximplant-lines |
Response example
{
"success": true,
"data": {
"lineId": "reg151083"
}
}
Error response example
401 — the X-Api-Key header was not passed:
{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "API key required. Pass via X-Api-Key header."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header was not passed |
| HTTP401 | CodeINVALID_API_KEY |
DescriptionThe platform does not recognize the key string: a typo, a truncated value or a deleted key |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no access to the Bitrix24 account: a personal key has no Bitrix24 account webhook, or an application key was sent without an Authorization: Bearer header with a session token |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key does not have the telephony scope |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionBitrix24 denied access — causes |
| HTTP403 | CodeB24_TARIFF_RESTRICTION |
DescriptionThe operation is not available on the Bitrix24 account plan |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 rejected the request; the reason is in error.message |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRequest rate exceeded |
| HTTP429 | CodeQUEUE_OVERFLOW |
DescriptionThe account request queue is full, so the request is rejected without waiting. The Retry-After header suggests the delay |
| HTTP429 | CodeQUEUE_TIMEOUT |
DescriptionThe request did not get through the account queue in time and was not sent to Bitrix24. The Retry-After header suggests the delay |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 is unavailable |
| HTTP503 | CodeBITRIX_TIMEOUT |
DescriptionBitrix24 did not respond in time |
| HTTP503 | Codeuser_self_deletion_pending |
DescriptionThe key owner is deleting their user profile in the Bitrix24 account. The Retry-After header equals 604800 — the length of the deletion grace period |
Full list of common API errors — Errors.