> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Revoke Api Keys V1

> Revoke up to 50 keys in one call (admin only). Self-protection: the calling key is never auto-revoked even if included in the list…

> [!WARNING]
>
> **Confirm your deployment before running this request.** This page describes an API contract;
> a published reference does not establish hosted availability. Check the dated
> [host report](https://docs.stateset.com/api-reference/hosts.md) and obtain your deployment URL and credentials.
> Replace the example host if your provisioned service uses a different URL.

Revoke up to 50 keys in one call (admin only).

Self-protection: the calling key is never auto-revoked even if
included in the list. Use the singular `DELETE /keys/&#123;id&#125;` against
the same id from a different key if you really want it gone.

Per-row outcomes — unknown / cross-tenant ids surface as failures
without aborting the batch.

### Request body

`BulkRevokeKeysRequest`

**key\_ids** `string (uuid)[]` *required*

API key UUIDs to revoke (1..50). The calling key is NEVER auto-revoked — even if listed, it surfaces as `error: 'cannot revoke the calling key'`. Minimum items: `1`. Maximum items: `50`.

### Response

`BulkRevokeKeysResponse`

**revoked** `integer` *required*

**skipped** `integer` *required*

**rows** `BulkRevokeKeyRow[]` *required*

**BulkRevokeKeyRow**

**key\_id** `string` *required*

**revoked** `boolean` *required*

**error** `string,null`

### Status codes

| Code | Meaning |
| - | - |
| `200` | Successful Response |
| `422` | Validation Error |

### Using this contract

Read the [source OpenAPI document](https://docs.stateset.com/spec/computer-use.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

```bash cURL theme={null}
curl --silent --show-error --fail-with-body --request POST \
  --url 'https://api.computer.stateset.app/api/v1/keys/bulk-revoke' \
  --header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "key_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]
}'
```

```json 200 theme={null}
{
  "revoked": 1,
  "skipped": 1,
  "rows": [
    {
      "key_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "revoked": false,
      "error": "string"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.