Skip to content

Create a work item relation definition ​

POST/api/v2/workspaces/{slug}/work-item-relation-definitions/

Add a custom relation type to the workspace, for example Tests with the labels tests and tested by. Every project in the workspace can use it as soon as it exists.

The new definition goes after the existing ones in sort_order. It is never a default definition: is_default is always false.

Pick labels that no other definition uses on either side. The relations list groups related work items by label, so a shared label mixes two relation types under one key.

You need to be a workspace owner or admin, and the workspace's plan must include custom relations, or the response is 402.

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.

Body parameters ​

name:requiredstring

Display name for the relation type, for example Tests. Maximum 255 characters. Another definition in the workspace with the same name returns 409.

outward:requiredstring

The label the source work item shows, for example tests, so the relation reads "ENG-42 tests ENG-17". Maximum 255 characters. Another definition with the same outward label returns 409.

inward:requiredstring

The label the target work item shows, for example tested by. Maximum 255 characters. Another definition with the same inward label returns 409. Send the same text as outward for a symmetric relation type.

description:optionalstring

What the relation type means. Defaults to an empty string.

is_active:optionalboolean

Whether relations can use the definition. Defaults to true. Send false to create it now and turn it on later.

color:optionalstring

Color for the relation type, for example #16a34a. Maximum 255 characters. Defaults to an empty string.

logo_props:optionalobject

Free-form icon metadata Plane uses to render the relation type. Defaults to {}.

sort_order:optionalnumber

Ignored on create. The new definition always sorts after the existing ones. To move it, update sort_order afterwards.

external_id:optionalstring

Your system's identifier for this definition, for sync and import correlation. Maximum 255 characters, and accepts null.

external_source:optionalstring

The system external_id came from, for example jira. Maximum 255 characters, and accepts null. An external_id is unique only within its source, so send both.

is_default is read-only.

Response shaping ​

fields:optionalstring

Comma-separated list of fields to return. Fields you don't request are left out of the response instead of coming back as null, so a missing key means you didn't ask for it and null means the value is null. id is always included, whether or not you name it.

Pass all to get every requestable field. An unknown field name returns 400 with the list of valid names and the closest match, so a typo is caught instead of being silently ignored.

Requestable here: color, created_at, created_by_id, description, external_id, external_source, id, inward, is_active, is_default, logo_props, name, outward, sort_order, updated_at, updated_by_id.

See Sparse fields.

Scopes ​

workspaces.work_item_relation_definitions:write

Errors ​

StatusCodeCause
400invalid_requestname, outward, or inward is missing, empty, or longer than 255 characters, or another field has the wrong type. See errors[].
401unauthorizedMissing or invalid credentials.
402payment_requiredCustom relations aren't included in the workspace's plan.
403forbiddenYou aren't a workspace owner or admin, or your token scope doesn't allow this.
404not_foundNo such workspace, or it's outside your tenant.
406not_acceptableThe Accept header asks for a representation the API can't produce.
409conflictAnother definition in the workspace already uses this name, outward label, or inward label. The match is exact.
409conflictAnother definition already uses this external_id and external_source pair. The response detail names its id.
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 relation definition
bash
curl -X POST \
  "https://api.plane.so/api/v2/workspaces/my-team/work-item-relation-definitions/" \
  -H "X-Api-Key: $PLANE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Tests",
  "outward": "tests",
  "inward": "tested by",
  "description": "A QA work item that verifies a feature",
  "color": "#16a34a"
}'
Response201
json
{
  "id": "7a4c9e12-5f3b-4d68-8e01-2b6d9f4a3c85",
  "name": "Tests",
  "description": "A QA work item that verifies a feature",
  "outward": "tests",
  "inward": "tested by",
  "is_default": false,
  "is_active": true,
  "color": "#16a34a",
  "logo_props": {},
  "sort_order": 262140.0,
  "external_id": null,
  "external_source": null,
  "created_at": "2026-03-02T10:15:27.531904Z",
  "updated_at": "2026-03-02T10:15:27.531904Z",
  "created_by_id": "16c61a3a-512a-48ac-b0be-b6b46fe6f430",
  "updated_by_id": null
}
Response409
json
{
  "type": "conflict",
  "code": "conflict",
  "detail": "A relation definition with this name/label already exists in the workspace."
}

Next steps

Link work items with the new type through Create a work item relation, passing the id returned above as relation_definition_id and tests or tested by as direction.