---
title: "Revoke a key. Requests with it fail with 401 from the next request on."
method: DELETE
path: "/v1/workspaces/{ws}/api-keys/{keyId}"
tags: ["apiKeys"]
---

# Revoke a key. Requests with it fail with 401 from the next request on.

`DELETE /v1/workspaces/{ws}/api-keys/{keyId}`

## Request

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

Revoke a key. Requests with it fail with 401 from the next request on. Scope `apiKeys:write`; cache `none`.

## Path parameters

- `ws` string, required
- `keyId` string, uuid, required

## Request body

- object

## Response `200`

Success.

- object
  - `data` object, required
    - `id` string, uuid, required
    - `name` string, required
    - `key_prefix` string, required
    - `scopes` string[], required
    - `last_used_at` string, date-time, nullable, required
    - `expires_at` string, date-time, nullable, required
    - `revoked_at` string, date-time, nullable, required
    - `created_at` string, date-time, 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/4fbe9d681caf?raw)
