List legal documents
GET /v1/legal-documents · permission legal-documents:read
Lists the legal documents your end users are shown (terms, privacy notices, custom documents), newest first, in cursor pages. Only forward paging (after) is available; before and order=asc are rejected. Changing a filter invalidates cursors issued for another filter.
Request
Query parameters:
| Field | Type | Required | Description |
|---|---|---|---|
limit |
integer | no | 1-100, default 20. |
after |
string | no | Opaque cursor from list_metadata.after. |
kind |
string | no | Filter by kind: terms, privacy_notice or custom. |
application_id |
string | no | Only documents specific to this application (app_…). |
Response
200 OK with data (documents) and list_metadata (before is always null; after is null on the last page). No total count is returned.
{
"data": [
{
"id": "ldoc_01j9xk3m7q8r2s4t6v8w0y2z4a",
"application_id": null,
"kind": "terms",
"version": "2026-10",
"locale": "en",
"url": "https://example.com/legal/terms-2026-10",
"content_sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"effective_at": "2026-11-01T00:00:00Z",
"requires_reacceptance": true,
"created_at": "2026-10-05T09:30:00.123456Z",
"updated_at": "2026-10-05T09:30:00.123456Z"
}
],
"list_metadata": {
"before": null,
"after": null
}
}
Errors
| HTTP | code | When |
|---|---|---|
| 400 | invalid_cursor |
The cursor is malformed or was issued for another filter. |
| 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
curl "https://api.eu.keenauth.com/v1/legal-documents?kind=terms&limit=20" \
-H "Authorization: Bearer $KEENAUTH_SECRET_KEY"