kapi WorksDocs

Policy versions

GET/v1/policies

Every version of the company's policies published by as_at, oldest first, each with its canonical HTML file, its statement and every field its version_digest covers, so anyone can check the file and the digest without Kapi. A page holds fewer versions when their files are long. Requires acknowledgements:read.

Authorization

bearerAuth acknowledgements:read
AuthorizationBearer <token>

A company API key, not an OAuth access token: kw_live_ in production, kw_test_ elsewhere. Send it only in the Authorization header. A key sent in a URL is revoked.

In: header

Scope: acknowledgements:read

Query Parameters

as_at?|

RFC 3339 instant with an offset, or a date read as the end of the company's day. Versions published by then. Defaults to now.

cursor?string

Opaque next_cursor from the previous page. Send it unchanged to the same endpoint. It pins the snapshot and filters, and grants no access.

limit?integer

Rows per page, 1 to 200. Larger values are treated as 200. A page can hold fewer rows to stay within 3 MiB, so follow next_cursor until it is null.

Range1 <= value
Default200

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

# Supply the key from your server's secret manager. Do not log it.# curl reads the header from stdin, keeping the key out of its arguments.printf 'header = "Authorization: Bearer %s"\n' "$KAPI_WORKS_API_KEY" |  curl --config - --silent --show-error --fail-with-body \  'https://example.com/v1/policies'
{  "data": [    {      "deployment_id": "00000000-0000-4000-8000-000000000001",      "organization_id": "4f6b2a52-1c1e-4f7a-9d3e-2b7c8a9e0d11",      "learning_space_id": "8b2d6c3e-5f41-4a8e-9c27-1d0e3f4a5b62",      "course_id": "3e1d5c7b-9a2f-4e6d-8c1b-5a7f9e3d1c22",      "course_release_id": "6f4e2d1c-8b7a-4c9e-9d3f-2e1a0b9c8d33",      "policy_title": "Partner code of conduct",      "version": 2,      "act": "sign",      "doors": [        "partner"      ],      "statement": "By signing, I agree to the Partner code of conduct, version 2.",      "statement_sha256": "7e9b1d3f5a7c9e2b4d6f8a0c1e3b5d7f9a2c4e6b8d0f1a3c5e7b9d2f4a6c8e0b",      "effective_on": "2026-11-01",      "renew_months": 12,      "change_kind": "ask_again",      "published_at": "2026-10-01T08:30:00Z",      "document_sha256": "0c2e4b6d8f1a3c5e7b9d2f4a6c8e0b1d3f5a7c9e2b4d6f8a0c1e3b5d7f9a2c4e",      "version_digest": "4b1d9e7f2a6c8e0b3d5f7a9c1e3b5d7f9a2c4e6b8d0f1a3c5e7b9d2f4a6c8e0b",      "html": "<!doctype html>\n<html lang=\"en-GB\">\n<head>\n<meta charset=\"utf-8\">\n<title>Partner code of conduct</title>\n</head>\n<body>\n<h1>Partner code of conduct</h1>\n<p>We expect our partners to act honestly and fairly.</p>\n<kapi-sign></kapi-sign>\n</body>\n</html>\n"    }  ],  "total": 1,  "snapshot": {    "organization_id": "4f6b2a52-1c1e-4f7a-9d3e-2b7c8a9e0d11",    "deployment_id": "00000000-0000-4000-8000-000000000001",    "as_at": "2026-10-09T09:00:00Z",    "from": null,    "known_at": "2026-10-09T08:59:41Z",    "sequence": 1284,    "capture_sequence": 352,    "chain_hash": "3f9a1c7e5b2d8f4a6c0e9b1d3f5a7c9e2b4d6f8a0c1e3b5d7f9a2c4e6b8d0f1a",    "logic": {      "version": 4,      "date": "2026-10-06"    },    "history_complete_from": "2026-10-06T05:00:00Z",    "available": true  },  "next_cursor": null}