PoliciesPolicy version history

Policy version history

Append-only policy revisions. Every change (including edits to limits and approvers) creates a version with a snapshot of the decision-making part: effect, condition, approval, limits, approvers.

reason: created on creation; updated on edit; backfill means the version was assembled by migration 0041 from the current state and is NOT guaranteed to match the one that made older decisions.

A decision references its version via the decisionPolicyVersionId field; for decisions older than Phase 4, it's null, since the version is unknown.

curl -X GET "https://policy-engine-rest.ezig.workers.dev/api/v1/policies/example_string/versions" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "policyId": "example_string",
  "currentVersionId": "example_string",
  "items": [
    {
      "id": "example_string",
      "version": 42,
      "reason": "created",
      "changedById": "example_string",
      "changedAt": "2026-07-02T11:25:15.134000Z",
      "isCurrent": true,
      "snapshotJson": "null"
    }
  ]
}
GET
/api/v1/policies/{id}/versions
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Session token. Mobile/services. The web uses a cookie.

Session token. Mobile/services. The web uses a cookie.
API Key (cookie: session_token)
session_tokenstring
Required

API key (sent in cookie)

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Session token. Mobile/services. The web uses a cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Path Parameters

Responses

policyIdstring
Required
currentVersionIdstring
Required
itemsarray
Required