---
title: "Roll back a policy to a prior revision."
method: POST
path: "/api/policies/{policyName}/rollback"
tags: ["Policy Versions"]
---

# Roll back a policy to a prior revision.

`POST /api/policies/{policyName}/rollback`

Restores the content of the specified revision as a new head revision, preserving the full history. The live policy is updated with the prior content and its revision counter is incremented. The rollback is audited. Admins may roll back another user's policy via the owner parameter. Requires the `policies:write` scope.

## Path parameters

- `policyName` string, required

## Query parameters

- `revision` integer, required
- `owner` string

## Headers

- `Authorization` string, required

## Response `201`

Rollback succeeded. Body contains the new revision number.

- PolicyRollbackResponse
  - `revision` integer

## Other responses

- `400` — The policy name or target revision is missing.
- `401` — The Authorization header is absent or the API key is not recognized.
- `404` — The policy or the target revision does not exist.
- `409` — Managed policies cannot be rolled back.
- `413` — Content Too Large
- `415` — Unsupported Media Type
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/philterd/apis/philter-api.md) · [All operations](https://skmtc.net/philterd/apis/philter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/philterd/philter-api/versions/67443cd5a65b/schema)
