---
title: "Revoke all unused API keys"
method: POST
path: "/revokeUnusedAgentApiKeys"
tags: ["Agent Wallet"]
---

# Revoke all unused API keys

`POST /revokeUnusedAgentApiKeys`

## Request

- Base URL: `https://laso.finance`
- URL: `https://laso.finance/revokeUnusedAgentApiKeys`
- Auth: API key in header `Authorization`

Revokes every live `lasoak_` API key on the account that no agent has used yet: never exchanged at `agentAuth` and never used to connect, the keys the dashboard lists as "Has not signed in yet". The same action as Revoke all on the dashboard. Keys any agent has used are left alone. A key you just issued and have not used yet counts as unused, so do not call this while a new agent is still setting up.

A Firebase callable. Callables wrap the request in `{"data": ...}` and the reply in `{"result": ...}`. Send the `id_token` from `/auth` as a Bearer token. Free.

## Request body

- object
  - `data` object, required
    - `userId` string, required: The Laso user id (the `usr_...` value from /auth).

## Response `200`

`revokedCount`: how many keys were revoked. Zero when there were none.

- object
  - `result` object

## Other responses

- `400`: A required field is missing or invalid.
- `401`: Missing, invalid, or expired Bearer token.

---

[API](https://skmtc.dev/laso/apis/laso-finance-x402-api.md) · [All operations](https://skmtc.dev/laso/apis/laso-finance-x402-api/llms.txt) · [OpenAPI document](https://skmtc.dev/laso/apis/laso-finance-x402-api/revisions/ff8ce20b49ba?raw)
