Link work-item dependency
Creates one relationship after validating both work items are visible and the relationship is allowed.
POST
/api/v1/work-items/:id/dependenciesAuthorization
work-items:linkapi key scoperequiredRequired scope when calling with an API key.
Path parameters
idstringrequiredCanonical source work-item ID
Example: work_01k2...
Request body
target_work_item_idstringrequiredTarget work-item ID
relationshipstringoptional"depends_on" | "blocks" | "blocked_by" | "related" | "duplicate" | "parent" | "child"Relationship type
expected_versionnumberoptionalOptimistic work-item version guard
confirmbooleanrequiredMust be true
Example request
{
"target_work_item_id": "work_01k3...",
"relationship": "depends_on",
"expected_version": 13,
"confirm": true
}Request
curl -X POST "https://www.digitalstack360.com/api/v1/work-items/work_01k2.../dependencies" \
-H "Authorization: Bearer $DS_API_KEY" \
-H "Idempotency-Key: work-42-dep-work-43-v1" \
-H "Content-Type: application/json" \
-d '{"target_work_item_id":"work_01k3...","relationship":"depends_on","expected_version":13,"confirm":true}'Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.
Response
200 OK
{
"data": {
"dependency": {
"id": "dep_01k7...",
"relationship": "depends_on"
},
"changed_fields": [
"dependencies"
]
}
}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
dependency_cycleA work item cannot depend on itself
400
relationship_not_allowedRelationship is not allowed