Get a List of Available Events
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Who can execute the method: any user
Retrieves Bitrix24 event codes. The application uses this list to choose which events to subscribe to with the event.bind method. The events included in the list depend on the SCOPE and FULL parameters.
The method works only in the context of authorizing the application. When called through a webhook, it returns the WRONG_AUTH_TYPE error.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
SCOPE |
Scope whose events you need to retrieve, for example If you pass an empty string, the method returns only the common application events. For an unknown scope, the method returns an empty array without an error |
|
FULL |
If you pass The parameter has no effect if |
If no parameters are passed, the method returns events from the application's scope and common events available to any application: for example, ONAPPINSTALL and ONOFFLINEEVENT.
Code Examples
How to Use Examples in Documentation
Example №1
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"SCOPE": "user",
"auth": "**put_access_token_here**"
}' \
https://**put_your_bitrix24_address**/rest/events
Example №2
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"FULL": true,
"auth": "**put_access_token_here**"
}' \
https://**put_your_bitrix24_address**/rest/events
Example №1
BX24.callMethod(
"events",
{
"SCOPE": "user"
},
function(result)
{
if(result.error())
console.error(result.error());
else
console.dir(result.data());
}
);
Example №2
BX24.callMethod(
"events",
{
"FULL": true
},
function(result)
{
if(result.error())
console.error(result.error());
else
console.dir(result.data());
}
);
Example №1
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.events(
scope="user",
).response
result = bitrix_response.result
print(result)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
Example №2
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.events(
full=True,
).response
result = bitrix_response.result
print(result)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected error: {error}")
Example №1
require_once('crest.php');
$result = CRest::call(
'events',
[
'SCOPE' => 'user'
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Example №2
require_once('crest.php');
$result = CRest::call(
'events',
[
'FULL' => true
]
);
echo '<PRE>';
print_r($result);
echo '</PRE>';
Response Handling
HTTP status: 200
Response to the first example — a request with SCOPE: "user":
{
"result": [
"ONUSERADD"
],
"time": {
"start": 1790304784,
"finish": 1790304784.638336,
"duration": 0.6383359432220459,
"processing": 0,
"date_start": "2026-09-25T05:53:04+03:00",
"date_finish": "2026-09-25T05:53:04+03:00",
"operating_reset_at": 1790305384,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
An array of strings — symbolic event codes in uppercase, for example The codes included in the array depend on the |
|
time |
Information about the request execution time |
Error Handling
HTTP status: 403
{
"error": "WRONG_AUTH_TYPE",
"error_description": "Current authorization type is denied for this method"
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Status |
Code |
Error message |
Description |
|
|
|
Current authorization type is denied for this method |
The method was called outside an application, for example, through a webhook |
Statuses and System Error Codes
HTTP Status: 4xx, 5xx
The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — |
|
|
|
No active webhook with the specified user identifier and secret code was found |
|
|
|
No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope |
|
|
|
The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |
Continue Learning
- Events: Overview of Methods and Events
- Register a New Event Handler event.bind
- Retrieve a List of Registered Event Handlers event.get
- Unregister Event Handler event.unbind
- Security in Handlers
- Offline Events
- Get a List of Offline Events event.offline.list
- Retrieve a List of Offline Events With Cleanup event.offline.get
- Clear Offline Event Queue event.offline.clear
- Register Offline Event Queue Processing Errors event.offline.error
- Event on New Entries in the Offline Event Queue onOfflineEvent