Skip to main content

List Policy Templates

Returns all available policy templates provided by the platform. Templates are pre-built policy recipes that can be used as starting points when creating new policies.
GET /v1/policy-templates

Example Request

curl https://api.docyard.io/v1/policy-templates \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

Response

[
  {
    "id": "tpl_standard_mortgagee",
    "name": "Standard Mortgagee Access",
    "description": "Read-only access to declaration pages and COIs with email verification. 90-day expiry.",
    "recipe": {
      "access": "read",
      "artifactTypes": ["declaration-page", "coi"],
      "requireFactors": ["email_verified"],
      "expiresInDays": 90
    },
    "category": "insurance",
    "createdAt": "2025-01-01T00:00:00.000Z"
  },
  {
    "id": "tpl_auditor_full",
    "name": "Auditor Full Access",
    "description": "Full read access to all artifact types with multi-factor authentication. 30-day expiry.",
    "recipe": {
      "access": "read",
      "artifactTypes": ["*"],
      "requireFactors": ["email_verified", "secret"],
      "expiresInDays": 30
    },
    "category": "compliance",
    "createdAt": "2025-01-01T00:00:00.000Z"
  },
  {
    "id": "tpl_policyholder_basic",
    "name": "Policyholder Basic Access",
    "description": "Basic access to personal policy documents with email verification. 180-day expiry.",
    "recipe": {
      "access": "read",
      "artifactTypes": ["declaration-page", "policy-document"],
      "requireFactors": ["email_verified"],
      "expiresInDays": 180
    },
    "category": "insurance",
    "createdAt": "2025-01-01T00:00:00.000Z"
  }
]

Error Handling

StatusCondition
401Missing or invalid API key
Policy templates are managed at the platform level and are available to all docks. Use Create from Template to create a new policy based on a template.