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

# management.keys.revoke

> Requires keys:write. Changing routing also requires routing:write. Budgets are integer USD cents. Responses are not cacheable. Keys/secrets are shown only at creation/rotation. Mutations do not support automatic retries: read current resource state after an ambiguous failure. Standard limits: 120 reads/minute and 30 writes/minute per account.



## OpenAPI

````yaml /openapi.json delete /management/keys/{id}
openapi: 3.1.0
info:
  title: NinjaChat API
  version: 1.0.0
  description: >-
    Clean-break NinjaChat v1. Chat and Responses bill actual token usage; images
    and videos use catalog unit pricing.
servers:
  - url: https://www.ninjachat.ai/api/v1
security: []
paths:
  /management/keys/{id}:
    delete:
      summary: management.keys.revoke
      description: >-
        Requires keys:write. Changing routing also requires routing:write.
        Budgets are integer USD cents. Responses are not cacheable. Keys/secrets
        are shown only at creation/rotation. Mutations do not support automatic
        retries: read current resource state after an ambiguous failure.
        Standard limits: 120 reads/minute and 30 writes/minute per account.
      parameters:
        - schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
          required: true
          name: id
          in: path
      responses:
        '200':
          description: >-
            Management operation result. Lists use a data array;
            key/project/audit lists include next_cursor (null at end). Key
            create/rotate returns key once plus data metadata. X-Audit-Status:
            pending means the operation succeeded but its completion audit
            append needs investigation using X-Request-ID.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Invalid or unsupported request parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient balance or project spend limit reached.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Management scope is missing, or the account is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource does not exist in this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Resource quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Gateway error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - managementKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
            param:
              type:
                - string
                - 'null'
          required:
            - message
            - type
            - code
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    managementKey:
      type: http
      scheme: bearer
      bearerFormat: nj_mk_...
      description: >-
        Account-scoped management credential created by the account owner after
        email verification. Inference keys cannot access these endpoints;
        management keys cannot run inference.

````