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

# Revoke an API key

> Revokes an API key, making it unusable for authentication



## OpenAPI

````yaml /api-reference/openapi.json post /projects/{projectId}/api-keys/{id}/revoke
openapi: 3.0.0
info:
  title: EngageFabric API
  description: >-
    EngageFabric is a multi-tenant SaaS gamification framework. This API
    provides endpoints for managing players, tracking events, quests,
    adventures, leaderboards, lobbies, and real-time features.
  version: 1.0.0
  contact:
    name: EngageFabric Support
    url: https://engagefabric.com
    email: support@engagefabric.com
  license:
    name: Proprietary
    url: https://engagefabric.com/terms
servers:
  - url: https://api.engagefabric.com
    description: Production
  - url: http://localhost:3000
    description: Development
security: []
tags:
  - name: auth
    description: Authentication endpoints
  - name: tenants
    description: Tenant management
  - name: projects
    description: Project management
  - name: players
    description: Player management and game state
  - name: events
    description: Event ingestion and tracking
  - name: quests
    description: Quest management and progress
  - name: adventures
    description: Adventure/season management
  - name: leaderboards
    description: Leaderboard rankings
  - name: lobbies
    description: Multiplayer lobby management
  - name: chat
    description: Real-time chat
  - name: rules
    description: Rules engine configuration
paths:
  /projects/{projectId}/api-keys/{id}/revoke:
    post:
      tags:
        - projects
      summary: Revoke an API key
      description: Revokes an API key, making it unusable for authentication
      operationId: ProjectController_revokeApiKey
      parameters:
        - name: projectId
          required: true
          in: path
          description: Project UUID
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: API Key UUID
          schema:
            type: string
      responses:
        '200':
          description: API key revoked successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyEntity'
        '404':
          description: API key not found
      security:
        - JWT: []
components:
  schemas:
    ApiKeyEntity:
      type: object
      properties:
        id:
          type: string
          description: Unique API key identifier
          example: 123e4567-e89b-12d3-a456-426614174000
        projectId:
          type: string
          description: Project ID this key belongs to
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          description: API key name/description
          example: Production Mobile App Key
        prefix:
          type: string
          description: API key prefix (for identification)
          example: pp_live_
        scopes:
          description: API key scopes/permissions
          example:
            - events:write
            - players:read
            - players:write
          type: array
          items:
            type: string
        status:
          type: string
          description: API key status
          enum:
            - ACTIVE
            - REVOKED
            - EXPIRED
          example: ACTIVE
        rateLimit:
          type: object
          description: Custom rate limit (requests per minute)
          example: 1000
        expiresAt:
          type: object
          description: API key expiration date
          example: '2026-12-31T23:59:59Z'
        lastUsedAt:
          type: object
          description: Last time this key was used
          example: '2025-01-15T10:30:00Z'
        metadata:
          type: object
          description: Additional metadata
          example:
            createdBy: admin@example.com
        createdAt:
          format: date-time
          type: string
          description: Creation timestamp
          example: '2025-01-15T10:30:00Z'
        updatedAt:
          format: date-time
          type: string
          description: Last update timestamp
          example: '2025-01-15T10:30:00Z'
        deletedAt:
          type: object
          description: Soft deletion timestamp
          example: null
      required:
        - id
        - projectId
        - name
        - prefix
        - scopes
        - status
        - createdAt
        - updatedAt
  securitySchemes:
    JWT:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: JWT token for admin console authentication

````