---
title: "Add issue relation"
method: POST
path: "/v1/issues/{id}/relations"
tags: ["Issue"]
---

# Add issue relation

`POST /v1/issues/{id}/relations`

Create an outgoing relation from the issue in the URL to another issue. Self-relations and the reserved "subtask of" kind are rejected.

## Request body

- object
  - `related_id` string, required — ID of the related issue. The created edge is always outgoing from the issue in the URL.
  - `kind` 'blocked by' | 'blocks' | 'depends on' | 'duplicated by' | 'duplicates' | 'related to' | 'subtask of', required — Kind of relation between two issues.

## Response `201`

Created

- IssueRelation — A directed relation between the issue in the URL and another issue.
  - `id` string, required — Unique identifier of the relation.
  - `kind` 'blocked by' | 'blocks' | 'depends on' | 'duplicated by' | 'duplicates' | 'related to' | 'subtask of', required — Kind of relation between two issues.
  - `direction` 'outgoing' | 'incoming', required — Whether the relation edge leaves (outgoing) or enters (incoming) the issue in the URL.
  - `related` PartialIssue, required — A simplified issue that can be used in lists.
    - `id` string, required — Unique identifier of the issue.
    - `key` string, required — Composite issue key built from the owner project key and numeric ID.
    - `numeric_id` integer, required — Numeric identifier of the issue within its project.
    - `parent` PartialIssue — recursive
    - `kind` 'epic' | 'story' | 'task' | 'bug', required — Kind of the issue.
    - `title` string, required — Title of the issue.
    - `description` string, nullable — Description of the issue.
    - `status` 'open' | 'in progress' | 'blocked' | 'review' | 'done' | 'closed', required — Status of the issue.
    - `priority` 'lowest' | 'low' | 'normal' | 'high' | 'highest', required — Priority of the issue.
    - `reported_by` PartialUser — A simplified user used on issue list and detail responses.
      - `id` string, required — Unique identifier of the user.
      - `first_name` string, required — First name of the user.
      - `last_name` string, required — Last name of the user.
      - `picture` string, uri, nullable — Profile picture of the user.
    - `assignees` PartialUser[], required — Users assigned to the issue.
      - `id` string, required — Unique identifier of the user.
      - `first_name` string, required — First name of the user.
      - `last_name` string, required — Last name of the user.
      - `picture` string, uri, nullable — Profile picture of the user.
    - `reviewers` PartialUser[], required — Users reviewing the issue.
      - `id` string, required — Unique identifier of the user.
      - `first_name` string, required — First name of the user.
      - `last_name` string, required — Last name of the user.
      - `picture` string, uri, nullable — Profile picture of the user.
    - `labels` PartialLabel[], required — Labels attached to the issue.
      - `id` string, required — Unique identifier of the label.
      - `name` string, required — Name of the label.
    - `project` PartialProject — A simplified project that can be used in lists.
      - `id` string, required — Unique identifier of the project.
      - `key` string, required — Key of the project.
      - `name` string, required — Name of the project.
      - `description` string, nullable — Description of the project.
      - `logo` string, uri, nullable — Logo of the project.
      - `status` 'active' | 'pending', required — Status of the project.
    - `namespace` PartialNamespace — A simplified namespace used on issue list and detail responses.
      - `id` string, required — Unique identifier of the namespace.
      - `name` string, required — Name of the namespace.
    - `due_date` string, date-time, nullable — Due date of the issue.
    - `start_date` string, date-time, nullable — Start date of the issue.
  - `created_at` string, date-time, required — Date when the relation was created.

## Other responses

- `400` — Bad request
- `401` — Unauthorized request
- `403` — Forbidden
- `404` — The requested resource not found
- `500` — Internal Server Error

---

[API](https://skmtc.net/opcotech/apis/elemo-api.md) · [All operations](https://skmtc.net/opcotech/apis/elemo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opcotech/elemo-api/revisions/6965ecf3ab92/schema)
