---
title: "Link existing task to issue"
method: POST
path: "/task_tracking/linkTaskToIssueGroup"
---

# Link existing task to issue

`POST /task_tracking/linkTaskToIssueGroup`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/task_tracking/linkTaskToIssueGroup`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `task_tracking:write`

Link existing task to issue group

## Request body

- object
  - `issue_group_id` integer, required: The id of the issue group a task should be linked
  - `task_id` string, required: The id of the task that should be linked to the issue group
  - `project_id` string, required: The id of the task tracker project related to the task
  - `scope` 'group' | 'repo' | 'cloud' | 'domain' | 'container' | 'single_issue': The scope that relates issues to the task. Default is 'group' that relates all the issues in the issue group to the task
  - `scope_id` integer: The id of the specified scope. Not required when scope is 'group'
  - `integration_id` integer: Optional. The id of the task tracker integration when multiple integrations are available

## Response `200`

The task has been linked to the issue group

- object
  - `success` integer: The integer 1 indicating success

---

[API](https://skmtc.dev/aikido/apis/aikido-security-api-documentation.md) - [All operations](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/revisions/da8691338133?raw)
