Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Soft delete a tag

Soft deletes a tag and automatically removes it from all associated entities (tasks, projects, or components). The tag is marked as deleted but not permanently removed from the database.

How soft deletion works:

  • The tag is marked as deleted (isDeleted flag set to true)
  • The tag is automatically removed from all entities that were using it
  • Tasks, projects, or components will no longer show this tag
  • The tag will not appear in list endpoints
  • Historical data is preserved (the tag still exists in the database)

Use cases:

  • Remove tags that are no longer needed
  • Clean up duplicate or incorrectly named tags
  • Archive tags that are no longer in use

Note: Soft deletion means the tag can potentially be restored if needed, but this endpoint does not provide restoration functionality.

Permission requirements:

  • Task tags: Requires Tasks.manageTags permission
  • Project tags: Must be an employee (not organization member)
  • Project component tags: Requires ProjectComponentsLibrary.edit OR Projects.manageComponents permission
DELETE/tags/{type}/{id}
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Responses
200
colorstring | nullrequired
The predefined color code assigned to the tag for visual organization. Null if no color has been set. Colors help users quickly identify tags in lists and cards. **Available color values:** - `default` - Light gray (default color) - `red` - Red - `yellow` - Yellow - `green` - Green - `blue` - Blue - `purple` - Purple - `fuchsia` - Fuchsia - `pink` - Pink - `magenta` - Magenta
Allowed:defaultredyellowgreenbluepurplefuchsiapinkmagentanull
idstringrequired
The unique identifier (UUID) of the tag. Use this ID when updating or deleting the tag.
isDeletedbooleanrequired
Indicates whether the tag has been soft-deleted. Soft-deleted tags are marked as deleted but not permanently removed from the database. They will not appear in list endpoints and are automatically removed from all associated entities.
namestringrequired
The display name of the tag. This is what users see when the tag is applied to tasks, projects, or components.
400Invalid tag type
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
404Tag not found
Request
curl -X DELETE "https://leadtime.app/api/public/tags/{type}/{id}" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
  "color": "blue",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "isDeleted": false,
  "name": "urgent"
}