---
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. Claim Trust Loop (slice A): `claims` lists every claim the intent makes (objective, each outcome, each constraint, each edge case) with `key` (the anchor key), `kind`, `claimText`, the deterministic `state` (backed when any anchored item is backing; else unreviewed; else assumption; else none), per-tier `counts`, and `items` (the exact anchored evidence with tier, origin, source, and `reviewedBy` / `reviewedAt`, which are populated from the latest attributed review; null for legacy rows reviewed before attribution existed, and a reviewer is never inferred). `general` lists intent-level links anchored to no claim; they never make a claim backed. `evidenceAnchors` is the current anchor map and `canWrite` is true only for a signed-in writer.

## 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

## Changes

- **2026-08-23** `155c812b368b` — 6 info
  - added the optional property `details` to the response with the `400` status
  - added the optional property `details` to the response with the `401` status
  - added the optional property `details` to the response with the `403` status
  - added the optional property `details` to the response with the `404` status
  - …2 more

[Change history](https://skmtc.dev/pathmode/apis/pathmode-api/changes/api/v1/intents/:id/evidence/post.md)

---

[API](https://skmtc.dev/pathmode/apis/pathmode-api.md) · [All operations](https://skmtc.dev/pathmode/apis/pathmode-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pathmode/apis/pathmode-api/revisions/c014a089aa9c?raw)
