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 projectTask: Favorite a taskOrganization: Favorite an organizationCommand: 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/toggleAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredQuery parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced 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:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsonentityIdstringrequiredThe 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.
entityTypestringrequiredThe type of entity being favorited. Determines which entity table to check and what metadata to return. Valid values: Project, Task, Organization, Command.
Allowed:
ProjectTaskOrganizationCommandResponses
200Favorite status toggled successfully
isFavoritebooleanrequiredWhether the entity is now favorited after the toggle operation. True means the entity was added to favorites, false means it was removed.
400Invalid entity ID or entity type
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
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"
}'const response = await fetch("https://leadtime.app/api/public/account/favorites/toggle", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"entityId": "550e8400-e29b-41d4-a716-446655440000",
"entityType": "Task"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/account/favorites/toggle",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"entityId": "550e8400-e29b-41d4-a716-446655440000",
"entityType": "Task"
},
)Response
{
"isFavorite": true
}Invalid entity ID or entity type
Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions