Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

Create a new tag

Creates a new tag of the specified type. If a tag with the same name already exists (case-insensitive), returns the existing tag instead of creating a duplicate.

How tag creation works:

  • Provide a tag name (required)
  • The system checks for existing tags with the same name (case-insensitive)
  • If a tag exists, it is returned (no duplicate created)
  • If no tag exists, a new one is created
  • Tag color can be set later using the save endpoint

Tag Colors: Tags use predefined color codes, not hex values. Available colors: default, red, yellow, green, blue, purple, fuchsia, pink, magenta.

Use cases:

  • Create standard tags for recurring topics (e.g., “Billing”, “Support”, “Onboarding”)
  • Organize tasks by process or workflow stage
  • Enable cross-project filtering and analysis
  • Set up cascading tags in project components for automatic inheritance

Best practices:

  • Use consistent naming to avoid duplicates (e.g., do not use both “Billing” and “Invoice”)
  • Create standard tags for recurring topics to keep your team organized
  • Use colors strategically for visual organization (set via save endpoint)

Permission requirements:

  • Task tags: Requires Tasks.createTags permission
  • Project tags: Must be an employee (not organization member)
  • Project component tags: Requires ProjectComponentsLibrary.edit OR Projects.manageComponents permission
POST/tags/{type}/create
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
typestringrequired
The type of tags to work with. Determines which tag category you are accessing: - "task": Tags for individual tasks/tickets across all projects - "project": Tags for categorizing entire projects - "project-component": Tags used in project component library (with cascading inheritance) - "organization": Tags for categorizing organizations - "object": Tags for workspace object instances - "form-template": Tags for workspace form templates (administration)
Allowed:taskprojectproject-componentorganizationobjectform-template
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
namestringrequired
The name of the tag to create. Must be unique within the tag type (case-insensitive). If a tag with this name already exists, the existing tag will be returned instead of creating a duplicate. Use descriptive names that clearly indicate the topic or process (e.g., "Billing", "Support", "Onboarding").
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 or duplicate name
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/tags/task/create" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "urgent"
}'
Response
{
  "color": "blue",
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "isDeleted": false,
  "name": "urgent"
}