# Revoke a client API key (/docs/api-reference/reseller-clients/revokeChildApiKey)

> Revoke one of a client user's API keys. The key stops working on the next request. Pass the key's api_key_id, or 0 for the default key every account gets at signup. Revoking a key that is already revoked succeeds. GET /reseller/organizations lists each user's active keys by id and name.

> **Reseller accounts only.** [Request access](https://omnidim.io/contact-us?reason=reseller_api&lock=1).

**POST** `/reseller/users/api-keys/revoke`

Revoke one of a client user's API keys. The key stops working on the
next request. Pass the key's `api_key_id`, or `0` for the
default key every account gets at signup. Revoking a key that is
already revoked succeeds. `GET /reseller/organizations` lists each
user's active keys by `id` and `name`.

```yaml
operationId: revokeChildApiKey
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        required:
          - user_id
          - api_key_id
        properties:
          user_id:
            type: integer
            description: ID of the client user who owns the key.
          api_key_id:
            type: integer
            minimum: 0
            description: The key's ID, or `0` for the default key the account got at signup.
      example:
        user_id: 1234
        api_key_id: 88
responses:
  '200':
    description: Key revoked.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            revoked:
              type: boolean
            api_key_id:
              type: integer
          example:
            success: true
            revoked: true
            api_key_id: 88
  '400':
    description: '`api_key_id` is not a whole number. Pass a key ID, or `0` for the default key.'
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
  '403':
    description: Your key is not a reseller owner or admin key.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
  '404':
    description: The user is not in one of your client organizations, or the key does not belong to that user.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
```

**cURL**

```shell
curl -X POST https://omnidim.io/api/v1/reseller/users/api-keys/revoke \
  -H "Authorization: Bearer $OMNIDIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id": 1234, "api_key_id": 88}'
```

**curl**

```bash
curl -X POST "https://backend.omnidim.io/api/v1/reseller/users/api-keys/revoke" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "user_id": 1234,
  "api_key_id": 88
}'
```