For AI agents: markdown of this page — /docs-content-en/notifications/settings/update.md documentation index — /llms.txt
Change a notification setting
PATCH /v1/notifications/settings
Turns one of an employee's notification delivery channels — site, mail or push — on or off for a single event of a Bitrix24 account module.
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
module |
string | yes | Module identifier, 1 to 255 characters. List: data[].id in the GET /v1/notifications/settings response |
event |
string | yes | Identifier of an event of this module, 1 to 255 characters. List: data[].notices[].id in the same response |
channel |
string | yes | Delivery channel: site, mail or push |
enabled |
boolean | yes | true — turn the channel on, false — turn it off |
userId |
number | no | ID of the employee whose setting to change — a positive integer. List: GET /v1/users. If omitted, the employee on whose behalf the call is made. Only a Bitrix24 administrator can change another employee's settings |
Examples
curl — personal key
curl -X PATCH "https://vibecode.bitrix24.com/v1/notifications/settings" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "module": "bizproc", "event": "activity", "channel": "site", "enabled": false }'
curl — OAuth application
curl -X PATCH "https://vibecode.bitrix24.com/v1/notifications/settings" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "module": "bizproc", "event": "activity", "channel": "site", "enabled": false }'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/notifications/settings', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ module: 'bizproc', event: 'activity', channel: 'site', enabled: false }),
})
const { data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/notifications/settings', {
method: 'PATCH',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({ module: 'bizproc', event: 'activity', channel: 'site', enabled: false }),
})
const { data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | true on success |
data |
boolean | Always true, including when the setting did not change |
Response example
HTTP 200:
{
"success": true,
"data": true
}
Error response example
400 — the channel is not one of the allowed values:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "Body field `channel` must be one of: site, mail, push."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 400 | INVALID_PARAMS |
module or event was not passed, is empty or longer than 255 characters. The field is named in message. Checked before the Bitrix24 call |
| 400 | INVALID_PARAMS |
channel is none of site, mail or push |
| 400 | INVALID_PARAMS |
enabled was not passed or is neither true nor false. The string "true" and the number 1 are rejected |
| 400 | INVALID_PARAMS |
userId is not a positive integer |
| 400 | INVALID_PARAMS |
The body contains a field that is not in the "Request fields" table, or the body is not a JSON object. The accepted fields are listed in message |
| 400 | INVALID_PARAMS |
A query parameter was passed. The operation accepts no query parameters |
| 401 | TOKEN_MISSING |
The key has no configured tokens |
| 403 | SCOPE_DENIED |
The key lacks the im scope |
| 403 | WRITE_BLOCKED_READONLY_KEY |
The key is in read-only mode |
| 422 | BITRIX_ERROR |
userId points to another employee, and the employee on whose behalf the call is made has no Bitrix24 administrator rights. The portal code SETTINGS_ACCESS_DENIED is in the error.b24Code field |
| 502 | ME_ALIAS_RESOLUTION_FAILED |
userId was not passed, and the employee on whose behalf the call is made could not be determined. The setting was not changed |
Full list of common API errors — Errors.
Known specifics
- A
trueresponse does not confirm the change. In two cases the setting stays unchanged, yet the response is stilltrue: the channel is indisabledfor this event, or the Bitrix24 account has no module or event with this identifier. To check the result, read the settings again withGET /v1/notifications/settings.