# Change every request a filter keeps (https://notert.io/docs/api/reference/change-every-request-a-filter-keeps)

`POST /api/v1/requests/changes`

Makes one change to every request a filter keeps on the boards this token reaches, as the token's holder, as the requests list's press over every request it keeps does: a status, their sub-requests keeping their own and the people who asked hearing of it, a board, owners or tags added and taken off, the day each is expected done, or whether the public board shows them. Each call changes the newest 150 that still need it through the write the list's own press makes, which spends that press's budgets; while more is true, send the same call again. Requests merged into another are left out, and so is one the change would fill past the most tags or owners a request takes. Count first with POST /requests/changes/count and send its asOf. A board this token doesn't reach is BOARD_NOT_REACHED. Sent again, a call changes only what still needs the change.

Access: A token with requests:manage.

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `filters` | object | Yes | Which requests: those a filter keeps, as the requests list in the app filters them, on the boards this token reaches. Requests filed under another are left out unless subRequests is true. |
| `filters.query` | string | No | Words every request kept holds in its title, its details or its author's name. At most 200 characters. |
| `filters.statuses` | string[] | No | Only requests in these statuses. Default []. |
| `filters.boardIds` | string[] | No | Only requests on any of these boards. Default []. |
| `filters.tagIds` | string[] | No | Only requests wearing any of these tags. Default []. |
| `filters.ownerIds` | string[] | No | Only requests any of these teammates own, by their m_ ids. Default []. |
| `filters.wantedBy` | string | No | Only the requests this person filed or voted for, by person id. |
| `filters.createdAfter` | date-time | No | Only requests filed at or after this moment, with its offset. |
| `filters.createdBefore` | date-time | No | Only requests filed before this moment, with its offset. |
| `filters.exclude` | string[] | No | Which of boardIds, tagIds and ownerIds keep the requests they don't name instead: board, tag or owner. With tag, untagged requests are kept too. Default []. |
| `filters.subRequests` | boolean | No | true to keep the requests filed under another as well. Default false. |
| `filters.likelyDuplicates` | boolean | No | true for only the requests Notert found likely repeat another, which the team hasn't settled. Default false. |
| `filters.visibility` | string | No | hidden for only the requests kept off the public board, shown for only those it shows. Left out, both. One of: `hidden`, `shown`. |
| `filters.estimated` | string | No | By the day the team expects to ship each, from today: overdue, day, three_days, week, month or three_months (due by the end of it, overdue ones included), or none for no day set. One of: `overdue`, `day`, `three_days`, `week`, `month`, `three_months`, `none`. |
| `filters.timeZone` | string | No | The IANA time zone estimated counts today in, such as Europe/Oslo. UTC by default. At most 64 characters. Default "UTC". |
| `change` | object | Yes | The one change, by its kind: status, board, owners, tags, estimatedDate or hidden, with the field that kind names. Everything else each request has stays. |
| `change.kind` | value | Yes | Which change it is. |
| `change.status` | string | No | The status to move each one to. One of: `pending`, `in_review`, `planned`, `in_progress`, `completed`, `closed`. |
| `change.boardId` | string | No | The board to move each one to. At most 64 characters. |
| `change.addOwnerIds` | string[] | No | Teammates to add as owners of each one, by their m_ ids. Default []. |
| `change.removeOwnerIds` | string[] | No | Teammates to take off the owners of each one, by their m_ ids. Default []. |
| `change.addTagIds` | string[] | No | Tags to put on each one. Default []. |
| `change.removeTagIds` | string[] | No | Tags to take off each one. Default []. |
| `change.estimatedDate` | date or null | No | The day the team expects to ship each one, as YYYY-MM-DD, or null to clear it. |
| `change.hidden` | boolean | No | true to keep each one off the public board, false to show it there again. |
| `asOf` | date-time | Yes | The asOf the count answered, the same on every call until more is false. |

## Response 200

| Field | Type | Description |
| --- | --- | --- |
| `changed` | integer | How many requests this call changed, at most 150. |
| `more` | boolean | Whether more requests the filter keeps still wait for the change. |

## Errors

| Status | Code | Message |
| --- | --- | --- |
| 400 | `BAD_REQUEST` | Input validation failed. |
| 401 | `UNAUTHORIZED` | Send a valid API token as a Bearer token. |
| 403 | `BOARD_NOT_REACHED` | This API token works only on the boards it was made for. Name one of them, or create a token that reaches this one in the workspace's settings. |
| 403 | `HOLDER_NOT_ALLOWED` | The teammate who holds this API token's secret can't do this in the workspace now. A teammate who can should roll it in the workspace's settings. |
| 403 | `INSUFFICIENT_SCOPE` | This API token can't change or delete requests, their status or their place on the roadmap. Create one that may in the workspace's settings. |
| 403 | `NETWORK_NOT_ALLOWED` | This API token works only from the networks it was made for. Call from one of them, or create a token for this one in the workspace's settings. |
| 403 | `NO_SEAT` | This workspace's plan has no seat for you. |
| 403 | `WORKSPACE_SUSPENDED` | This workspace is suspended. |
| 409 | `CHANGED_MEANWHILE` | Something changed meanwhile. Try again. |
| 409 | `CHANGED_SINCE` | A teammate changed one of them just now, so nothing changed. Send the same call again. |
| 409 | `MERGED` | The request was merged into another, which holds its votes, comments and status now. Send this to that one. |
| 409 | `PICKS_GONE` | A board, tag or teammate it names isn't in this workspace. Pick another, or leave it out. Its data holds `board`, `tagIds`, `ownerIds`, `author`. |
| 409 | `TAGS_FULL` | A request would wear more than 50 tags, counting those a teammate added since. data.requestId says which. Take some off it, then send your change once more. Its data holds `requestId`. |
| 429 | `TOO_MANY_REQUESTS` | Too Many Requests. Its data holds `retryAfter`. |

## Example request

```sh
curl -X POST https://app.notert.io/api/v1/requests/changes \
  -H "Authorization: Bearer $NOTERT_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "filters": {
    "statuses": [
      "pending"
    ],
    "tagIds": [
      "7a3e1c9b-4d2f-4b8a-9e6c-2f1d5b7a3c08"
    ]
  },
  "change": {
    "kind": "status",
    "status": "planned"
  },
  "asOf": "2026-11-10T14:05:00.123Z"
}'
```

## Example response 200

```json
{
  "changed": 42,
  "more": false
}
```
