---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://sourcecraft.dev/portal/docs/en/api-ref/Issues-or-Linked-Issues/CreateIssueLinkByID.md
  - https://sourcecraft.dev/portal/docs/ru/api-ref/Issues-or-Linked-Issues/CreateIssueLinkByID.md
  - href: ru/api-ref/Issues-or-Linked-Issues/CreateIssueLinkByID.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/ru/llms.txt

<div class="openapi">

# Create Link between Issues (By Issue ID)

<!-- markdownlint-disable-file -->

Creates a two-way relation from source issue to target issue of a specific type. Only one link can exist between two given issues.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api.sourcecraft.tech/issues/id:{issue_id}/issue_links
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_issue_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

### Query parameters

#|
|| **Name** | **Description** ||
||

_silent_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "target_issue_id": "example",
  "target_issue_slug": "example",
  "link_type": "related_to"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_link_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [IssueLink.LinkType](#entity-IssueLink.LinkType)

_Enum:_{.json-schema-reset .json-schema-value} `related_to`, `parent_of`, `subissue_of`, `blocks`, `blocked_by`, `duplicates`, `duplicated_by`
{.table-cell}
||
||

_target_issue_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_target_issue_slug_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### IssueLink.LinkType {#entity-IssueLink.LinkType}

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `related_to`, `parent_of`, `subissue_of`, `blocks`, `blocked_by`, `duplicates`, `duplicated_by`

</div>

## Responses

<div class="openapi__response__code__201">

## 201 Created

A successful response.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "id": "example",
  "source": {
    "id": "example",
    "slug": "example"
  },
  "target": null,
  "link_type": "related_to",
  "author": {
    "id": "example",
    "slug": "example"
  },
  "updated_by": null,
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_author_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [UserEmbedded](#entity-UserEmbedded)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example",
  "slug": "example"
}
```

{% endcut %}
{.table-cell}
||
||

_created_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_link_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [IssueLink.LinkType](#entity-IssueLink.LinkType)

_Enum:_{.json-schema-reset .json-schema-value} `related_to`, `parent_of`, `subissue_of`, `blocks`, `blocked_by`, `duplicates`, `duplicated_by`
{.table-cell}
||
||

_source_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [IssueEmbedded](#entity-IssueEmbedded)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example",
  "slug": "example"
}
```

{% endcut %}
{.table-cell}
||
||

_target_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [IssueEmbedded](#entity-IssueEmbedded)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example",
  "slug": "example"
}
```

{% endcut %}
{.table-cell}
||
||

_updated_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_updated_by_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [UserEmbedded](#entity-UserEmbedded)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example",
  "slug": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### IssueEmbedded {#entity-IssueEmbedded}

#|
|| **Name** | **Description** ||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_slug_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example",
  "slug": "example"
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__default">

## default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: unknown

_Example:_{.json-schema-reset .json-schema-example} `null`
{.table-cell}
||
||

_error_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_request_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.