> ## 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.

# Revogar fonte

> Corta todas as chaves de uma fonte de uma vez, em todas as células.



## OpenAPI

````yaml openapi/pt/control.json POST /v1/sources/{source_id}/revoke
openapi: 3.1.0
info:
  title: API de controle da Niadra
  version: '1'
  description: >-
    Tenants, projetos, fontes, chaves, pessoas, configuração e uso. Nunca recebe
    conteúdo de cliente.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/sources/{source_id}/revoke:
    post:
      summary: Revogar fonte
      description: >-
        Corta um fornecedor ou sistema de uma vez: toda chave ativa da fonte é
        revogada, e a fonte sai da configuração enviada às células. As células
        aplicam o corte em segundos. Exige o papel admin ou security.


        **Autenticação.** Token de pessoa emitido pelo controle (`Authorization:
        Bearer <JWT>`), com o papel que a operação pede.
      operationId: revoke_source_v1_sources__source_id__revoke_post
      parameters:
        - in: path
          name: source_id
          required: true
          schema:
            format: uuid
            title: Source Id
            type: string
          example: 0192f0a0-5f60-7172-8d83-9e0f1a2b3c46
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeRequest'
            example:
              reason: Vendor contract ended
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevocationOut'
              example:
                kind: source
                seq: 4813
                space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
                source_id: 0192f0a0-5f60-7172-8d83-9e0f1a2b3c46
                key_id: null
                at: '2026-09-30T23:59:00Z'
          description: A revogação da fonte.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: O pedido não bate com o contrato.
      security:
        - personToken: []
components:
  schemas:
    RevokeRequest:
      additionalProperties: false
      properties:
        reason:
          maxLength: 1000
          minLength: 3
          title: Reason
          type: string
          description: O motivo, registrado na trilha de auditoria.
      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: >-
        Detalhes do problema no formato da RFC 9457; `code` vem do catálogo de
        erros versionado.
      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

````