Skip to content

Create a work item dependency ​

POST/api/v2/workspaces/{slug}/projects/{project_id}/work-items/{work_item_id}/dependencies/

Add a dependency of one type between the work item in the path and each work item in work_item_ids. The type is named from the path work item's side: blocking on ENG-42 for ENG-17 means ENG-42 blocks ENG-17, so ENG-17 lists ENG-42 under blocked_by.

Two work items can have only one dependency between them, of any type and in either direction. A work item that already has a dependency with the path work item is skipped without an error, and its existing dependency stays as it was. The response is 201 with the path work item's whole dependencies map after the write, so check it to see what is linked.

The call is all or nothing on lookups: if any work item in work_item_ids isn't found, it returns 404 and creates no dependencies.

You need edit access to the path work item. Project admins, contributors, and workspace owners and admins have it. The other work items only need to be visible to you, and they can be in any project in the workspace.

Path parameters ​

slug:requiredstring

The workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.

project_id:requiredstring

The project the resource belongs to. Accepts the project UUID or its bare identifier, for example ENG.

work_item_id:requiredstring

The work item the resource belongs to. Accepts the work item UUID or its PROJ-123 identifier.

Body parameters ​

relation_type:requiredstring

The dependency type, from the path work item's side:

  • blocked_by: it can't start until the other one finishes.
  • blocking: the other one can't start until this one finishes.
  • start_before: it has to start before the other one starts.
  • start_after: it can only start after the other one starts.
  • finish_before: it has to finish before the other one finishes.
  • finish_after: it can only finish after the other one finishes.

Any other value returns 400. All six are accepted on every plan.

work_item_ids:requiredarray of string (uuid)

The work items on the other side of the dependency, from 1 to 100 UUIDs. PROJ-123 identifiers aren't accepted here. A repeated id counts once.

Every id must be a work item in the workspace that you can see. Archived, draft, and intake work items count as missing. One missing id fails the whole call with 404.

Scopes ​

projects.work_items.relations:write

Errors ​

StatusCodeCause
400invalid_requestrelation_type is missing or isn't one of the six types, work_item_ids is missing, empty, or has more than 100 ids, or an id isn't a UUID. See errors[].
401unauthorizedMissing or invalid credentials.
403forbiddenYou can't edit this work item, or your token scope doesn't allow this.
404not_foundNo such workspace, project, or work item, you can't see the work item, or it's archived.
404not_foundAn id in work_item_ids isn't a work item you can see. Nothing is created.
406not_acceptableThe Accept header asks for a representation the API can't produce.
409governance_migration_in_progressA governance migration is running in this workspace, so writes are paused. Retry after it finishes.
413payload_too_largeThe request body is over the size limit.
415unsupported_media_typeThe Content-Type isn't one this endpoint accepts.
429rate_limitedThrottled. Honor the Retry-After header before retrying.
Create a work item dependency
bash
curl -X POST \
  "https://api.plane.so/api/v2/workspaces/my-team/projects/4af68566-94a4-4eb3-94aa-50dc9427067b/work-items/8c3d1f72-4a9e-4b65-9d20-6e1f3b7a5c48/dependencies/" \
  -H "X-Api-Key: $PLANE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "relation_type": "blocking",
  "work_item_ids": ["9c1f0b3d-6d2e-4c9a-8b41-2f7e5a0d6c88"]
}'
Response201
json
{
  "blocking": ["9c1f0b3d-6d2e-4c9a-8b41-2f7e5a0d6c88"],
  "blocked_by": ["b51d7e09-8a3c-4f62-9e17-4c2a6d8f1b95"],
  "start_after": [],
  "start_before": ["6e2a9d47-1c5b-4f83-a7d0-3b8e4f1c9a62"],
  "finish_after": [],
  "finish_before": []
}
Response400
json
{
  "type": "invalid_request",
  "code": "invalid_request",
  "detail": "One or more fields failed validation.",
  "errors": [
    {
      "field": "relation_type",
      "code": "invalid_choice",
      "message": "\"blocks\" is not a valid choice."
    }
  ]
}