---
title: "Revoke API key"
method: DELETE
path: "/api/api_keys/{id}"
tags: ["API Keys"]
---

# Revoke API key

`DELETE /api/api_keys/{id}`

## Request

- Base URL: `https://api.postproxy.dev`
- URL: `https://api.postproxy.dev/api/api_keys/{id}`
- Auth: HTTP bearer

Revokes a scoped API key immediately: the next request with that token returns 401. Only scoped keys in the caller's environment can be revoked; any other id returns 404. Requires an account-wide API key.

## Path parameters

- `id` string, required

## Response `200`

Key revoked

- object
  - `deleted` boolean

## Other responses

- `404`: Not a scoped key in the caller's environment
- `422`: Caller is a group-scoped key or an OAuth token

---

[API](https://skmtc.dev/postproxy/apis/postproxy-social-media-api.md) - [All operations](https://skmtc.dev/postproxy/apis/postproxy-social-media-api/llms.txt) - [OpenAPI document](https://skmtc.dev/postproxy/apis/postproxy-social-media-api/revisions/d54482ac4ce7?raw)
