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

# Revoke API Key

> Revoke an API key



## OpenAPI

````yaml /api-reference/openapi.json post /v1/api-keys/{key_id}/revoke
openapi: 3.1.0
info:
  title: Verbex Platform API
  description: API for managing AI agents, calls, phone numbers, and more.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Knowledge Bases
    description: >-
      Create and manage knowledge bases, ingest documents into them, and search
      them semantically.


      **Authentication.** Every request carries a bearer token: `Authorization:
      Bearer <API_TOKEN>`. That is the only credential a client sends. The
      gateway resolves your identity from it and injects the tenant headers the
      service reads internally, so clients never send `x-user-org-id` or
      `x-verbex-id` themselves.


      **Tenancy is enforced on every route.** A knowledge base belongs to one
      organization and one user. Requesting one your token does not own returns
      `404 Knowledge base not found`, never `403`. This is deliberate: a
      nonexistent ID, a malformed ID and someone else's ID are indistinguishable
      in the response, so the API cannot be used to probe for other tenants'
      data. If you get a `404` on an ID you are certain exists, suspect the
      token before you suspect the ID.


      **Ingestion is asynchronous.** File upload and website crawl both answer
      `202` as soon as the material is stored and the job is queued. Parsing,
      chunking, embedding and indexing happen afterwards in a worker. Poll the
      document status endpoint until it reports `completed` before expecting
      search to see the content. That gap is the most common source of "why
      isn't my data showing up".


      **There is no document update endpoint.** Every submission mints a new
      `document_id`, so re-uploading a file or re-crawling the same URLs creates
      a second document while the first remains. To refresh material, delete
      then resubmit — and note that the sequence is not atomic.
paths:
  /v1/api-keys/{key_id}/revoke:
    post:
      tags:
        - API Keys
      summary: Revoke API Key
      description: Revoke an API key
      operationId: revoke_api_key_v1_api_keys__key_id__revoke_post
      parameters:
        - name: key_id
          in: path
          required: true
          schema:
            type: string
            title: Key Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIKeyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    APIKeyResponse:
      properties:
        _id:
          type: string
          title: Id
          description: Unique identifier for this API key in the database
        name:
          type: string
          title: Name
          description: The descriptive name given to this API key
        permissions:
          items:
            type: string
          type: array
          title: Permissions
          description: List of permission scopes granted to this API key
        expiration_date:
          type: string
          format: date-time
          title: Expiration Date
          description: Timestamp when this API key will expire and become invalid
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when this API key was created
        revoked:
          type: boolean
          title: Revoked
          description: >-
            Indicates if this API key has been manually revoked before its
            expiration date
          default: false
        created_by_user_id:
          type: string
          title: Created By User Id
          description: Identifier of the user who created this API key
      type: object
      required:
        - _id
        - name
        - permissions
        - expiration_date
        - created_at
        - created_by_user_id
      title: APIKeyResponse
      example:
        created_at: '2024-01-01T00:00:00'
        expiration_date: '2024-12-31T23:59:59'
        key_id: 507f1f77bcf86cd799439011
        name: Development API Key
        permissions:
          - read
          - write
        revoked: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````