Skip to contentSkip to page list

Docs

Revoke API key

Revoke (soft-delete) an API key. Revoked keys can no longer authenticate. Requires organization:manage permission.

DELETE/api/v1/api-keys/{id}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/api-keys/<id>"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "Authorization": "Bearer " + api_key,}​response = requests.delete(    origin + path,    headers=headers,)print(response.json())

Success

application/json · Generated from schema

{  "success": false}
api-reference/api-keys/revoke-api-key

Authorization

Authorizationstringheaderrequired

Admin API key for organization-level operations (managing projects, API keys). Create one in Settings > API Keys or via POST /api/api-keys. Format: sk-lw-{id}_{secret}.

Path parameters

idstringrequired
At least 1 character

Responses

200

Success

application/json

successbooleanrequired
401

Invalid or missing API key token

403

Not authorized to revoke this API key, which belongs to another member (api_key_not_owned)

404

API key not found (api_key_not_found)

409

API key is already revoked (api_key_already_revoked)

Documentation