POST
/v2/projects/{projectId}/labelsCreate a project label
Creates a label for a project. Supply name and color; description is optional and can contain up to 2000 characters. The response includes the created label and its generated identifier.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
projectIdintegerrequired
The unique integer identifier of the project to add the label to.
The label to create. Include name and color; description is optional.
colorstringrequired
Hex color in format #RRGGBB.
descriptionstringoptional
An optional description of the label. Maximum 2000 characters.
namestringrequired
The label name. Maximum 100 characters.
200Returns the created label with its `id`, `name`, `color`, and optional `description`.
colorstringrequired
descriptionstringoptional
idintegerrequired
namestringrequired
400Returned when the request body is invalid, including when required fields are missing or field values fail validation.
codestringrequired
paramsarray<object>optional
401Returned when the request is unauthenticated.
codestringrequired
paramsarray<object>optional
403Returned when you do not have permission to create a label for the project.
codestringrequired
paramsarray<object>optional
404Returned when the project is not found.
codestringrequired
paramsarray<object>optional
Error handling
A 400 is returned when the request body is invalid, a 401 when authentication is missing or invalid, a 403 when you lack permission, and a 404 when the project is not found. The projectId path parameter must identify an existing project. The body must include name and color; name can contain at most 100 characters, and color must match the #RRGGBB hex format.