---
title: "Link and/or unlink evidence items to/from an intent. Dual-writes the intent_spec_evidence join table and the linked_intent_ids array on evidence_items."
method: POST
path: "/api/v1/intents/{id}/evidence"
tags: ["evidence"]
---

# Link and/or unlink evidence items to/from an intent. Dual-writes the intent_spec_evidence join table and the linked_intent_ids array on evidence_items.

`POST /api/v1/intents/{id}/evidence`

evidenceIds in the response is re-fetched from intent_spec_evidence after applying link/unlink, so it reflects ALL currently-linked evidence (not just what was changed). link/unlink counts only increment for IDs that exist in the workspace. Cookie-session auth requires ?workspace_id= and a workspace membership.

## Path parameters

- `id` string, required

## Request body

- object
  - `link` string[] — Evidence item UUIDs to link. Validated against the workspace; unknown IDs silently skipped. At least one of link/unlink must be a non-empty array.
  - `unlink` string[] — Evidence item UUIDs to unlink. Validated against the workspace; unknown IDs silently skipped. At least one of link/unlink must be a non-empty array.

## Response `200`

Link/unlink applied; returns counts and the intent's full current evidence ID list

- object

## Other responses

- `400` — Invalid request body (zod) — e.g. neither link nor unlink is a non-empty array
- `401` — Missing/invalid API key or session
- `403` — Authenticated but lacks write scope
- `404` — Intent not found in this workspace
- `429` — general rate limit exceeded (300/h per user)
- `500` — Internal server error

---

[API](https://skmtc.dev/pathmode/apis/pathmode-api.md) · [All operations](https://skmtc.dev/pathmode/apis/pathmode-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pathmode/pathmode-api/revisions/e419abb0a327/schema)
