
# List a user's consent records

`GET /v1/users/{user_id}/consent-records` · permission `consent-records:read`

Lists a user's consent records (an append-only evidence trail), newest `occurred_at` first, in cursor pages. Only forward paging (`after`) is available. A malformed user ID returns `404 not_found`; a user with no records, or not in this environment, gets an empty list. Records carry no IP address, user agent or session data.

## Request

Path parameters:

| Field | Type | Required | Description |
|---|---|---|---|
| `user_id` | string | yes | User ID (`usr_…`). |

Query parameters:

| Field | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | 1-100, default 20. |
| `after` | string | no | Opaque cursor from `list_metadata.after`. |

## Response

`200 OK` with `data` (consent records) and `list_metadata` (`before` is always `null`). No total count is returned.

```json
{
  "data": [
    {
      "id": "crec_01j9xk3m7q8r2s4t6v8w0y2z4b",
      "user_id": "usr_01j9xk3m7q8r2s4t6v8w0y2z4c",
      "subject_type": "document",
      "subject_id": "ldoc_01j9xk3m7q8r2s4t6v8w0y2z4a",
      "subject_version": "2026-10",
      "content_sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
      "locale": "en",
      "state": "accepted",
      "method": "management_api",
      "application_id": null,
      "occurred_at": "2026-10-05T09:31:12.004211Z"
    }
  ],
  "list_metadata": {
    "before": null,
    "after": null
  }
}
```

## Errors

| HTTP | code | When |
|---|---|---|
| 400 | `invalid_cursor` | The cursor is malformed or was issued for another filter. |
| 404 | `not_found` | The user ID is malformed. |
| 422 | `validation_failed` | A query parameter is invalid. |
| 401 | `unauthenticated` | The credential is missing, invalid or revoked. |
| 403 | `insufficient_permissions` | The credential lacks the required permission. |
| 429 | `rate_limited` | The rate limit was exceeded; retry after the `Retry-After` period. |
| 503 | `service_unavailable` | A dependency is temporarily unavailable; retry after the `Retry-After` period. |

## Example

```bash
curl "https://api.eu.keenauth.com/v1/users/usr_01j9xk3m7q8r2s4t6v8w0y2z4c/consent-records?limit=20" \
  -H "Authorization: Bearer $KEENAUTH_SECRET_KEY"
```

## Personal data

This endpoint carries personal data: consent records. [Personal data in the KeenAuth APIs](/docs/policies/personal-data) describes what is stored, how long it is kept and how it is deleted. Do not send special categories of personal data (health, biometric data, religion, political opinions, sexual orientation) in any field.
