Source: https://seerepo.com/docs/api-changes
Markdown source: https://seerepo.com/docs/api-changes.md
Description: Ignore paths, mark a finding false, set a task aside or claim commits for their agent, with a key that writes, in two steps.

# Make a change

`POST https://seerepo.com/api/v1/repos/:repo/changes`

Four changes and no more: ignore paths, mark a finding in Salud false, set a task aside (put it off or accept it), and claim the commits an agent made without signing them. Each takes two steps: this call prepares it and changes nothing; `POST /changes/apply` with its `handle`, within 5 minutes, makes it so. The key has to be one you let write, in **Settings → API / MCP**. The rules are the same as [the MCP's](/docs/mcp): never over security findings, never more than half of the product out of the map, and 20 changes a day per project.

## Prepare

| Field | Where | Description |
|---|---|---|
| `repo` | path | The repo's id, or owner/name with %2F. |
| `kind` | body | `ignore`, `false`, `snooze`, `accept` or `claim`. |
| `paths` | body | For `ignore`: the paths or patterns, up to 100 per project. |
| `task` | body | For the others: the task's key, or its number in [the health list](/docs/api-health). |
| `files` | body | For `false`, optional: only these of the task's files. Without them, the whole task. |
| `why` | body | For `false` and `accept`: why, up to 300 characters. |
| `days` | body | For `snooze`: 1 to 90. |
| `agent` | body | For `claim`: the agent as SeeRepo names it (`Codex`, `Claude`, `Cursor`…). |
| `shas` | body | For `claim`: the commits' whole hashes, 40 characters, up to 1,000. One that already carries a signature is kept, but its signature wins; one already claimed stays as it is. |

```sh
curl -X POST "https://seerepo.com/api/v1/repos/6ad79fd8e89233277ded17c9/changes" \
  -H "Authorization: Bearer $SEEREPO_KEY" -H "Content-Type: application/json" \
  -d '{ "kind": "false", "task": "dead", "files": ["app/forbidden.js"], "why": "Next renders it by its name" }'
```

It returns `data.handle` (shown only this once), `data.expiresAt` and `data.preview`: what will happen, so you can show it to the person before applying.

## Apply

`POST https://seerepo.com/api/v1/changes/apply` with `{ "handle": "ch_…" }`, with the same key. It returns the change. The same handle twice applies it once.

## Undo and the log

- `POST https://seerepo.com/api/v1/changes/:id/undo` puts back what an applied change did: the paths it added leave the ignore list, a mark leaves Salud, and what was claimed stops counting.
- `GET https://seerepo.com/api/v1/repos/:repo/changes?page=1` lists what was applied and undone, the newest first, 20 a page: each change's `id`, `kind`, `status`, `via`, `target`, `why`, `until`, `at`, `by` and `undoneAt`.

## Errors

| Code | When |
|---|---|
| `read_only_key` | The key doesn't write. |
| `not_owner` | Only the project's owner changes it; a member reads. |
| `security` | It would hide or mark what security found. |
| `too_big` | It would take more than half of the product out of the map: that's done in Settings. |
| `no_task`, `not_in_task` | No open task with that key or number, or a file the task doesn't name. |
| `no_why`, `bad_days`, `no_paths`, `too_many_paths` | Something the change needs is missing or out of range. |
| `expired`, `no_change`, `wrong_kind` | The handle is past its 5 minutes, isn't this key's, or isn't for this kind. |
| `day_cap` | The project took its 20 changes of the day. |
