For AI agents: markdown of this page — /docs-content-en/chats/messages/inform.md documentation index — /llms.txt

Notify a recipient in Do Not Disturb

POST /v1/chats/messages/:messageId/inform

Delivers your message to the other member of a personal chat as an important notification while they have Do Not Disturb on — the v2 messenger method im.v2.Chat.Message.inform. The Bitrix24 account checks the conditions: the chat is personal, you are the message author, the recipient has not seen the message yet, the message is recent, and the recipient has Do Not Disturb on.

Parameters

Parameter Type Required Description
messageId (path) number yes Message ID, a positive integer — from the chat feed (GET /v1/chats/:dialogId/messages) or from the response of sending

The request accepts no body and no query parameters: any field is rejected with 400 INVALID_PARAMS.

Examples

curl — personal key

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/chats/messages/1002/inform \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/chats/messages/1002/inform \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/messages/1002/inform', {
  method: 'POST',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const body = await res.json()
console.log(body.success ? 'Notification sent' : body.error.b24Code)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/messages/1002/inform', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const body = await res.json()
console.log(body.success ? 'Notification sent' : body.error.b24Code)

Response fields

Field Type Description
success boolean Always true on success
data.result boolean true — the notification is sent

Response example

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

Error response example

422 — the recipient does not have Do Not Disturb on:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "INFORM_USER_STATUS_ERROR",
    "b24Code": "INFORM_USER_STATUS_ERROR"
  }
}

Errors

HTTP Code Description
400 INVALID_PARAMS messageId is not a positive integer, or the request has a body field or a query parameter. Checked before any call to Bitrix24
422 BITRIX_ERROR Bitrix24 refused; the code is in error.b24Code: WRONG_CHAT_TYPE — the chat is not personal, INFORM_USER_STATUS_ERROR — the recipient does not have Do Not Disturb on, other INFORM_* codes — you are not the author, or the message has already been seen or is too old, MESSAGE_NOT_FOUND — the message does not exist
404 ENTITY_NOT_FOUND Bitrix24 returned the NOT_FOUND code; the portal code is in error.b24Code
403 BITRIX_ACCESS_DENIED The user has no access to the chat — Bitrix24 refused with the ACCESS_DENIED code
403 SCOPE_DENIED The API key does not have the im scope
403 WRITE_BLOCKED_READONLY_KEY The key is read-only — see access rights
401 TOKEN_MISSING The API key has no Bitrix24 tokens configured

Full list of common API errors — Errors.

Known specifics

Personal chats only. In a group chat the call always fails with WRONG_CHAT_TYPE.

A refusal is a normal outcome. The notification makes sense only while the recipient is in Do Not Disturb and has not seen the message; in every other case the Bitrix24 account responds with an INFORM_* code, and that is not an integration error.

See also