Atlassian: Create issue link
Atlassian issueLinks.linkIssues: arguments, response, policy and SDK examples.
← Issue links operations · Get started
Operation atlassian.linkissues
Provider route: POST /{cloudId}/rest/api/3/issueLink. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/atlassian with npm, or alter-sdk-atlassian with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { AtlassianIntegration } from "@alter-ai/atlassian";
async function execute(input: Parameters<AtlassianIntegration["issueLinks"]["linkIssues"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new AtlassianIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.issueLinks.linkIssues(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_atlassian import AtlassianIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = AtlassianIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.issue_links.link_issues(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.cloudId | string | Required within parent | Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ |
body | Model | Required within parent | Expand Create issue link — request body — body |
Referenced models: Create issue link — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root |
Schemas
Section titled “Schemas”11 more schemas are linked from the tables above, on the schema pages.
Create issue link — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
comment | Model | Optional | Expand Add comment — request body — body |
inwardIssue | Model | Required within parent | Expand Create issue link — request body — body inward Issue |
outwardIssue | Model | Required within parent | Expand Create issue link — request body — body inward Issue |
type | Model | Required within parent | Expand Create issue link type — request body — body |
Referenced models: Add comment — request body — body, Create issue link type — request body — body, Create issue link — request body — body inward Issue
Add comment — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A comment. Additional keys: allowed |
author | Model | Optional | Expand Add comment — request body — body author The ID of the user who created the comment. Read only: true |
body | JSON | Optional | The comment text in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/). |
created | string | Optional | The date and time at which the comment was created. Format: date-time Read only: true |
id | string | Optional | The ID of the comment. Read only: true |
jsdAuthorCanSeeRequest | boolean | Optional | 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 issues](https://support.atlassian.com/jira-service-management-cloud/docs/allow-external-emails-to-be-added-as-comments-on-issues/)for information on setting up this feature. Read only: true |
jsdPublic | boolean | Optional | 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](https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-rest-servicedeskapi-request-issueIdOrKey-comment-post) operation. Read only: true |
properties | array | Optional | A list of comment properties. Optional on create and update. |
properties[] | Model | Each item | Expand Edit issue — request body — body properties item |
renderedBody | string | Optional | The rendered version of the comment. Read only: true |
self | string | Optional | The URL of the comment. Read only: true |
updateAuthor | Model | Optional | Expand Add comment — request body — body author The ID of the user who updated the comment last. Read only: true |
updated | string | Optional | The date and time at which the comment was updated last. Format: date-time Read only: true |
visibility | Model | Optional | Expand Add comment — request body — body visibility The group or role to which this comment is visible. Optional on create and update. |
Referenced models: Edit issue — request body — body properties item, Add comment — request body — body author, Add comment — request body — body visibility
Create issue link type — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | This object is used as follows: * In the [ issueLink](#api-rest-api-3-issueLink-post) 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](#api-rest-api-3-issueLinkType-get). * In the [ issueLinkType](#api-rest-api-3-issueLinkType-post) resource it defines and reports on issue link types. Additional keys: not allowed |
id | string | Optional | The ID of the issue link type and is used as follows: * In the [ issueLink](#api-rest-api-3-issueLink-post) resource it is the type of issue link. Required on create when `name` isn't provided. Otherwise, read only. * In the [ issueLinkType](#api-rest-api-3-issueLinkType-post) resource it is read only. |
inward | string | Optional | The description of the issue link type inward link and is used as follows: * In the [ issueLink](#api-rest-api-3-issueLink-post) resource it is read only. * In the [ issueLinkType](#api-rest-api-3-issueLinkType-post) resource it is required on create and optional on update. Otherwise, read only. |
name | string | Optional | The name of the issue link type and is used as follows: * In the [ issueLink](#api-rest-api-3-issueLink-post) resource it is the type of issue link. Required on create when `id` isn't provided. Otherwise, read only. * In the [ issueLinkType](#api-rest-api-3-issueLinkType-post) resource it is required on create and optional on update. Otherwise, read only. |
outward | string | Optional | The description of the issue link type outward link and is used as follows: * In the [ issueLink](#api-rest-api-3-issueLink-post) resource it is read only. * In the [ issueLinkType](#api-rest-api-3-issueLinkType-post) resource it is required on create and optional on update. Otherwise, read only. |
self | string | Optional | The URL of the issue link type. Read only. Format: uri Read only: true |
Create issue link — request body — body inward Issue
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The ID or key of a linked issue. Additional keys: not allowed |
fields | Model | Optional | Expand Create issue link — request body — body inward Issue fields The fields associated with the issue. Read only: true |
id | string | Optional | The ID of an issue. Required if `key` isn't provided. |
key | string | Optional | The key of an issue. Required if `id` isn't provided. |
self | string | Optional | The URL of the issue. Format: uri Read only: true |
Referenced models: Create issue link — request body — body inward Issue fields
Edit issue — request body — body properties item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | An entity property, for more information see [Entity properties](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/). Additional keys: not allowed |
key | string | Optional | The key of the property. Required on create and update. |
value | JSON | Optional | The value of the property. Required on create and update. |
Add comment — request body — body author
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | User details permitted by the user's Atlassian Account privacy settings. However, be aware of these exceptions: * User record deleted from Atlassian: This occurs as the result of a right to be forgotten request. In this case, `displayName` provides an indication and other parameters have default values or are blank (for example, email is blank). * User record corrupted: This occurs as a results of events such as a server import and can only happen to deleted users. In this case, `accountId` returns *unknown* and all other parameters have fallback values. * User record unavailable: This usually occurs due to an internal service outage. In this case, all parameters have fallback values. Additional keys: not allowed |
accountId | string | Optional | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Maximum length: 128 |
accountType | string | Optional | The type of account represented by this user. This will be one of 'atlassian' (normal users), 'app' (application user) or 'customer' (Jira Service Desk customer user) Read only: true |
active | boolean | Optional | Whether the user is active. Read only: true |
avatarUrls | Model | Optional | Expand Assign issue — request body — body avatar Urls The avatars of the user. Read only: true |
displayName | string | Optional | The display name of the user. Depending on the user’s privacy settings, this may return an alternative value. Read only: true |
emailAddress | string | Optional | The email address of the user. Depending on the user’s privacy settings, this may be returned as null. Read only: true |
key | string | Optional | This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. Read only: true |
name | string | Optional | This property is no longer available and will be removed from the documentation soon. See the [deprecation notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. Read only: true |
self | string | Optional | The URL of the user. Read only: true |
timeZone | string | Optional | The time zone specified in the user's profile. Depending on the user’s privacy settings, this may be returned as null. Read only: true |
Referenced models: Assign issue — request body — body avatar Urls
Assign issue — request body — body avatar Urls
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
16x16 | string | Optional | The URL of the item's 16x16 pixel avatar. Format: uri |
24x24 | string | Optional | The URL of the item's 24x24 pixel avatar. Format: uri |
32x32 | string | Optional | The URL of the item's 32x32 pixel avatar. Format: uri |
48x48 | string | Optional | The URL of the item's 48x48 pixel avatar. Format: uri |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: atlassian.linkissues. Catalog operation: linkissues. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["write:jira-work"]