Skip to main content

List Policy Versions

Returns all versions of a policy, ordered by version number descending (newest first).
GET /v1/docks/:dockId/policies/:policyId/versions

Path Parameters

ParameterTypeDescription
dockIdstringThe dock ID
policyIdstringThe policy ID

Example Request

curl https://api.docyard.io/v1/docks/dock_01HQ3K.../policies/pol_01HQ3P.../versions \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

Response

[
  {
    "version": 3,
    "policyId": "pol_01HQ3P...",
    "recipe": {
      "access": "read",
      "artifactTypes": ["declaration-page", "coi", "endorsement"],
      "requireFactors": ["email_verified"],
      "expiresInDays": 120
    },
    "changelog": "Added endorsement artifact type and extended expiry to 120 days",
    "createdAt": "2025-01-22T09:15:00.000Z"
  },
  {
    "version": 2,
    "policyId": "pol_01HQ3P...",
    "recipe": {
      "access": "read",
      "artifactTypes": ["declaration-page", "coi"],
      "requireFactors": ["email_verified"],
      "expiresInDays": 90
    },
    "changelog": "Initial production release",
    "createdAt": "2025-01-18T14:00:00.000Z"
  },
  {
    "version": 1,
    "policyId": "pol_01HQ3P...",
    "recipe": {
      "access": "read",
      "artifactTypes": ["declaration-page"],
      "requireFactors": ["email_verified"],
      "expiresInDays": 60
    },
    "changelog": null,
    "createdAt": "2025-01-15T11:00:00.000Z"
  }
]

Error Handling

StatusCondition
401Missing or invalid API key
404Policy or dock not found