Reparent a work item
Runs the governed reparent operation: moves one work item under a new parent ticket (or clears the parent with null). Validates hierarchy rules including self-parenting and maximum nesting depth before writing.
/api/v1/work-items/:id/parentAuthorization
work-items:linkapi key scoperequiredPath parameters
idstringrequiredExample: work_01k2...
Request body
parent_ticket_idstringoptionalexpected_versionnumberoptionalconfirmbooleanrequired{
"parent_ticket_id": "work_01k9...",
"expected_version": 4,
"confirm": true
}Request
curl -X POST "https://www.digitalstack360.com/api/v1/work-items/work_01k2.../parent" \
-H "Authorization: Bearer $DS_API_KEY" \
-H "Idempotency-Key: reparent-work-42-v1" \
-H "Content-Type: application/json" \
-d '{"parent_ticket_id":"work_01k9...","expected_version":4,"confirm":true}'Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.
Response
{
"data": {
"ok": true,
"item": {
"id": "work_01k2...",
"parent_ticket_id": "work_01k9..."
},
"changed_fields": [
"parent_ticket_id"
],
"event_type": "work_item.reparented",
"idempotency_replayed": false
}
}Errors
missing_authNo credentials provided
invalid_api_keyAPI key is invalid or revoked
bad_requestMissing or invalid request fields
scope_insufficientKey lacks the required write scope
scope_insufficientKey lacks work-items:link scope
not_foundWork item does not exist or is outside the resolved workspace
self_parentA work item cannot be its own parent
invalid_parentParent is invalid — wrong project, wrong type, or exceeds the maximum nesting depth
provider_not_resolvedThe item’s source provider could not be resolved for write-back