#Write to the workflow log
POST /v1/workflows/activity-log
Adds a message to the execution log of a workflow without changing its state. The activity remains suspended. Use it to record intermediate steps of a custom activity.
#Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
eventToken |
string | ★ | One-time token of the suspended workflow. Bitrix24 sends it to the handler of the registered activity — see `/v1/bizproc-activities` or `/v1/bizproc-robots` |
logMessage |
string | ★ | Log entry text. Shown in the workflow execution log in Bitrix24 |
#Examples
#curl — personal key
curl -X POST https://vibecode.bitrix24.tech/v1/workflows/activity-log \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"eventToken":"xxx.yyy.zzz","logMessage":"Step 1 complete, awaiting confirmation"}'
#curl — OAuth application
curl -X POST https://vibecode.bitrix24.tech/v1/workflows/activity-log \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"eventToken":"xxx.yyy.zzz","logMessage":"Step 1 complete, awaiting confirmation"}'
#JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.tech/v1/workflows/activity-log', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
eventToken: 'xxx.yyy.zzz',
logMessage: 'Step 1 complete, awaiting confirmation',
}),
})
const data = await res.json()
console.log(data.success) // true
#JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.tech/v1/workflows/activity-log', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
eventToken: 'xxx.yyy.zzz',
logMessage: 'Step 1 complete, awaiting confirmation',
}),
})
#Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | true on a successful log write |
data |
null | Always null — the endpoint returns no data |
#Response example
{
"success": true,
"data": null
}
#Error response example
400 — required parameters not provided:
{
"success": false,
"error": {
"code": "MISSING_PARAMS",
"message": "Required: eventToken (string), logMessage (string)"
}
}
#Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | MISSING_PARAMS |
eventToken or logMessage not provided |
| 401 | MISSING_API_KEY |
X-Api-Key header not provided |
| 401 | INVALID_API_KEY |
Invalid or expired API key |
| 401 | TOKEN_MISSING |
The key has no connected Bitrix24 tokens |
| 401 | TOKEN_EXPIRED |
The OAuth user session has expired — reauthorize via /v1/oauth/authorize |
| 403 | SCOPE_DENIED |
The key is missing the bizproc scope |
| 403 | BITRIX_ACCESS_DENIED |
Bitrix24 rejected the request — the token is invalid, expired, or already used |
| 422 | BITRIX_ERROR |
Bitrix24-side error |
| 429 | RATE_LIMITED |
Request rate limit exceeded. Retry in 1–2 seconds |
| 502 | BITRIX_UNAVAILABLE |
Bitrix24 is unavailable |
Full list of common API errors — Errors.
#Known specifics
- Multiple entries before the final event. A single
eventTokenallows multiple/activity-logcalls — each adds a separate log entry. For long-running operations this lets you reflect progress step by step before calling `/v1/workflows/event` and completing the activity.