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

# Revoke an API key

> Revoke an API key. This cannot be undone. This API needs a CLI session signed in as a team member. Calling it with an API key returns a 403 error.

> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace’s subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](https://apidocs.neetoform.com/api/workspace-subdomain.md).


## OpenAPI

````yaml bundled/api-keys.yaml DELETE /api_keys/{id}
openapi: 3.0.3
info:
  title: NeetoForm API Keys APIs
  version: 2.0.0
servers:
  - description: NeetoForm APIs
    url: https://{your-subdomain}.neetoform.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
tags:
  - name: API Keys
    description: APIs to list and revoke the API keys of the workspace.
paths:
  /api_keys/{id}:
    delete:
      tags:
        - API Keys
      summary: Revoke an API key
      description: >-
        Revoke an API key. This cannot be undone. This API needs a CLI session
        signed in as a team member. Calling it with an API key returns a 403
        error.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - in: path
          name: id
          description: >-
            Unique ID of the API key. You can get it from the [List API
            keys](/api/api-keys/list) API.
          required: true
          schema:
            type: string
            example: 1c9e4a7b-5d2f-4b8a-9c3e-7f6a1b2d3e4f
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  notice:
                    type: string
                    example: The API key is successfully deleted.
        '403':
          description: Forbidden - The request was made with an API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
              example:
                error: >-
                  This action needs a CLI session signed in as a team member,
                  not an API key.
        '404':
          description: Not Found - API key does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
              example:
                error: NeetoApiKeysEngine::ApiKey does not exist.
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/api/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
  schemas:
    error_response:
      type: object
      properties:
        error:
          type: string

````

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