Delete API key
Revokes an API key.
DELETE /api/v1/keys/{key_ref}
The target must belong to the calling key's owner; revoked keys must not be used for application requests.
Back to API keys endpoint listRequest parameters
| Field | Type | Required | Description |
|---|---|---|---|
key_ref | path | Yes | Key ID, prefix, or supported key reference. |
Request examples
curl -X DELETE "https://api.globalrouter.com/api/v1/keys/key_123" \ -H "Authorization: Bearer $GR_API_KEY"
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
data.id | string | Yes | Revoked API key record ID. |
data.tenant_id | string | No | Tenant ID owning the key. |
data.name | string | No | Key name. |
data.key_prefix | string | No | Key prefix for identification and troubleshooting. |
data.scopes | string[] | No | Scopes. |
data.status | string | Yes | Status after revocation. |
data.allowed_models | string[] | No | Model allowlist. |
data.blocked_models | string[] | No | Model blocklist. |
data.allowed_ips | string[] | No | Source IP allowlist. |
data.rate_limit_per_minute | integer | No | Per-minute rate limit. |
data.expires_at | string | No | Expiration time. |
data.last_used_at | string | No | Last-used time. |
Response example
{
"data": {
"id": "key_123",
"tenant_id": "tenant_123",
"name": "production-chat-key",
"key_prefix": "gr_live",
"scopes": ["chat", "models"],
"status": "revoked",
"allowed_models": ["qwen3-32b"],
"blocked_models": [],
"allowed_ips": ["203.0.113.10"],
"rate_limit_per_minute": 120,
"expires_at": "2026-12-31T23:59:59+00:00",
"last_used_at": "2026-06-26T10:05:00+00:00"
}
}Notes
- Responses only return masked data. Never expose plaintext keys in logs, issues, or screenshots.