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

# Revoke API key

> Permanently revoke an API key; anything using it stops working at once. Run with dryRun first to see which key it is and whether it is the one making this call. Owner only.



## OpenAPI

````yaml /api-reference/actions/openapi.json post /api/v1/agents/actions/tokens_revoke
openapi: 3.1.0
info:
  title: CustomerGPT Agent API
  version: 1.0.0
servers:
  - url: https://api.customergpt.ai
security: []
tags:
  - name: Chatbots
  - name: Knowledge
  - name: Custom responses
  - name: Conversations
  - name: Analytics and account
  - name: API keys and team
  - name: Onboarding
paths:
  /api/v1/agents/actions/tokens_revoke:
    post:
      tags:
        - API keys and team
      summary: Revoke API key
      description: >-
        Permanently revoke an API key; anything using it stops working at once.
        Run with dryRun first to see which key it is and whether it is the one
        making this call. Owner only.
      operationId: tokens_revoke
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                tokenId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
                dryRun:
                  default: false
                  type: boolean
                confirm:
                  default: false
                  type: boolean
              required:
                - tokenId
              additionalProperties: false
      responses:
        '200':
          description: Result in {ok:true,data:...}
        '400':
          description: Invalid arguments
        '401':
          description: Authentication required
        '403':
          description: Confirmation required
      security:
        - apiKey: []
        - oauth:
            - agents:write
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
    oauth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.customergpt.ai/authorize
          tokenUrl: https://api.customergpt.ai/token
          scopes:
            agents:read: Read workspace data
            agents:write: Change workspace data

````

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