For AI agents: markdown of this page — /docs-content-en/entities/tasks/time/delete.md documentation index — /llms.txt
Delete a time-tracking entry
DELETE /v1/tasks/:taskId/time/:itemId
Deletes a time-tracking entry. It cannot be restored via the API — create a new one if needed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId (path) |
number | yes | Task ID |
itemId (path) |
number | yes | Time-tracking entry ID |
Examples
curl — personal key
curl -X DELETE "https://vibecode.bitrix24.com/v1/tasks/289/time/161" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE "https://vibecode.bitrix24.com/v1/tasks/289/time/161" \
-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/tasks/289/time/161', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
if (res.status === 204) {
console.log('Entry deleted')
}
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/289/time/161', {
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 the 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 — the entry was not found or is inaccessible:
{
"success": false,
"error": {
"code": "BITRIX_ERROR",
"message": "TASKS_ERROR_EXCEPTION_#512; Check listitem not found or not accessible; 512/TE/ITEM_NOT_FOUND_OR_NOT_ACCESSIBLE"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| 422 | BITRIX_ERROR |
An entry with this itemId was not found (including if it or the parent task has already been deleted) |
| 403 | SCOPE_DENIED |
The API key lacks the task scope |
| 401 | TOKEN_MISSING |
The API key has no configured tokens |
Full list of common API errors — Errors.
See also
- List entries — find the entry before deleting
- Get an entry — check the state before deleting
- Update an entry — an alternative to deletion: fix an incorrect value
- Tasks — parent entity