---
title: "Revoke a project key"
method: DELETE
path: "/api/v1/projects/{slug}/keys/{keyId}"
tags: ["management"]
---

# Revoke a project key

`DELETE /api/v1/projects/{slug}/keys/{keyId}`

## Request

- Base URL: `https://api.past.dev`
- URL: `https://api.past.dev/api/v1/projects/{slug}/keys/{keyId}`
- Auth: HTTP bearer

Revoke one project key by the id returned when it was created. The key stops working on its next call. Returns no body.

## Path parameters

- `slug` string, required
- `keyId` string, required

## Response `204`

The key was revoked. No response body.

## Other responses

- `400`: The request is malformed or violates a field constraint. Match behavior on the response code field.
- `401`: missing-api-key: no bearer. malformed-api-key: the header or the key has the wrong shape. unauthorized: the key is unknown, expired, revoked, or is a project key. These routes take the management key.
- `404`: The key is not a live key of that project.
- `default`: Any other failure uses the same JSON error envelope.

---

[API](https://skmtc.dev/past/apis/past-dev-memory-api.md) · [All operations](https://skmtc.dev/past/apis/past-dev-memory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/past/apis/past-dev-memory-api/revisions/3ddccc19f0eb?raw)
