Concepts
'API tokens (API keys): list, revoke, delete, rotate'
Official Kody doc
Kody API tokens (kody_at_…, sometimes called API keys) authenticate the
Open API, the CLI, and CI. There is no account UI for them: you
manage them with these Open API operations.
| Task | operationId | Needs scope |
|---|---|---|
| List your tokens | tokenList | token:read |
| Inspect one token | tokenGet | token:read |
| Revoke a token | tokenRevoke | token:delete |
| Rotate a token | tokenRotate | token:delete |
| Mint a token | tokenCreate | none |
| Revoke the calling token | tokenRevokeCurrent | none |
Scopes apply when the caller is itself an API token. The MCP api tool runs as
you, so it can list and revoke any of your tokens.
Revoke a token
List tokens and find the one to revoke by
name,scopes, orlast_used_at:{ "operationId": "tokenList" }Revoke it by
id(the part afterkody_at_and before_):{ "operationId": "tokenRevoke", "params": { "token_id": "<id>" } }
Revoking is how you delete a token. Revocation is immediate. Anything still
using the token gets 401 API token was revoked.
Where to call these
- MCP
apitool (preferred for connected agents): pass the JSON above. - CLI:
npx @kodycodes/cli api tokenListandnpx @kodycodes/cli api tokenRevoke --params '{"token_id":"<id>"}'afternpx @kodycodes/cli login(see Local CLI execute). - HTTPS:
GET /v1/tokensandDELETE /v1/tokens/{token_id}on api.kody.codes with a token that holdstoken:read/token:delete.
Token operations are not kody.* capabilities, so execute (hosted or
--local) cannot call them, and search lists this guide rather than a
capability.
Only search and execute in your tool list?
Kody's MCP server advertises search, execute, and api to every signed-in
account on every plan; nothing gates api by tier, scope, or client. If your
agent only sees search and execute, its MCP client has not picked up the
current tool list.
- ChatGPT: Kody's tool updates are not currently being picked up in ChatGPT,
so reconnecting does not add
api. Add Kody manually in developer mode (see Connect your agent), or use the Kody CLI:npx @kodycodes/cli api tokenListandnpx @kodycodes/cli api tokenRevoke --params '{"token_id":"<id>"}'. - Other clients: refresh the Kody server's tools (reconnect it, or restart
the client) and
apiappears. Until then, use the CLI commands above.