For AI agents: markdown of this page — /docs-content-en/calendar/endpoints.md documentation index — /llms.txt
"Calendar" section endpoints
Switch between calendar methods. Each tab opens the corresponding endpoint page with parameters, code examples, and real responses.
Bitrix24 API: calendar.settings.get · Scope: calendar
Calendar settings
GET /v1/calendar/settings
Returns the calendar settings of the Bitrix24 account: the start and end of the work day, weekly days off, holidays, working weekend days, and the first day of the week. These are the same values the Bitrix24 interface uses to mark non-working days.
Parameters
No parameters.
Examples
curl — personal key
curl -H "X-Api-Key: YOUR_API_KEY" \
https://vibecode.bitrix24.com/v1/calendar/settings
curl — OAuth application
curl -H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
https://vibecode.bitrix24.com/v1/calendar/settings
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/calendar/settings', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data, meta } = await res.json()
if (meta?.warnings?.some((w) => w.code === 'calendar_settings_partial')) {
throw new Error('The key owner is not an employee of this account — the settings cannot be read')
}
const weekends = data.weekHolidays
const holidays = data.yearHolidays ? data.yearHolidays.split(',') : []
console.log('Work day:', data.workTimeStart, '—', data.workTimeEnd)
console.log('Weekly days off:', weekends.join(', '))
console.log('Holidays in the list:', holidays.length)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/calendar/settings', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | true on a successful response |
data.workTimeStart |
string | number | The hour the work day starts |
data.workTimeEnd |
string | number | The hour the work day ends. A fractional value means minutes — 23.3 reads as 23:30 |
data.weekHolidays |
array | Weekly days off — SU, MO, TU, WE, TH, FR, SA |
data.weekStart |
string | The first day of the week, in the same format as weekHolidays |
data.yearHolidays |
string | Holidays, comma-separated, in D.MM or DD.MM format — 1.01,25.12 or 01.01,25.12. The leading zero follows the account language, so parse both forms. An empty string means the list is not filled in for the Bitrix24 account |
data.yearWorkdays |
string | Working weekend days, comma-separated, in the same format as yearHolidays |
data.userNameTemplate |
string | The display template for an employee name — #NAME# #LAST_NAME# |
data.userShowLogin |
string | boolean | Whether the login is shown next to an employee name |
data.syncByPush |
string | boolean | Whether calendar synchronization via notifications is enabled |
data.depManagerSub |
string | boolean | Whether a department head sees the calendars of their subordinates |
data.deniedSuperposeTypes |
array | Calendar types that may not be overlaid on a personal calendar |
data.pathToUser |
string | URL template of an employee profile. The placeholder is #user_id# |
data.pathToUserCalendar |
string | URL template of a personal calendar |
data.pathToGroup |
string | URL template of a workgroup. The placeholder is #group_id# |
data.pathToGroupCalendar |
string | URL template of a workgroup calendar |
data.pathToVr |
string | URL template of meeting rooms |
data.pathToRm |
string | URL template of resource booking |
data.rmIblockType |
string | Information block type of meeting rooms |
data.rmIblockId |
string | Information block identifier of meeting rooms |
data.rmForSites |
string | boolean | Whether meeting rooms are shared across all sites of the Bitrix24 account |
data.pathes |
array | Section URLs for individual sites of the Bitrix24 account. Always empty through this endpoint |
data.pathesForSites |
string | boolean | Whether section URLs are set per site |
data.forumId |
string | Identifier of the forum that event discussions are attached to |
meta.warnings |
array | Appears only when Bitrix24 returns a reduced set. Element format — code and message |
Beyond the fields listed above, the response carries section addresses for non-standard calendar types — one field per type, named like path_to_type_location. Such field names arrive exactly as Bitrix24 returns them, so the response field set is not fixed.
Response example
{
"success": true,
"data": {
"workTimeStart": "10",
"workTimeEnd": "22",
"yearHolidays": "",
"yearWorkdays": "",
"weekHolidays": ["SA", "SU"],
"weekStart": "MO",
"userNameTemplate": "#NAME# #LAST_NAME#",
"syncByPush": "",
"userShowLogin": "1",
"pathToUser": "/company/personal/user/#user_id#/",
"pathToUserCalendar": "/company/personal/user/#user_id#/calendar/",
"pathToGroup": "/workgroups/group/#group_id#/",
"pathToGroupCalendar": "/workgroups/group/#group_id#/calendar/",
"pathToVr": "",
"pathToRm": "",
"rmIblockType": "",
"rmIblockId": "",
"depManagerSub": "1",
"deniedSuperposeTypes": [],
"pathesForSites": "",
"pathes": [],
"forumId": "1",
"rmForSites": "1",
"path_to_type_company_calendar": "/calendar/",
"path_to_type_events": "",
"path_to_type_location": "",
"path_to_type_resource": ""
}
}
Error response example
403 — the key has no calendar scope:
{
"success": false,
"error": {
"code": "SCOPE_DENIED",
"message": "This endpoint requires 'calendar' scope"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 401 | MISSING_API_KEY |
The X-Api-Key header was not sent |
| 401 | INVALID_API_KEY |
Invalid API key |
| 401 | KEY_EXPIRED |
The API key has expired |
| 401 | TOKEN_MISSING |
The key has no tokens configured for the portal |
| 402 | ACCOUNT_FROZEN |
The account balance is frozen |
| 403 | SCOPE_DENIED |
The key has no calendar scope |
| 422 | BITRIX_ERROR |
Bitrix24 rejected the request — the text is in message |
| 429 | RATE_LIMITED |
More than 120 requests per minute per Bitrix24 account reached this endpoint, or the request rate limit to Bitrix24 was exceeded |
| 502 | BITRIX_UNAVAILABLE |
The portal is unavailable or returned a response with an unexpected structure |
The full list of common API errors — Errors.
Known specifics
A reduced response for a key owned by an external user. When the key owner is not an employee of the Bitrix24 account, Bitrix24 returns two fields —
workTimeStartandworkTimeEnd— carrying the default values9and19instead of the account settings. Such a response cannot be told apart from a configured account by its values alone, so the response carriesmeta.warningswith the codecalendar_settings_partial. Check that field before you use the work day bounds. To read the full set of settings, use a key that belongs to an employee of the Bitrix24 account.Values arrive as strings, and an unset field arrives as an empty string. An option that is on arrives as
"1", and an option that is off arrives as an empty string. The endpoint never returnsYorN, so comparing againstNgives a wrong result on every configured account. Test the value for truthiness instead of comparing it with a specific string. An option that was never saved for the account arrives as a boolean rather than a string, so the handler must accept both forms.An empty holiday list does not mean there are no holidays. An empty string means the list is not filled in for the account, not that the year has no holidays.
A non-empty list does not mean an administrator filled it in. The
yearHolidaysandyearWorkdaysfields have three states, not two: an administrator filled the list in; the list is empty; or the administrator never opened the settings and a localised default set arrived. The third state is indistinguishable from the first by the response alone. The default set is chosen by account language rather than by country, and for some languages it matches the Russian one — an account in another country using a language from that group returns Russian holidays. Do not mark up a calendar from it as if it were confirmed data.A day arrives both with and without a leading zero. The same holiday reads as
1.01or01.01depending on the account language. Comparing against one form only fails silently: there is no error, the day simply comes out as a working one. Normalise both the list entries and the lookup key to a single form.A limit of 120 requests per minute per Bitrix24 account. A limit of this endpoint alone, on top of the shared request limit to Bitrix24. It exists because reading the settings can make Bitrix24 write a service option of the account, so frequent polling costs more than an ordinary read. The settings change rarely — cache the response on your side instead of polling.
The settings belong to the whole Bitrix24 account. The response does not depend on whose calendar is read and carries no personal preferences of an employee.
Hours are given in the time zone of the Bitrix24 account.
workTimeStartandworkTimeEndare hours rather than full timestamps, so comparing them with an event timestamp requires converting to the time zone of the account.