Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.
Disable virtual key
Reversible stop: requests on the key are rejected with virtual_key_disabled until it is enabled again. Idempotent.
Try this endpoint
app.langwatch.ai
API key · X-Auth-Token
Kept in this tab. Cleared when you reload.
Body (application/json)
This sends a live request to app.langwatch.ai.
Request and response examples
request.py
import osimport requestsorigin = "https://app.langwatch.ai"path = "/api/gateway/v1/virtual-keys/<id>/disable"api_key = os.environ["LANGWATCH_API_KEY"]headers = { "X-Auth-Token": api_key,}response = requests.post( origin + path, headers=headers,)print(response.json())const url = "https://app.langwatch.ai/api/gateway/v1/virtual-keys/<id>/disable";const response = await fetch(url, { method: "POST", headers: { "X-Auth-Token": process.env.LANGWATCH_API_KEY!, },});const data = await response.json();curl --request POST \ --url 'https://app.langwatch.ai/api/gateway/v1/virtual-keys/<id>/disable' \ --header "X-Auth-Token: $LANGWATCH_API_KEY"Call the LangWatch API from this project: Disable virtual key.Request: POST https://app.langwatch.ai/api/gateway/v1/virtual-keys/<id>/disableReference: https://langwatch.ai/docs/api-reference/gateway-virtual-keys/disable-virtual-key.mdAuthentication: send the X-Auth-Token header, read from the LANGWATCH_API_KEY environment variable. Never hard-code the key.Use the HTTP client this project already uses, handle non-2xx responses, and show me the parsed result.Success
application/json · Generated from schema
{ "virtual_key": { "id": "string", "organization_id": "string", "name": "string", "description": "string", "status": "active", "purpose": "user", "display_prefix": "string", "principal_user_id": "string", "trace_project_id": "string", "trace_project_archived": false, "external_id": "string", "metadata": {}, "scopes": [ { "scope_type": "organization", "scope_id": "string" } ], "routing_policy_id": "string", "routing_mode": "none", "config": null, "revision": "string", "created_at": "2026-01-01T00:00:00Z", "updated_at": "2026-01-01T00:00:00Z", "last_used_at": "2026-01-01T00:00:00Z", "revoked_at": "2026-01-01T00:00:00Z", "expires_at": "2026-01-01T00:00:00Z" }}Bad Request
application/json · Generated from schema
{ "type": "string", "code": "string", "message": "string", "retryable": false, "meta": {}, "trace_id": "string", "span_id": "string", "trace": { "traceId": "string", "spanId": "string", "traceUrl": "string", "logsUrl": "string" }, "tips": [ "string" ], "docs_url": "string", "fault": "customer", "reasons": [ null ]}Unauthorized
application/json · Generated from schema
{ "type": "string", "code": "string", "message": "string", "retryable": false, "meta": {}, "trace_id": "string", "span_id": "string", "trace": { "traceId": "string", "spanId": "string", "traceUrl": "string", "logsUrl": "string" }, "tips": [ "string" ], "docs_url": "string", "fault": "customer", "reasons": [ null ]}Forbidden
application/json · Generated from schema
{ "type": "string", "code": "string", "message": "string", "retryable": false, "meta": {}, "trace_id": "string", "span_id": "string", "trace": { "traceId": "string", "spanId": "string", "traceUrl": "string", "logsUrl": "string" }, "tips": [ "string" ], "docs_url": "string", "fault": "customer", "reasons": [ null ]}Internal Server Error
application/json · Generated from schema
{ "type": "string", "code": "string", "message": "string", "retryable": false, "meta": {}, "trace_id": "string", "span_id": "string", "trace": { "traceId": "string", "spanId": "string", "traceUrl": "string", "logsUrl": "string" }, "tips": [ "string" ], "docs_url": "string", "fault": "customer", "reasons": [ null ]}Path parameters
idstringrequiredAt least 1 character
Request body
application/json
reasonstringUp to 500 characters
Responses
200Success
application/json
virtual_keyobjectrequired400Bad Request
application/json
typestringrequiredcodestringrequiredmessagestringrequiredretryablebooleanrequiredmetaobjecttrace_idstringspan_idstringtraceobjecttipsstring[]docs_urlstringfaultstringOne of
"customer""platform""provider""presumed_platform"reasonsany[]401Unauthorized
application/json
typestringrequiredcodestringrequiredmessagestringrequiredretryablebooleanrequiredmetaobjecttrace_idstringspan_idstringtraceobjecttipsstring[]docs_urlstringfaultstringOne of
"customer""platform""provider""presumed_platform"reasonsany[]403Forbidden
application/json
typestringrequiredcodestringrequiredmessagestringrequiredretryablebooleanrequiredmetaobjecttrace_idstringspan_idstringtraceobjecttipsstring[]docs_urlstringfaultstringOne of
"customer""platform""provider""presumed_platform"reasonsany[]500Internal Server Error
application/json
typestringrequiredcodestringrequiredmessagestringrequiredretryablebooleanrequiredmetaobjecttrace_idstringspan_idstringtraceobjecttipsstring[]docs_urlstringfaultstringOne of
"customer""platform""provider""presumed_platform"reasonsany[]