For AI agents: markdown of this page — /docs-content-en/automation/workflows/event.md documentation index — /llms.txt
Send an event to a process
POST /v1/workflows/event
Passes output values to a paused workflow and resumes its execution. After the call, the process continues with those values in the activity's output parameters.
Request fields (body)
| Field | Type | Req. | Description |
|---|---|---|---|
eventToken |
string | ★ | One-time token of the paused process. Bitrix24 sends it to the handler of the registered activity — see /v1/bizproc-activities or /v1/bizproc-robots |
returnValues |
object | no | Output parameter values of the activity. Defaults to {} |
logMessage |
string | no | Message for the process execution log |
Examples
curl — personal key
curl -X POST https://vibecode.bitrix24.com/v1/workflows/event \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"eventToken":"xxx.yyy.zzz","returnValues":{"result":"approved"}}'
curl — OAuth application
curl -X POST https://vibecode.bitrix24.com/v1/workflows/event \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"eventToken":"xxx.yyy.zzz","returnValues":{"result":"approved"}}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/workflows/event', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
eventToken: 'xxx.yyy.zzz',
returnValues: { result: 'approved' },
}),
})
const data = await res.json()
console.log(data.success) // true
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/workflows/event', {
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',
returnValues: { result: 'approved' },
}),
})
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | true when the event is delivered successfully |
data |
boolean | true — the event was accepted and process execution resumed |
Response example
{
"success": true,
"data": true
}
Error response example
403 — invalid token:
{
"success": false,
"error": {
"code": "BITRIX_ACCESS_DENIED",
"message": "Access denied!"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | MISSING_PARAMS |
Required parameter eventToken not provided |
| 401 | MISSING_API_KEY |
Header X-Api-Key not provided |
| 401 | INVALID_API_KEY |
Invalid or expired API key |
| 401 | TOKEN_MISSING |
The key has no connected Bitrix24 tokens |
| 401 | TOKEN_EXPIRED |
OAuth user session expired — re-authorize 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 |
Error on the Bitrix24 side |
| 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
eventTokenis one-time. Each pause of a workflow generates a new token. The token becomes invalid immediately after the/eventcall.- Difference from
/v1/workflows/activity-log. Both endpoints accepteventToken, but/eventcompletes the activity and resumes the process with the passedreturnValues, while/activity-logonly writes a message to the log without changing the process state. Use/activity-logto record intermediate steps; use/eventfor the final response.