# Link Knowledge Gap Article

POST /api/v2/projects/{projectId}/knowledge/gaps/{id}/link

Links a knowledge gap to an article that already exists on the project, public or internal. A published article marks the gap answered. A draft leaves it unanswered until that article is published. Replaces an article already linked to the gap. The previous article is left in place, including a draft created for the gap, and is not deleted. A dismissed gap stays dismissed until it is reopened. Returns 404 with message "Knowledge gap not found" or "Article not found".

## Request

- projectId: string, path, required — ID of the project that owns the gap.
- id: string, path, required — ID of the knowledge gap.
- articleId: string, required — ID of an existing article on this project. Public or internal, draft or published.

## Response

- 200: Successful response
  - articleId: string, required — The article linked by this call.
  - previousArticleId: string, required — The article linked before this call, or null. A different id is left in place and is no longer linked to this gap.
  - status: unanswered | answered | dismissed, required — answered when the linked article is published and the gap is not dismissed. A draft stays unanswered. A dismissed gap stays dismissed.
- 400: Invalid input data
- 401: Authorization not provided
- 403: Insufficient access
- 404: "Knowledge gap not found" The id is not a gap on this project. "Article not found" the article is not on this project.
- 500: Internal server error
