Create Link between Issues
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
POST
https://api.sourcecraft.tech/repos/{org_slug}/{repo_slug}/issues/{issue_slug}/issue_links
Path parameters
|
Name |
Description |
|
issue_slug |
Type: string Example: `` |
|
org_slug |
Type: string Example: `` |
|
repo_slug |
Type: string Example: `` |
Query parameters
|
Name |
Description |
|
silent |
Type: boolean |
Body
application/json
{
"target_issue_id": "example",
"target_issue_slug": "example",
"link_type": "related_to"
}
|
Name |
Description |
|
link_type |
Type: IssueLink.LinkType Enum: |
|
target_issue_id |
Type: string Example: |
|
target_issue_slug |
Type: string Example: |
IssueLink.LinkType
Type: string
Enum: related_to, parent_of, subissue_of, blocks, blocked_by, duplicates, duplicated_by
Responses
201 Created
A successful response.
Body
application/json
{
"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"
}
|
Name |
Description |
|
author |
Type: UserEmbedded Example
|
|
created_at |
Type: string<date-time> Example: |
|
id |
Type: string Example: |
|
link_type |
Type: IssueLink.LinkType Enum: |
|
source |
Type: IssueEmbedded Example
|
|
target |
Type: IssueEmbedded Example
|
|
updated_at |
Type: string<date-time> Example: |
|
updated_by |
Type: UserEmbedded Example
|
IssueEmbedded
|
Name |
Description |
|
id |
Type: string Example: |
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example"
}
default
Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme
Body
application/json
{
"error_code": "example",
"message": "example",
"request_id": "example",
"details": {}
}
|
Name |
Description |
||
|
details |
Type: Optional details. Exact structure depends on error_code
Example
|
||
|
error_code |
Type: string Example: |
||
|
message |
Type: string Example: |
||
|
request_id |
Type: string Example: |