Disable API Key
POST
/web/v1/workspaces/{workspaceId}/api-keys/{keyId}/disableJWTDisables an active API key. Once disabled, any requests authenticated with this key will be rejected.
Authentication
Auth Chain: WEB Chain — requires
Authorization: Bearer <jwt>Requires workspace OWNER role. These headers are injected by the system (frontend does nothing):X-PORTAL-ACCESS-CODE(Nginx),X-Request-Id(Gateway)
Request Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
workspaceId | string | Yes | path | Workspace business ID |
keyId | string | Yes | path | API key business ID |
Success Response
No Content200
{
"version": "1.3.0",
"timestamp": 1709337600000,
"success": true,
"code": "2000",
"message": "SUCCESS",
"data": null
}Error Responses
Unauthorized401
{
"success": false,
"code": "4010",
"message": "Invalid or expired token"
}Forbidden — not workspace owner403
{
"success": false,
"code": "4030",
"message": "Only workspace owner can manage API keys"
}Notes
- Disabling a key is reversible; use the Enable API Key endpoint to reactivate it.
- Only workspace OWNERs can disable API keys.