---
title: "Delete Orphaned Oauth Keys"
method: DELETE
path: "/api/keys/orphaned"
---

# Delete Orphaned Oauth Keys

`DELETE /api/keys/orphaned`

## Request

- Base URL: `https://usemeridian.us` (the document declares no server; this is the origin it was published from)
- URL: `https://usemeridian.us/api/keys/orphaned`
- Auth: none declared

Purge this tenant's orphaned OAuth API keys (``label='oauth'``, >24h old).

Claude Code's MCP ``authorization_code`` flow mints an ``oauth``-labelled
bearer token at ``/oauth/token`` even when the redirect back to the local
callback fails; the user retries, orphaning the previous token. This sweeps
those stale rows so the tenant's key list doesn't accumulate dead entries.
Recent tokens (<24h) are left untouched in case one is still in use.
Returns ``{"deleted": <count>}``.

## Response `200`

Successful Response

- object

---

[API](https://skmtc.dev/usemeridian/apis/meridian.md) · [All operations](https://skmtc.dev/usemeridian/apis/meridian/llms.txt) · [OpenAPI document](https://skmtc.dev/usemeridian/apis/meridian/revisions/f37a894bd374?raw)
