Skip to content
Leadtime
English
Esc
↑↓navigate↵open⌘Jpreview

Toggle favorite on/off

Toggles a favorite for a specific entity (task, project, organization, or command). If the entity is currently favorited, it will be removed from favorites. If it is not favorited, it will be added to favorites.

Entity Types:

  • Project: Favorite a project
  • Task: Favorite a task
  • Organization: Favorite an organization
  • Command: Favorite a command (for command palette)

Favorites are user-specific and workspace-scoped. Each user maintains their own list of favorites. When adding a new favorite, it is automatically appended to the end of the favorites list. The response indicates whether the entity is now favorited (isFavorite: true) or not (isFavorite: false).

POST/account/favorites/toggle
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
fieldsToReturnstring

Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.

responseShapestring

Advanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:compactfull
Header parameters
LT-Response-Shapestring

Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:full
Request body
requiredapplication/json
entityIdstringrequired

The unique identifier (UUID) of the entity to favorite or unfavorite. This is the ID of the task, project, organization, or command you want to toggle.

entityTypestringrequired

The type of entity being favorited. Determines which entity table to check and what metadata to return. Valid values: Project, Task, Organization, Command.

Allowed:ProjectTaskOrganizationCommand
Responses
200

Favorite status toggled successfully

isFavoritebooleanrequired

Whether the entity is now favorited after the toggle operation. True means the entity was added to favorites, false means it was removed.

400

Invalid entity ID or entity type

401

Unauthorized - Invalid or missing authentication token

403

Forbidden - Insufficient API scopes or permissions

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://leadtime.app/api/public/account/favorites/toggle" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "entityId": "550e8400-e29b-41d4-a716-446655440000",
  "entityType": "Task"
}'
Response
{
  "isFavorite": true
}