Skip to content

Create work item relation ​

POST/api/v1/workspaces/{workspace_slug}/projects/{project_id}/work-items/{work_item_id}/relations/

Create relationships between work items. Supports various relation types including blocking, blocked_by, duplicate, relates_to, start_before, start_after, finish_before, and finish_after.

Path Parameters ​

work_item_id:requiredstring

The unique identifier of the work item.

project_id:requiredstring

The unique identifier of the project.

workspace_slug:requiredstring

The workspace_slug represents the unique workspace identifier for a workspace in Plane. It can be found in the URL. For example, in the URL https://app.plane.so/my-team/projects/, the workspace slug is my-team.

Body Parameters ​

relation_type:requiredstring

Type of relationship between work items

  • blocking - Blocking
  • blocked_by - Blocked By
  • duplicate - Duplicate
  • relates_to - Relates To
  • start_before - Start Before
  • start_after - Start After
  • finish_before - Finish Before
  • finish_after - Finish After
issues:requiredarray

Array of work item IDs to create relations with

Scopes ​

projects.work_items:write

Create work item relation
bash
curl -X POST \
  "https://api.plane.so/api/v1/workspaces/my-workspace/projects/project-uuid/work-items/work-item-uuid/relations/" \
  -H "X-API-Key: $PLANE_API_KEY" \
  # Or use -H "Authorization: Bearer $PLANE_OAUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "relation_type": "blocking",
  "issues": [
    "550e8400-e29b-41d4-a716-446655440000",
    "550e8400-e29b-41d4-a716-446655440000"
  ]
}'
Response201
json
[
  [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Example Name",
      "sequence_id": 42,
      "project_id": "550e8400-e29b-41d4-a716-446655440000",
      "relation_type": "blocked_by",
      "state_id": "550e8400-e29b-41d4-a716-446655440000",
      "priority": "high",
      "type_id": "550e8400-e29b-41d4-a716-446655440000",
      "is_epic": false,
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z",
      "created_by": "550e8400-e29b-41d4-a716-446655440000",
      "updated_by": "550e8400-e29b-41d4-a716-446655440000"
    }
  ]
]