For AI agents: markdown of this page — /docs-content-en/workday/status.md documentation index — /llms.txt
Current status
GET /v1/workday/status
Returns the current state of an employee's workday: status, start and finish time, duration, breaks.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userId |
number | no | Employee identifier. Defaults to the user who owns the key's tokens. Other employees' userId is available only to Bitrix24 account administrators and the employee's direct managers — otherwise Bitrix24 returns an access error |
Examples
curl — personal key
curl -H "X-Api-Key: YOUR_API_KEY" \
https://vibecode.bitrix24.com/v1/workday/status
curl — another employee's status
curl -H "X-Api-Key: YOUR_API_KEY" \
"https://vibecode.bitrix24.com/v1/workday/status?userId=503"
curl — OAuth application
curl -H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
https://vibecode.bitrix24.com/v1/workday/status
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/workday/status', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
console.log('Status:', data.status)
console.log('Active day:', data.active)
console.log('Duration:', data.duration)
JavaScript — another employee's status
const res = await fetch('https://vibecode.bitrix24.com/v1/workday/status?userId=503', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/workday/status', {
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.status |
string | Day status: OPENED, CLOSED, PAUSED, EXPIRED |
data.timeStart |
string | Start date and time of the current or last day (ISO 8601) |
data.timeFinish |
string | null | Finish date and time. null for a day that is not closed. For a day in PAUSED — the start of the current pause |
data.duration |
string | Day duration in HH:MM:SS format |
data.timeLeaks |
string | Total duration of pauses for the day in HH:MM:SS format |
data.active |
boolean | Active workday record flag |
data.ipOpen |
string | IP address of the day start. Empty string if the day was started without IP capture |
data.ipClose |
string | IP address of the day finish. Empty string for a day that is not closed |
data.latOpen |
number | Geographic latitude of the start point. 0 — coordinates were not passed |
data.lonOpen |
number | Geographic longitude of the start point |
data.latClose |
number | Geographic latitude of the finish point |
data.lonClose |
number | Geographic longitude of the finish point |
data.tzOffset |
number | Employee's time zone offset in seconds (depends on the employee's settings in the Bitrix24 account — the example 0 corresponds to UTC) |
When the requested employee has no workday record, data contains only status — the other fields are absent. See "Degenerate response with no workday record" under "Known specifics".
Possible `status` values
| Status | Description |
|---|---|
OPENED |
The workday is open |
CLOSED |
The workday is closed |
PAUSED |
The workday is paused |
EXPIRED |
The workday was not closed before the start of the next calendar day |
Response example
{
"success": true,
"data": {
"status": "OPENED",
"timeStart": "2026-05-05T09:00:00+00:00",
"timeFinish": null,
"duration": "04:00:00",
"timeLeaks": "00:30:00",
"active": true,
"ipOpen": "203.0.113.10",
"ipClose": "",
"latOpen": 0,
"lonOpen": 0,
"latClose": 0,
"lonClose": 0,
"tzOffset": 0
}
}
An employee with no workday record — the response collapses to a single status field:
{
"success": true,
"data": {
"status": "CLOSED"
}
}
Error response example
403 — the key lacks the timeman scope:
{
"success": false,
"error": {
"code": "SCOPE_DENIED",
"message": "This endpoint requires 'timeman' scope"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_PARAMS |
userId is not a positive integer |
| 401 | MISSING_API_KEY |
The X-Api-Key header was not passed |
| 401 | INVALID_API_KEY |
Invalid API key |
| 401 | KEY_EXPIRED |
The API key has expired |
| 401 | TOKEN_MISSING |
The key has no OAuth tokens configured for the portal |
| 402 | ACCOUNT_FROZEN |
The portal balance is frozen |
| 403 | SCOPE_DENIED |
The key lacks the timeman scope |
| 422 | BITRIX_ERROR |
Bitrix24 rejected the request — text is in message (for example, no permission for another user's userId) |
| 429 | RATE_LIMITED |
The request limit to Bitrix24 was exceeded |
| 502 | BITRIX_UNAVAILABLE |
The Bitrix24 portal is unavailable |
The full list of common API errors — Errors.
Known specifics
- State after closing. After the day is closed, the endpoint keeps returning the details of the last day (
CLOSED, withtimeFinishfilled in) until the next one is opened — the report for the closed day is available through the same request. - The record may be from any date — check
timeStartagainst today.statusandtimeStartdescribe the employee's most recent workday record, which can be arbitrarily old: Bitrix24timeman.statusreturns the last record regardless of age. A dayCLOSEDthree years ago, or a day leftEXPIRED(opened and never closed) five days ago, are both returned verbatim — neither means "today". This endpoint has no "today only" filter, so to decide whether the day belongs to the current date, compare the date part oftimeStartwith the current date on your side before trustingstatus. For a team-status dashboard, treat a record whosetimeStartis not today as "no workday started today". - Degenerate response with no workday record. When the requested employee has no workday record,
datacontains only thestatusfield. The other fields (timeStart,timeFinish,duration, and the rest) are absent from the response, so check that a field is present before reading it. There is no record, for example, for an employee whose day has never been opened. - Closing an expired day. In the
EXPIREDstatus the day is closed retroactively. Pass thetimeparameter toPOST /v1/workday/closewith a date equal to the day's start date — thetimeStartvalue from this endpoint's response — together with the requiredreport. Atimedate other than the start date returns422.
See also
- Open workday —
POST /v1/workday/open. - Close workday —
POST /v1/workday/close. - Pause —
POST /v1/workday/pause. - Tracking settings —
GET /v1/workday/settings. - Workday — section overview.