For AI agents: markdown of this page — /docs-content-en/notifications/delete.md documentation index — /llms.txt
Delete by id
DELETE /v1/notifications/:id
Deletes a notification by the identifier received when sending it. A deleted notification cannot be restored via the API.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id (path) |
number | yes | Notification identifier from the POST /v1/notifications response |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/notifications/37421" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/notifications/37421" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/notifications/37421', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
if (res.status === 204) {
console.log('Notification deleted')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/notifications/37421', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
if (res.status === 204) {
console.log('Notification deleted')
}
Response
On successful deletion an HTTP status 204 No Content with an empty body is returned — success is determined by the response status.
Response example
HTTP/1.1 204 No Content
Error response example
403 — no im scope:
{
"success": false,
"error": {
"code": "SCOPE_DENIED",
"message": "This endpoint requires 'im' scope"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 403 | SCOPE_DENIED |
The key lacks the im scope |
| 403 | WRITE_BLOCKED_READONLY_KEY |
The key is in read-only mode |
| 401 | TOKEN_MISSING |
The key has no configured tokens |
Full list of common API errors — Errors.
Known specifics
- A request for a non-existent
idalso returns204— the response code cannot distinguish deleting a real notification from deleting an already-absent one.