---
title: "Revoke an API Key"
method: POST
path: "/admin/api_keys/{api_key}/revoke"
tags: ["API Keys"]
---

# Revoke an API Key

`POST /admin/api_keys/{api_key}/revoke`

Revokes an API Key.

## Path parameters

- `api_key` string, required — The public token that refers to your API key, as distinct from the API Secret.

## Headers

- `authorization` string — Admin API bearer token.
- `Pinwheel-Version` '2025-07-08' | '2023-11-22' | '2023-07-18' | '2023-04-18' | '2022-09-09' | '2022-06-22' | '2022-03-02', required

## Response `200`

OK

- object
  - `data` RevokeAPIKeyResponseData, required
    - `mode` 'sandbox' | 'development' | 'production', required — The mode that the Admin API token is authorized for.
    - `key` string, required — The public token that refers to your API key, as distinct from the API Secret.
    - `expires_at` string, date-time — Timestamp used to set when this key automatically expires.
    - `created_at` string, date-time, required — ISO 8601 timestamp of created time.
    - `revoked_at` string, date-time, required — Timestamp of when this key was revoked.

---

[API](https://skmtc.net/getpinwheel/apis/pinwheel.md) · [All operations](https://skmtc.net/getpinwheel/apis/pinwheel/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getpinwheel/pinwheel/revisions/8ef86dd4902e/schema)
