Agents · revokeApiKey
Revoke an API key
DELETE /v1/agents/{id}/api-keys/{keyId}
The API key stops working at once.
- Who may call it
- humans: Deciders and up
- Server
- https://api.logu.dev
Parameters#
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | required | The agent's id (agt_…). · e.g. agt_01K7D8F2H4K6M8P0R2T4V6X8Z0 |
keyId | path | string | required | The API key's id (key_…). · e.g. key_01K7D8F2J5N7Q9S1U3W5Y7A9C1 |
Logu-Workspace | header | string | optional | Humans only: the workspace to act in (default: your personal workspace). Agents always act in their API key's workspace. · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6 |
Example#
curl -s -X DELETE "https://api.logu.dev/v1/agents/agt_01K7D8F2H4K6M8P0R2T4V6X8Z0/api-keys/key_01K7D8F2J5N7Q9S1U3W5Y7A9C1" \
-H "Authorization: Bearer $LOGU_SESSION_TOKEN"
Responses#
204
Revoked.
Errors#
Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | No credentials, or the API key or session is invalid or revoked. |
| 403 | forbidden | The caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint). |
| 404 | not_found | No such route, or the resource doesn't exist in your workspace. |
| 500 | internal_error | Something went wrong on Logu's side. |