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

# Revoke an API key

> Revokes one API key, named by its `id` rather than by the `key_id` you send in `X-Tenant-Key`. Its `status` becomes `revoked` and gateway requests signed with it stop authenticating; revoking cannot be undone, so a key you still need is replaced rather than restored. Create the replacement first and cut over to it, then revoke, and your integration keeps working throughout. A revoke that lands returns 200 with the envelope's own `success` and no `data`. Returns 404 when no key with that id belongs to your tenant, and 403 when your account may not manage keys for this tenant.



## OpenAPI

````yaml /openapi/kintra-app.json delete /tenant/{tenantId}/api-keys/{id}
openapi: 3.0.0
info:
  description: >-
    Tenant portal API for the Kintra loyalty platform. Requests are
    authenticated with an Auth0 bearer token and address a tenant by id in the
    path.
  title: Kintra Portal API
  version: 1.0.0
servers:
  - description: Production environment
    url: https://api.kintra.io/api/v1
security: []
paths:
  /tenant/{tenantId}/api-keys/{id}:
    delete:
      tags:
        - API keys
      summary: Revoke an API key
      description: >-
        Revokes one API key, named by its `id` rather than by the `key_id` you
        send in `X-Tenant-Key`. Its `status` becomes `revoked` and gateway
        requests signed with it stop authenticating; revoking cannot be undone,
        so a key you still need is replaced rather than restored. Create the
        replacement first and cut over to it, then revoke, and your integration
        keeps working throughout. A revoke that lands returns 200 with the
        envelope's own `success` and no `data`. Returns 404 when no key with
        that id belongs to your tenant, and 403 when your account may not manage
        keys for this tenant.
      operationId: TenantRevokeApiKey
      parameters:
        - in: path
          name: tenantId
          required: true
          schema:
            type: string
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: ''
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Tenant or API key not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_null_'
          description: Internal server error
      security:
        - auth0_jwt: []
components:
  schemas:
    ApiResponse_null_:
      additionalProperties: false
      properties:
        data:
          enum:
            - null
          nullable: true
          type: number
        errors:
          items:
            properties:
              message:
                type: string
              path:
                type: string
            required:
              - path
              - message
            type: object
          type: array
        message:
          type: string
        success:
          type: boolean
      required:
        - success
      type: object
  securitySchemes:
    auth0_jwt:
      bearerFormat: JWT
      description: Auth0 access token
      scheme: bearer
      type: http

````