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

# Revoke a credential (LOCAL-only soft-delete)

> Soft-deletes the credential by setting status=revoked. The
revoke is LOCAL only — BACEN is never contacted. The row is
retained for audit history but hidden from list/get and is
no longer updatable; the freed institution code can be
re-created. Emits credential.revoked via audit_outbox in
one tx.



## OpenAPI

````yaml en/openapi/v3-current/sta.yaml delete /v1/credentials/{id}
openapi: 3.0.3
info:
  title: Lerian STA API
  description: >-
    API for Lerian STA — the participant-side rail that connects the institution
    to Banco Central do Brasil's STA (Sistema de Transferencia de Arquivos)
    file-exchange system. It covers outbound and inbound file transfers, BACEN
    credential management, inbound source polling configuration, and the tenant
    trust-store for message-signing certificates.
  version: v1.0.0
servers:
  - url: https://sta.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - name: transfers
    description: >-
      Outbound and inbound STA file transfers — creation, listing, read,
      cancellation, retry, and urgent-processing marking.
  - name: trust-store
    description: >-
      Tenant trust-store X.509 certificate lifecycle: listing, upload, deletion,
      and status summary.
  - name: credentials
    description: >-
      BACEN STA credential management: creation, read, update, rotation,
      revocation, and connectivity testing.
  - name: inbound-source-configs
    description: >-
      Inbound source polling configuration: creation, read, update, deletion,
      manual poll triggering, and discovery reserve usage.
  - name: health
    description: Service health and readiness reporting.
paths:
  /v1/credentials/{id}:
    delete:
      tags:
        - credentials
      summary: Revoke a credential (LOCAL-only soft-delete)
      description: |-
        Soft-deletes the credential by setting status=revoked. The
        revoke is LOCAL only — BACEN is never contacted. The row is
        retained for audit history but hidden from list/get and is
        no longer updatable; the freed institution code can be
        re-created. Emits credential.revoked via audit_outbox in
        one tx.
      parameters:
        - description: Credential UUID
          in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
components:
  securitySchemes:
    BearerAuth:
      description: 'Bearer token authentication (format: "Bearer {token}")'
      in: header
      name: Authorization
      type: apiKey

````