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

# Revoke a key

> Cuts access for one key on every cell.



## OpenAPI

````yaml openapi/en/control.json POST /v1/sources/{source_id}/keys/{key_id}/revoke
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/sources/{source_id}/keys/{key_id}/revoke:
    post:
      summary: Revoke a key
      description: >-
        Cuts one key at once. The revocation enters the signed feed the cells
        apply within seconds, and the SDK drops the context it cached for that
        key on the next 401 or 403. Needs the admin or security role.


        **Authentication.** Person token issued by the control plane
        (`Authorization: Bearer <JWT>`), with the role the operation needs.
      operationId: revoke_key_v1_sources__source_id__keys__key_id__revoke_post
      parameters:
        - in: path
          name: source_id
          required: true
          schema:
            format: uuid
            title: Source Id
            type: string
          example: 0192f0a0-5f60-7172-8d83-9e0f1a2b3c45
        - in: path
          name: key_id
          required: true
          schema:
            title: Key Id
            type: string
          example: k7Q2mX9a
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeRequest'
            example:
              reason: Key exposed in a vendor log
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevocationOut'
              example:
                kind: key
                seq: 4812
                space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
                source_id: 0192f0a0-5f60-7172-8d83-9e0f1a2b3c45
                key_id: k7Q2mX9a
                at: '2026-09-22T18:00:00Z'
          description: The revocation, with its position in the revocation feed.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - personToken: []
components:
  schemas:
    RevokeRequest:
      additionalProperties: false
      properties:
        reason:
          maxLength: 1000
          minLength: 3
          title: Reason
          type: string
          description: Why, recorded in the audit trail.
      required:
        - reason
      title: RevokeRequest
      type: object
    RevocationOut:
      additionalProperties: false
      properties:
        at:
          format: date-time
          title: At
          type: string
        key_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Key Id
        kind:
          title: Kind
          type: string
        seq:
          title: Seq
          type: integer
        source_id:
          format: uuid
          title: Source Id
          type: string
        space_id:
          format: uuid
          title: Space Id
          type: string
      required:
        - seq
        - space_id
        - kind
        - source_id
        - key_id
        - at
      title: RevocationOut
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
  securitySchemes:
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````