For AI agents: markdown of this page — /docs-content-en/entities/tasks/unfavorite.md documentation index — /llms.txt

Remove a task from favorites

DELETE /v1/tasks/:taskId/favorite

Removes a task from the personal favorites list of the user the key acts on behalf of. The action is available to a participant with view access to the task — edit rights on the task are not required, unlike PATCH /v1/tasks/:id.

Parameters

Parameter In Type Required Description
taskId path integer yes Task ID. List: GET /v1/tasks

The request body is empty.

Examples

curl — personal key

Terminal
curl -X DELETE -H "X-Api-Key: YOUR_API_KEY" \
  https://vibecode.bitrix24.com/v1/tasks/289/favorite

curl — OAuth application

Terminal
curl -X DELETE -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  https://vibecode.bitrix24.com/v1/tasks/289/favorite

JavaScript — personal key

javascript
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/tasks/${taskId}/favorite`,
  { method: 'DELETE', headers: { 'X-Api-Key': 'YOUR_API_KEY' } }
)
const body = await res.json()
console.log(body.data.favorite) // false

JavaScript — OAuth application

javascript
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/tasks/${taskId}/favorite`,
  {
    method: 'DELETE',
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  }
)

Response fields

Field Type Description
success boolean true on successful removal
data.taskId integer Task ID
data.favorite boolean false — the task is removed from favorites

Response example

JSON
{
  "success": true,
  "data": {
    "taskId": 289,
    "favorite": false
  }
}

Error response example

404 — the task was not found or is inaccessible:

JSON
{
  "success": false,
  "error": {
    "code": "TASK_NOT_FOUND",
    "message": "Task 99999999 not found or not accessible."
  }
}

Errors

HTTP Code Description
400 INVALID_PARAMS taskId in the path is not a positive integer
401 MISSING_API_KEY The X-Api-Key header was not provided
401 INVALID_API_KEY Invalid or expired key
401 TOKEN_MISSING The key has no linked authorization tokens
403 SCOPE_DENIED The key lacks the task scope
403 WRITE_BLOCKED_READONLY_KEY A read-only key — the action modifies data and is blocked
404 TASK_NOT_FOUND The task was not found or is inaccessible to the user

The full list of common API errors — Errors.

Known specifics

  • The response is a slim confirmation, not the full task. Read the full task fields via GET /v1/tasks/:id.

See also