لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/notifications.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Notifications
Notifications for Bitrix24 users: sending personal and system notifications, reading the feed with its unread counter, searching the history, marking as read, answering a notification and pressing its button, deleting by ID, by tag, or all at once, notification groups, and delivery settings per channel. Notifications appear in the Notifications section of the Bitrix24 account.
Scope: im | Base URL: https://vibecode.bitrix24.com/v1 | Authorization: X-Api-Key
Documentation sections | Quick start | Full example | Endpoint reference | Error codes
Documentation sections
- Endpoints — sending, the feed, the type dictionary, search, marking as read, answering a notification, pressing a button, deletion
- Notification groups — reading, creating, renaming and deleting groups, adding and removing conditions
- Notification settings — delivery channels per module event and the settings mode
Quick start
Send a notification to a user by their userId:
curl -X POST "https://vibecode.bitrix24.com/v1/notifications" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "userId": 1, "message": "Deal #1024 moved to the Paid stage" }'
Response (HTTP 201):
{
"success": true,
"data": {
"notificationId": 37421
}
}
Full example
Send a notification, mark it as read, and delete it:
const BASE = 'https://vibecode.bitrix24.com/v1'
const headers = {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
}
// 1. Send
const sendRes = await fetch(`${BASE}/notifications`, {
method: 'POST',
headers,
body: JSON.stringify({ userId: 1, message: 'Deal #1024 moved to the Paid stage' }),
})
const { data } = await sendRes.json()
const id = data.notificationId
// 2. Mark as read
await fetch(`${BASE}/notifications/read`, {
method: 'POST',
headers,
body: JSON.stringify({ id, onlyCurrent: true }),
})
// 3. Delete
const delRes = await fetch(`${BASE}/notifications/${id}`, {
method: 'DELETE',
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
console.log('Deleted:', delRes.status === 204)
Endpoint reference
| Method | Path | Bitrix24 method | Description |
|---|---|---|---|
| MethodPOST | Path/v1/notifications | Bitrix24 methodim.notify.personal.add | DescriptionSend a notification to a user |
| MethodGET | Path/v1/notifications | Bitrix24 methodim.notify.get | DescriptionRead the notification feed and the unread counter |
| MethodGET | Path/v1/notifications/schema | Bitrix24 methodim.notify.schema.get | DescriptionRead the notification type dictionary |
| MethodGET | Path/v1/notifications/search | Bitrix24 methodim.notify.history.search | DescriptionSearch the notification history by text, type, author and date |
| MethodPOST | Path/v1/notifications/read | Bitrix24 methodim.notify.read; with format=v2 — im.v2.Notify.read |
DescriptionMark notifications as read |
| MethodPOST | Path/v1/notifications/read-all | Bitrix24 methodim.v2.Notify.readAll | DescriptionMark all notifications as read except the listed ones |
| MethodPOST | Path/v1/notifications/:id/answer | Bitrix24 methodim.notify.answer | DescriptionAnswer a notification with text |
| MethodPOST | Path/v1/notifications/:id/confirm | Bitrix24 methodim.notify.confirm | DescriptionPress a button of a request notification |
| MethodDELETE | Path/v1/notifications/:id | Bitrix24 methodim.notify.delete | DescriptionDelete a notification by ID |
| MethodDELETE | Path/v1/notifications/by-tag/:tag | Bitrix24 methodim.notify.delete | DescriptionDelete notifications by tag (OAuth application only) |
| MethodDELETE | Path/v1/notifications | Bitrix24 methodim.v2.Notify.deleteAll | DescriptionDelete all notifications of the key owner — irreversible |
| MethodGET | Path/v1/notifications/groups | Bitrix24 methodim.v2.Notify.Group.list | DescriptionRead notification groups |
| MethodPOST | Path/v1/notifications/groups | Bitrix24 methodim.v2.Notify.Group.add | DescriptionCreate a group with its first condition |
| MethodPATCH | Path/v1/notifications/groups/:groupId | Bitrix24 methodim.v2.Notify.Group.update | DescriptionRename a group |
| MethodDELETE | Path/v1/notifications/groups/:groupId | Bitrix24 methodim.v2.Notify.Group.delete | DescriptionDelete a group and all its conditions |
| MethodPOST | Path/v1/notifications/groups/:groupId/conditions | Bitrix24 methodim.v2.Notify.Condition.add | DescriptionAdd a condition to a group |
| MethodDELETE | Path/v1/notifications/groups/:groupId/conditions | Bitrix24 methodim.v2.Notify.Condition.delete | DescriptionRemove a condition from a group |
| MethodGET | Path/v1/notifications/settings | Bitrix24 methodim.v2.Settings.Notify.list | DescriptionGet the notification delivery settings |
| MethodPATCH | Path/v1/notifications/settings | Bitrix24 methodim.v2.Settings.Notify.update | DescriptionTurn one delivery channel of an event on or off |
| MethodPUT | Path/v1/notifications/settings/scheme | Bitrix24 methodim.v2.Settings.Notify.switchScheme | DescriptionSwitch the settings mode: advanced or simple |
Interactive method switcher with examples and response fields — Endpoints.
Error codes
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeMISSING_PARAMS |
DescriptionuserId or message is missing when sending |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionWhen deleting by ID, answering or pressing a button, id is not a positive integer. When answering, text is missing; when pressing a button, value is missing; when searching, text is shorter than 3 characters and no filter is passed. For format=v2 marking, marking all as read, deleting all, answering, pressing a button, searching, groups, conditions and settings — an unknown, repeated or malformed query parameter or body field. Checked before the Bitrix24 call |
| HTTP400 | CodeINVALID_LIMIT |
Descriptionlimit is not an integer when reading the feed |
| HTTP400 | CodeVALIDATION_ERROR |
DescriptionThe lastId and lastType cursor or the convertText value is invalid when reading the feed |
| HTTP422 | CodeNOTIFICATION_NOT_DELIVERED |
DescriptionThe recipient is not on the portal or is deactivated |
| HTTP404 | CodeENTITY_NOT_FOUND |
DescriptionThe group does not exist or belongs to another user — the Bitrix24 code GROUP_NOT_FOUND is in the error.b24Code field |
| HTTP404 | CodeENTITY_NOT_FOUND |
Descriptionformat=v2 marking only: the notifications were not found and the portal message says Message is not found; error.b24Code is MESSAGE_NOT_FOUND |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 refused the request; its code is in error.b24Code: MESSAGE_NOT_FOUND (for format=v2, the portal sent only the bare code without the Message is not found text), SETTINGS_ACCESS_DENIED (another user's settings without administrator rights), 400 (a repeated group condition), NOTIFICATION_ACTION_FAILED (the notification is absent, unavailable to the token owner, or does not accept an answer or a button press) |
| HTTP403 | CodeBITRIX_ACCESS_DENIED |
DescriptionDeletion by tag was requested with a personal key instead of an OAuth application key |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the im scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is in read-only mode |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no configured tokens |
| HTTP429 | CodeRATE_LIMITED |
DescriptionFeed reading rate exceeded — up to 600 requests per minute per portal. The exact value is returned in the x-ratelimit-limit header (the cap is divided across replicas) |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionThe Bitrix24 response could not be read |
| HTTP502 | CodeME_ALIAS_RESOLUTION_FAILED |
DescriptionuserId was not passed in a settings request, and the key owner could not be determined. Nothing was sent to Bitrix24 |
Full list of common API errors — Errors.