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

# Revoke an API key

> Revokes a key. It stops working immediately and stays in the list with `enabled: false`.

You can revoke your own keys. To revoke a key someone else created, you must be an Owner or Admin.

**Required permission:** `api-keys:write`




## OpenAPI

````yaml /api-reference/openapi.yaml delete /api/v1/api-keys/{id}
openapi: 3.1.0
info:
  title: Igris Management API
  version: '1'
  description: >-
    REST API for managing Igris connections, policies, sessions, audit events
    and alerts.
servers:
  - url: https://api.igrisecurity.com
security:
  - bearerAuth: []
tags:
  - name: Connections
  - name: Policies
  - name: Sessions
  - name: Audit Events
  - name: Incidents
  - name: Webhooks
  - name: API Keys
  - name: Members
  - name: LLM Providers
  - name: LLM Cost
  - name: Observe
paths:
  /api/v1/api-keys/{id}:
    delete:
      tags:
        - API Keys
      summary: Revoke an API key
      description: >
        Revokes a key. It stops working immediately and stays in the list with
        `enabled: false`.


        You can revoke your own keys. To revoke a key someone else created, you
        must be an Owner or Admin.


        **Required permission:** `api-keys:write`
      operationId: revokeApiKey
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deleted'
              example:
                data:
                  deleted: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Missing permission, or the key belongs to someone else and you are
            not an Owner or Admin.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Forbidden
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Deleted:
      type: object
      properties:
        data:
          type: object
          properties:
            deleted:
              type: boolean
              const: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: No valid session or API key, or the key's creator is no longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    NotFound:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ig_...
      description: >-
        An Igris API key. It acts with the current role and permission overrides
        of the member who created it.

````

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