[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-notifications\u002Fconfirm":3,"docs-tabs-notifications\u002Fconfirm":6},{"content":4,"lastmod":5},"## Execute a notification button\n\n`POST \u002Fv1\u002Fnotifications\u002F:id\u002Fconfirm`\n\nPresses a button on a request notification on behalf of the token owner: runs the button action, such as accepting an invitation or confirming a request, and deletes the notification.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Notification identifier — the `data.notifications[].id` field in the [notification feed](.\u002Flist.md) `GET \u002Fv1\u002Fnotifications`. A positive integer |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `value` | string, number | yes | Value of the pressed button from the `data.notifications[].notifyButtons` field of the [notification feed](.\u002Flist.md) — the part of the button's `COMMAND_PARAMS` after the `\\|` character. For `\"38959\\|Y\"` it is `Y`. An empty string, `0` and `\"0\"` are not accepted |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fnotifications\u002F38959\u002Fconfirm\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"value\": \"Y\" }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fnotifications\u002F38959\u002Fconfirm\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"value\": \"Y\" }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fnotifications\u002F38959\u002Fconfirm', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ value: 'Y' }),\n})\n\nconst { data } = await res.json()\nconsole.log(data.resultMessage[0])\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fnotifications\u002F38959\u002Fconfirm', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ value: 'Y' }),\n})\n\nconst { data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on success |\n| `data.resultMessage` | string[] | Result messages. Bitrix24 writes the text — escape it before displaying it in a UI |\n\n## Response example\n\nHTTP 200:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"resultMessage\": [\"Invitation accepted\"]\n  }\n}\n```\n\n## Error response example\n\n422 — the notification has no buttons, or the token owner has no such notification:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"Notification is absent, unavailable to the token owner, or cannot perform this action.\",\n    \"b24Code\": \"NOTIFICATION_ACTION_FAILED\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | The path `id` is not a positive integer |\n| 400 | `INVALID_PARAMS` | `value` is missing, is neither a string nor a number, is empty or equals `0` \u002F `\"0\"` |\n| 400 | `INVALID_PARAMS` | Another body field or a query string parameter was passed, or the body is not a JSON object. The field is named in the message. Checked before the Bitrix24 call |\n| 400 | `FST_ERR_CTP_EMPTY_JSON_BODY` | The `Content-Type: application\u002Fjson` header was sent with an empty body |\n| 422 | `BITRIX_ERROR` | The notification does not exist, is unavailable to the token owner or does not perform this action — including a notification without buttons. The Bitrix24 error code `NOTIFICATION_ACTION_FAILED` is in the `error.b24Code` field |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 returned a response without the list of result messages |\n| 403 | `SCOPE_DENIED` | The key lacks the `im` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode. Checked before the Bitrix24 call |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access |\n| 401 | `TOKEN_MISSING` | The key has no configured tokens |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not sent |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- `notifyButtons` in the [feed](.\u002Flist.md) is a JSON string; for all keys, including personal keys, a string containing a secret webhook URL is replaced entirely with `[REDACTED]`. Parse the string and read the buttons' `COMMAND_PARAMS` only if the value is not `[REDACTED]`.\n- After the button is pressed, the notification is gone from the feed, and pressing it again returns `422 BITRIX_ERROR`.\n- A notification without buttons has no `notifyButtons` field in the feed, and pressing returns `422 BITRIX_ERROR`. The notification stays in the feed.\n- The button is pressed on behalf of the token owner: with a personal key, the key owner; with an OAuth application key and the `Authorization: Bearer` header, the session user.\n\n## See also\n\n- [Notification feed](.\u002Flist.md)\n- [Answer a notification](.\u002Fanswer.md)\n- [Mark as read](.\u002Fread.md)\n- [Errors](\u002Fdocs\u002Ferrors)\n","2026-10-24",{},1795415483744]