For AI agents: markdown of this page — /docs-content-en/entities/activities/delete.md documentation index — /llms.txt
Delete activity
DELETE /v1/activities/:id
Deletes an activity by ID. A deleted activity cannot be restored via the API — create a new one if needed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id (path) |
number | yes | Activity ID |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/activities/3894" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/activities/3894" \
-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/activities/3894', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
if (res.status === 204) {
console.log('Activity deleted')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/activities/3894', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
if (res.status === 204) {
console.log('Deleted')
}
Response
On successful deletion an HTTP status 204 No Content is returned with an empty body — success is determined by the status.
Response example
HTTP/1.1 204 No Content
Error response example
422 — activity not found:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "Activity is not found."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 422 | BITRIX_ERROR |
Activity not found or no permission to delete |
| 403 | SCOPE_DENIED |
The API key lacks the crm scope |
| 401 | TOKEN_MISSING |
The API key has no configured tokens |
Full list of common API errors — Errors.
See also
- List activities — find before deleting
- Batch — bulk deletion
- Limits and optimization — rate limits