POST /rest/api/2/issueLink

Creates a link between two issues. Use this operation to indicate a relationship between two issues and optionally add a comment to the from (outward) issue. To use this resource the site must have Issue Linking enabled.

This resource returns nothing on the creation of an issue link. To obtain the ID of the issue link, use https://your-domain.atlassian.net/rest/api/2/issue/[linked issue key]?fields=issuelinks.

If the link request duplicates a link, the response indicates that the issue link was created. If the request included a comment, the comment is added.

This operation can be accessed anonymously.

Permissions required:

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
comment Object No

A comment.

comment.id String No

The ID of the comment.

comment.jsdAuthorCanSeeRequest Boolean No

Whether the comment was added from an email sent by a person who is not part of the issue. See Allow external emails to be added as comments on issuesfor information on setting up this feature.

comment.created String No

The date and time at which the comment was created.

comment.self String No

The URL of the comment.

comment.properties[] Array No

A list of comment properties. Optional on create and update.

comment.properties[].key String No

The key of the property. Required on create and update.

comment.properties[].value No

The value of the property. Required on create and update.

comment.updated String No

The date and time at which the comment was updated last.

comment.jsdPublic Boolean No

Whether the comment is visible in Jira Service Desk. Defaults to true when comments are created in the Jira Cloud Platform. This includes when the site doesn't use Jira Service Desk or the project isn't a Jira Service Desk project and, therefore, there is no Jira Service Desk for the issue to be visible on. To create a comment with its visibility in Jira Service Desk set to false, use the Jira Service Desk REST API Create request comment operation.

comment.body String No

The comment text.

comment.renderedBody String No

The rendered version of the comment.

type Object Yes

This object is used as follows:

  • In the issueLink resource it defines and reports on the type of link between the issues. Find a list of issue link types with Get issue link types.
  • In the issueLinkType resource it defines and reports on issue link types.
type.id String No

The ID of the issue link type and is used as follows:

  • In the issueLink resource it is the type of issue link. Required on create when name isn't provided. Otherwise, read only.
  • In the issueLinkType resource it is read only.
type.name String No

The name of the issue link type and is used as follows:

  • In the issueLink resource it is the type of issue link. Required on create when id isn't provided. Otherwise, read only.
  • In the issueLinkType resource it is required on create and optional on update. Otherwise, read only.
type.inward String No

The description of the issue link type inward link and is used as follows:

  • In the issueLink resource it is read only.
  • In the issueLinkType resource it is required on create and optional on update. Otherwise, read only.
type.self String No

The URL of the issue link type. Read only.

type.outward String No

The description of the issue link type outward link and is used as follows:

  • In the issueLink resource it is read only.
  • In the issueLinkType resource it is required on create and optional on update. Otherwise, read only.
inwardIssue Object Yes

The ID or key of a linked issue.

inwardIssue.id String No

The ID of an issue. Required if key isn't provided.

inwardIssue.self String No

The URL of the issue.

inwardIssue.key String No

The key of an issue. Required if id isn't provided.

outwardIssue Object Yes

The ID or key of a linked issue.

outwardIssue.id String No

The ID of an issue. Required if key isn't provided.

outwardIssue.self String No

The URL of the issue.

outwardIssue.key String No

The key of an issue. Required if id isn't provided.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.