Skip to contentSkip to page list

Docs

Revoke a grant

Revoke a grant. Identical grants each hold until revoked, so the access lasts until the last of them ends. Revoking the organization's last administrator answers cannot_remove_last_admin.

DELETE/api/v1/grants/{grantId}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/grants/<grantId>"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

{  "id": "string",  "revoked": true}
api-reference/grants/revoke-a-grant

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

grantIdstringrequired
At least 1 characterUp to 128 characters

Responses

200

Success

application/json

idstringrequired
revokedbooleanrequired
Alwaystrue

Documentation