# Feedback

Feedback that end users submit from apps built with Mapbox, through the Feedback Agent, from the [Feedback API](https://docs.mapbox.com/api/feedback/). `list` and `get` need a token with the `user-feedback:read` scope, and `create` needs `user-feedback:write`. `mapbox auth login` requests both; if your stored token predates `create`, [log in](https://docs.mapbox.com/ja/cli/reference/authentication/) again. Every command also takes the common flags — `--username`/`-u`, `--token`/`-t`, `--profile`, `--id` — described in [Shared parameters](https://docs.mapbox.com/ja/cli/reference/#shared-parameters).

-   [`mapbox feedback list`](#mapbox-feedback-list)
-   [`mapbox feedback get`](#mapbox-feedback-get)
-   [`mapbox feedback create`](#mapbox-feedback-create)

## `mapbox feedback list`

Every feedback item on the account, oldest received first by default. Paginated: pass a response's `end_cursor` to `--after` for the next page.

**Parameters:**

| Parameter | Description |
| --- | --- |
| `--feedback-id` | Limit to one feedback ID. |
| `--after` | A cursor from a previous response's `end_cursor`, to page forward. |
| `--limit` | The maximum number of items to return, up to 1000. |
| `--sort-by` | Which timestamp to sort by. Defaults to `received_at`. Values: `received_at`, `created_at`, `updated_at`. |
| `--order` | Sort direction. Defaults to `asc`. Values: `asc`, `desc`. |
| `--status` | Limit to one status: `received`, `fixed`, `reviewed`, or `out_of_scope`. |
| `--category` | Limit to one feedback category. Categories are account-specific, with no fixed list. |
| `--search` | A phrase to match against feedback text. |
| `--trace-id` | Limit to one trace ID, as provided by the app that submitted the feedback. |
| `--created-before`, `--created-after` | Only items the end user created before or after this time, ISO 8601. |
| `--received-before`, `--received-after` | Only items Mapbox received before or after this time, ISO 8601. |
| `--updated-before`, `--updated-after` | Only items last updated before or after this time, ISO 8601. |

**Examples:**

```sh
mapbox feedback list --limit 5
mapbox feedback list --status received --category positioning_issue
mapbox feedback list --sort-by updated_at --order desc --received-after 2026-01-01T00:00:00Z
```

## `mapbox feedback get`

Retrieves one feedback item by ID.

**Parameters:**

| Parameter | Description |
| --- | --- |
| `<feedback-id>` | Required. The feedback item's ID. |

**Examples:**

```sh
mapbox feedback get 01a06d61-17e4-74aa-b824-13baaf272670
```

## `mapbox feedback create`

Submits one feedback item, filed under the account that owns the token. It goes to Mapbox's review queue and can't be deleted afterward, so check the body with [`--dry-run`](https://docs.mapbox.com/ja/cli/reference/global-options/#--dry-run) first. The new item is readable with `get` at once, but can take a minute or so to appear in `list`.

The body is JSON. `--feedback` and `--category` are required, either as flags or in `--data`; a flag wins over the same field in `--data`. Other body fields go through `--data`:

-   `id` — a unique ID, generated when omitted. Send your own to make a retry safe: a second request with the same `id` is rejected rather than creating a duplicate.
-   `feature` — a GeoJSON Feature the feedback is about.
-   `screenshot` — a PNG or JPEG as a data URI (`data:image/png;base64,…`), not bare `base64`.

You can't set `trace_id`: the API drops it.

**Parameters:**

| Parameter | Description |
| --- | --- |
| `--data`/`-d` | Request body as a JSON string, or `@<path>` to read a file and `@-` to read stdin. |
| `--feedback` | The text of the feedback. |
| `--category` | The feedback category. Any string; [`feedback list`](#mapbox-feedback-list) shows the ones already in use. |
| `--lat` | Latitude of the place the feedback is about. Defaults to `0`. |
| `--lon` | Longitude of the place the feedback is about. Defaults to `0`. |

**Examples:**

```sh
mapbox feedback create --dry-run --data @feedback.json
mapbox feedback create --feedback "The bridge is closed for repairs." \
  --lat 60.1699 --lon 24.9384 --category general
mapbox feedback create --data '{"id":"77bf502a-026a-460b-a3d1-56a604465a7d"}' \
  --feedback "The bridge is closed for repairs." --lat 60.1699 --lon 24.9384 --category general
```