For AI agents: markdown of this page — /docs-content-en/infra/event-subscriptions/delete.md documentation index — /llms.txt
Delete a subscription
DELETE /v1/infra/servers/:id/event-subscriptions/:subId
Deletes the subscription and unregisters the event in Bitrix24 — deliveries of this event to the application stop. The response is { "success": true } with HTTP status 200.
Parameters
| Parameter | In | Type | Req. | Description |
|---|---|---|---|---|
id |
path | string (UUID) | yes | Server ID. List: GET /v1/infra/servers |
subId |
path | string (UUID) | yes | Subscription ID. From the response of POST or GET .../event-subscriptions |
Examples
curl — personal key
curl -X DELETE -H "X-Api-Key: YOUR_API_KEY" \
https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/event-subscriptions/SUBSCRIPTION_ID
curl — OAuth application
curl -X DELETE \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/event-subscriptions/SUBSCRIPTION_ID
JavaScript — personal key
const res = await fetch(
`https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/event-subscriptions/${subId}`,
{ method: 'DELETE', headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
)
const { success } = await res.json()
JavaScript — OAuth application
const res = await fetch(
`https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/event-subscriptions/${subId}`,
{
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
}
)
const { success } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
success |
boolean | true on successful deletion |
Response example
{
"success": true
}
Error response example
404 — subscription not found:
{
"success": false,
"error": {
"code": "SUBSCRIPTION_NOT_FOUND",
"message": "Subscription not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 404 | NOT_FOUND |
Server not found or belongs to another API key |
| 404 | SUBSCRIPTION_NOT_FOUND |
Subscription with the given subId was not found for this server |
Full list of common API errors — Errors.
Known specifics
- Deleting the same subscription again returns
404 SUBSCRIPTION_NOT_FOUND. After a successful deletion there is no longer a record with thissubId, so the second call does not find the subscription. - You can also detach an event with a repeat
POST. If you need to redirect the event to a different path rather than delete the subscription, callPOSTwith the sameevent— it updates theappPathof the existing subscription.