---
title: "Revoke every active key not used in the given number of days (never-used keys count from creation)."
method: POST
path: "/v1/workspaces/{ws}/api-keys/revoke-unused"
tags: ["apiKeys"]
---

# Revoke every active key not used in the given number of days (never-used keys count from creation).

`POST /v1/workspaces/{ws}/api-keys/revoke-unused`

## Request

- Base URL: `https://api.storequant.com`
- URL: `https://api.storequant.com/v1/workspaces/{ws}/api-keys/revoke-unused`
- Auth: HTTP bearer

Revoke every active key not used in the given number of days (never-used keys count from creation). Scope `apiKeys:write`; cache `none`.

## Path parameters

- `ws` string, required

## Request body

- object
  - `unused_days` integer

## Response `201`

Success.

- object
  - `data` object, required
    - `revoked` string[], required
  - `meta` object, required
    - `request_id` string, required
    - `as_of` string, date-time, required
    - `lag_hours` number
    - `cursor` string
    - `count` integer

## Other responses

- `4XX`: The one error shape.
- `5XX`: The one error shape.

---

[API](https://skmtc.dev/scrollstash/apis/storequant-api.md) · [All operations](https://skmtc.dev/scrollstash/apis/storequant-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scrollstash/apis/storequant-api/revisions/4d67a114a13c?raw)
