Update work-item labels
Adds, removes, or replaces normalized labels and passes Jira-backed label changes through to Jira.
POST
/api/v1/work-items/:id/labelsAuthorization
work-items:linkapi key scoperequiredRequired scope when calling with an API key.
Path parameters
idstringrequiredCanonical work-item ID
Example: work_01k2...
Request body
labelsarrayoptionalReplacement label set
addarrayoptionalLabels to add
removearrayoptionalLabels to remove
expected_versionnumberoptionalOptimistic work-item version guard
confirmbooleanrequiredMust be true
Example request
{
"add": [
"api"
],
"remove": [
"triage"
],
"expected_version": 12,
"confirm": true
}Request
curl -X POST "https://www.digitalstack360.com/api/v1/work-items/work_01k2.../labels" \
-H "Authorization: Bearer $DS_API_KEY" \
-H "Idempotency-Key: work-42-labels-v1" \
-H "Content-Type: application/json" \
-d '{"add":["api"],"remove":["triage"],"expected_version":12,"confirm":true}'Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.
Response
200 OK
{
"data": {
"work_item": {
"id": "work_01k2...",
"labels": [
"api"
],
"version": 13
},
"changed_fields": [
"labels"
]
}
}Errors
401
missing_authNo credentials provided
401
invalid_api_keyAPI key is invalid or revoked
400
bad_requestMissing or invalid request fields
403
scope_insufficientKey lacks the required write scope
403
scope_insufficientKey lacks work-items:link scope
400
label_not_allowedLabel value is not allowed