revoke_key
Revoke the key with prefix (from list_keys): it stops working, others keep working.
Use to kill a leaked or old key. Args: prefix (the 12-char key prefix, e.g.
vhg_sk_ab12), api_key (a DIFFERENT active key to authenticate this call).
Returns {prefix, name, revoked, revoked_at, already_revoked}. You cannot revoke
your LAST active key (create a replacement first). Requires the admin scope. Errors:
unauthorized, forbidden, invalid_request (last key), not_found, rate_limited.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prefix | Yes | The 12-char key prefix to kill, copied from list_keys (e.g. vhg_sk_ab12), NOT the plaintext key. Revoking is idempotent; you cannot revoke your last active key. | |
| api_key | No | API key for this call. Omit to fall back to the Authorization: Bearer / X-API-Key request header (streamable-HTTP only), then the VHGENGINE_API_KEY env var (the stdio default). No key resolvable -> unauthorized. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Its label. | |
| prefix | No | The key that was revoked. | |
| revoked | No | Whether the key is now revoked (true after a successful call). | |
| revoked_at | No | When it was revoked, ISO-8601 UTC. | |
| already_revoked | No | true when it was already revoked, i.e. this call changed nothing. |