---
schema: rendered-html/v1
title: "Link Issues | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/api-howto-link-issues.html
generated_at: 2026-06-11T14:59:58.612074+00:00
---

Feedback

Thanks for your feedback!

Was this page helpful?

YesNo

Developer Portal for YouTrack and Hub

- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- [Get Started with REST API](jetbrains__com__help__youtrack__devportal__api-getting-started.md)
- REST API Reference
- REST API Use Cases
- [Create an Issue](jetbrains__com__help__youtrack__devportal__api-howto-create-issue.md)
- [Create an Issue and Set Custom Fields](jetbrains__com__help__youtrack__devportal__api-howto-create-issue-with-fields.md)
- [Get Issues List with All Values](jetbrains__com__help__youtrack__devportal__api-howto-get-issues-with-all-values.md)
- [Get Value for an Issue Custom Field](jetbrains__com__help__youtrack__devportal__api-howto-get-value-for-specific-cf.md)
- Add Value to a Set
- [Update Issue Custom Fields](jetbrains__com__help__youtrack__devportal__api-how-to-update-custom-fields-values.md)
- Update a Text Field Value
- [Clear Values of Custom Fields](jetbrains__com__help__youtrack__devportal__api-how-to-clear-custom-fields-values.md)
- Apply Commands to Issues
- Tag or Untag Issues
- Work with Issue Tags
- Attach Files to an Issue
- Delete an Issue Attachment
- Download an Issue Attachment
- [Link Issues](api-howto-link-issues.html)
- Get Issue History
- Get a Database Backup
- Add User to Project Team
- REST API Troubleshooting
- Color Indices List
- Hub REST API

1. YouTrack REST API
2. REST API Use Cases
3. [Link Issues](#0)

# Link Issues﻿

Last modified: 07 May 2026

## Use Case﻿

Use the REST API to link issues.

## Summary﻿

To link one issue to another, apply a command to the target issue.

Make a POST request to the `/api/commands` endpoint with the body containing the ID of the target issue and the command query.

## Step-by-Step﻿

1. To apply a command to an issue, make a POST request to the following endpoint: `/api/commands`.

   Example:

   ```
   POST https://example.youtrack.cloud/api/commands
   ```
2. In the body of the request, pass a command query and the ID of the issue that you need to apply this command to.

   ```
   {
     "query": "relates to NP-92",
     "issues": [
       {
         "idReadable": "NP-113"
       }
     ]
   }
   ```

   > ### tip
   >
   > For more information about command queries, check the command reference.
3. To check whether the command was applied successfully, make a GET request to the endpoint `/api/issues/NP-113/links` where `NP-113` is the ID of the target issue.

   Specify link attributes in the `fields` parameter of your request.

   Example:

   ```
   GET https://example.youtrack.cloud/api/issues/NP-113/links?fields=linkType(name,sourceToTarget,targetToSource),issues(id,idReadable,summary)
   ```

   The expected server response is:

   ```
   [
     {
       "linkType": {
         "sourceToTarget": "relates to",
         "targetToSource": "",
         "name": "Relates",
         "$type": "IssueLinkType"
       },
       "issues": [
         {
           "idReadable": "NP-92",
           "summary": "Failed test",
           "id": "99-543",
           "$type": "Issue"
         }
       ],
       "$type": "IssueLink"
     },
     ...
   ]
   ```

- [Link Issues](/help/youtrack/devportal/api-howto-link-issues.html)
- [Use Case](/help/youtrack/devportal/api-howto-link-issues.html#use-case)
- [Summary](/help/youtrack/devportal/api-howto-link-issues.html#summary)
- [Step-by-Step](/help/youtrack/devportal/api-howto-link-issues.html#step-by-step)

Download an Issue AttachmentGet Issue History

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

Copyright © 2000–2026 JetBrains s.r.o.

![](https://bat.bing.com/action/0?ti=5220035&tm=gtm002&Ver=2&mid=15655023-4441-42f3-b44c-29fe468331c6&bo=4&sid=452929b065a111f19a7fe7356f74a419&vid=aa3122f0648711f1a10d6d095e10fd87&vids=0&msclkid=N&pi=918639831&lg=en-US&sw=1920&sh=1080&sc=24&tl=Link%20Issues%20%7C%20Developer%20Portal%20for%20YouTrack%20and%20Hub%20Documentation&p=https%3A%2F%2Fwww.jetbrains.com%2Fhelp%2Fyoutrack%2Fdevportal%2Fapi-howto-link-issues.html&r=&lt=804&pt=1781189996142,30,30,,,2,2,2,2,2,,2,25,25,33,313,313,313,804,804,804&pn=0,0&evt=pageLoad&sv=2&asc=G&cdb=AQAS&rn=963423)
