---
title: "Revokes all secrets (via a lease ID prefix) or tokens (via the tokens' path property) generated under a given prefix immediately."
method: POST
path: "/sys/leases/revoke-prefix/{prefix}"
tags: ["system"]
---

# Revokes all secrets (via a lease ID prefix) or tokens (via the tokens' path property) generated under a given prefix immediately.

`POST /sys/leases/revoke-prefix/{prefix}`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/lensesio/apis/hashicorp-vault-api/docs/sys/leases/revoke-prefix/:prefix/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- SystemLeasesRevokePrefixRequest
  - `sync` boolean: Whether or not to perform the revocation synchronously

## Response `200`

OK

---

[API](https://skmtc.dev/lensesio/apis/hashicorp-vault-api.md) - [All operations](https://skmtc.dev/lensesio/apis/hashicorp-vault-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lensesio/apis/hashicorp-vault-api/revisions/bd8194de0697?raw)
