---
title: "Link an existing issue to an error group by its URL"
method: POST
path: "/projects/{project_id}/error-groups/{group_id}/issues/link"
tags: ["error-tracking"]
---

# Link an existing issue to an error group by its URL

`POST /projects/{project_id}/error-groups/{group_id}/issues/link`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/error-groups/{group_id}/issues/link`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required
- `group_id` integer, required

## Request body

- LinkIssueRequest: Link an existing issue by its URL.
  - `title` string, nullable: What to call it; the issue's own title, or the URL, when absent.
  - `url` string, required: An http(s) URL: an issue of the project's GitHub or GitLab repository (its state is then read), or any other tracker's issue.

## Response `201`

Issue linked

- IssueLinkView: An issue linked to an error group.
  - `created_at` string, date-time, required
  - `created_by` integer, nullable
  - `group_id` integer, required
  - `id` integer, required
  - `number` integer, nullable
  - `provider` string, required: `github` or `gitlab` for an issue of the project's repository, whose state Temps reads; `link` for any other URL.
  - `repository` string, nullable
  - `state` string, nullable: `open` or `closed` when last read; absent for plain links.
  - `state_checked_at` string, date-time, nullable
  - `title` string, required
  - `url` string, required

## Other responses

- `400`: Not an http(s) URL, or a title too long
- `401`: Not authenticated
- `403`: Error tracking write permission required
- `404`: No such group in the project
- `409`: Already linked, or the group has the maximum of 10 issues
- `500`: Internal server error

## Changes

- **2026-11-21** `451aa64395bb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/error-groups/:group_id/issues/link/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
