#Send an event to a process

POST /v1/workflows/event

Passes output values to a paused business process and resumes its execution. After the call, the process continues with the passed 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

Terminal
curl -X POST https://vibecode.bitrix24.tech/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

Terminal
curl -X POST https://vibecode.bitrix24.tech/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

javascript
const res = await fetch('https://vibecode.bitrix24.tech/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

javascript
const res = await fetch('https://vibecode.bitrix24.tech/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 is accepted and process execution has resumed

#Response example

JSON
{
  "success": true,
  "data": true
}

#Error response example

403 — invalid token:

JSON
{
  "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

  • eventToken is one-time. Each pause of a business process generates a new token. The token becomes invalid immediately after the /event call.
  • Difference from /v1/workflows/activity-log. Both endpoints accept eventToken, but /event completes the activity and resumes the process with the passed returnValues, while /activity-log only writes a message to the log without changing the process state. Use /activity-log to record intermediate steps; use /event for the final response.

#See also