---
title: "Link or unlink an external issue to/from a task"
method: POST
path: "/tasks/{id}/external-issues"
tags: ["tasks"]
---

# Link or unlink an external issue to/from a task

`POST /tasks/{id}/external-issues`

By default, links the external issue. To unlink it, set the operation field to "unlink". Repeating the same link request is a successful no-op.

**Rate limit:** 20 requests per minute

## Path parameters

- `id` string, required

## Request body

- LinkTaskExternalIssueRequestBody
  - `external_issue_id` string, required — The ID or human-readable key of the external issue in the source system.
  - `operation` string — Operation to perform. Use "link" to link the issue (default) or "unlink" to unlink it.
  - `source` string, required — The source system of the external issue (e.g., "linear", "asana", "jira", "github", "shortcut").

## Response `200`

- LinkTaskExternalIssueResponseBody
  - `data` Task
    - `account` MiniAccount
      - `external_ids` ExternalID[] — External IDs associated with the account.
        - `external_id` string — The external ID. Must be unique per object type (ex. account).
        - `label` string — The label of the external ID. Must be unique per object.
      - `id` string — The ID of the account.
    - `assignee` Actor
      - `contact` MiniContact
        - `email` string — The email of the contact.
        - `id` string — The ID of the contact.
      - `user` MiniUser
        - `email` string — The email of the user.
        - `id` string — The ID of the user.
    - `body_html` string — The body of the task in HTML format.
    - `created_at` string — The created at time of the task.
    - `custom_fields` object — Custom field values associated with the task, keyed by custom field slug.
    - `customer_portal_visible` boolean — The customer portal visible of the task.
    - `due_date` string — The due date of the task in RFC3339 format.
    - `external_issues` ExternalIssue[] — The external product issues associated with the task, if any.
      - `external_id` string — The external ID of the external issue. Jira: ID of the issue (autoincrementing number from 10000). GitHub: Owner/Repo/IssueID. Linear: ID of the issue (UUID). Asana: ID of the task (Long number).
      - `link` string — Link to the product issue.
      - `source` string — The source of the external issue.
    - `id` string — The ID of the task.
    - `milestone` MiniMilestone
      - `id` string — The ID of the milestone.
    - `parent_task_id` string — The ID of the parent task, if this is a subtask.
    - `project` MiniProject
      - `id` string — The ID of the project.
    - `status` string
    - `subtask_ids` string[] — The IDs of subtasks belonging to this task.
    - `title` string — The title of the task.
    - `updated_at` string — The updated at time of the task.
  - `request_id` string — The request ID for tracking.

## Other responses

- `400` — The request was invalid or could not be completed.
- `404`
- `500` — An unexpected internal error occurred.

---

[API](https://skmtc.net/usepylon/apis/pylon-api.md) · [All operations](https://skmtc.net/usepylon/apis/pylon-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usepylon/pylon-api/revisions/cfd9e65e79bb/schema)
