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

# List the changes of the tenant's Pix key

> Lists the changes of the Pix key of the tenant of the credentials you authenticate with, the most recent first, paginated: for each change, the key it set and the key it replaced, who made it and when, and how the key was checked against the holder of the collection account. Every write with POST /v1/admin/pix-config that changes the key is recorded, the tenant's first key included (`firstConfiguration: true`, with no previous key); a write that keeps the key and changes only the address is not a change. Each change is announced by a `PIX_KEY_CHANGED` notice whose `changeId` is its `id`.

A CPF, e-mail or phone key is shown masked, by its type; a CNPJ key and a random key are shown whole. The keys are kept with no automatic purge, so the history answers which key a boleto that carries a Pix QR code, issued at a given instant, paid into.

A tenant with no change is answered 200 with an empty `items` list and `total: 0`, never 404. A `page` below 1 or a `limit` outside 1 to 100 is refused with 400 PBP-0001.

WHO MAY CALL IT. The caller needs the `admin:read` permission, which the `editor`, `operator` and `viewer` roles carry. A caller without it is refused with 403 PBP-0004 before the operation runs.



## OpenAPI

````yaml /pt/openapi/v3-current/payments.yaml get /v1/admin/pix-config/history
openapi: 3.1.0
info:
  description: >-
    API for the Lerian Payments interface via BTG. It covers boleto issuance,
    cancellation, and queries; bill payments (bankslip, utilities, and DARF) and
    queries; aggregated boleto and payment dashboards; provider connection and
    outbound webhook configuration; and the provider webhook receiver for
    settlement events.


    ERROR BODIES. A failed request arrives as an RFC 9457 problem document on
    application/problem+json. Branch on the code member. A license refusal
    carries an LCS code, listed in the License Manager error list.
  title: Payments — via BTG API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security: []
tags:
  - description: >-
      Tenant-level setup: connecting the banking provider and configuring where
      status notifications are delivered.
    name: Admin
  - description: Issuing, querying and cancelling boletos, and retrieving the rendered PDF.
    name: Boletos
  - description: >-
      Aggregated counts, amounts and breakdowns over a period, for boletos and
      for payments.
    name: Dashboards
  - description: >-
      Paying bankslips, utility bills and DARF tax slips, and querying those
      payments.
    name: Payments
  - description: >-
      The webhook the payment provider posts settlement events to. Authenticated
      with a credential agreed with the provider, not with the platform identity
      used by the rest of this API.
    name: Settlement
paths:
  /v1/admin/pix-config/history:
    get:
      tags:
        - Admin
      summary: List the changes of the tenant's Pix key
      description: >-
        Lists the changes of the Pix key of the tenant of the credentials you
        authenticate with, the most recent first, paginated: for each change,
        the key it set and the key it replaced, who made it and when, and how
        the key was checked against the holder of the collection account. Every
        write with POST /v1/admin/pix-config that changes the key is recorded,
        the tenant's first key included (`firstConfiguration: true`, with no
        previous key); a write that keeps the key and changes only the address
        is not a change. Each change is announced by a `PIX_KEY_CHANGED` notice
        whose `changeId` is its `id`.


        A CPF, e-mail or phone key is shown masked, by its type; a CNPJ key and
        a random key are shown whole. The keys are kept with no automatic purge,
        so the history answers which key a boleto that carries a Pix QR code,
        issued at a given instant, paid into.


        A tenant with no change is answered 200 with an empty `items` list and
        `total: 0`, never 404. A `page` below 1 or a `limit` outside 1 to 100 is
        refused with 400 PBP-0001.


        WHO MAY CALL IT. The caller needs the `admin:read` permission, which the
        `editor`, `operator` and `viewer` roles carry. A caller without it is
        refused with 403 PBP-0004 before the operation runs.
      operationId: listAdminPixKeyHistory
      parameters:
        - description: >-
            Tenant organization ID. Optional. The organization context is
            determined by the credentials you authenticate with; this header
            does not select or change it.
          in: header
          name: X-Organization-Id
          schema:
            description: >-
              Tenant organization ID. Optional. The organization context is
              determined by the credentials you authenticate with; this header
              does not select or change it.
            type: string
        - description: Page number, one-based.
          explode: false
          in: query
          name: page
          schema:
            default: 1
            description: Page number, one-based.
            examples:
              - 1
            format: int64
            minimum: 1
            type: integer
        - description: Changes per page.
          explode: false
          in: query
          name: limit
          schema:
            default: 20
            description: Changes per page.
            examples:
              - 20
            format: int64
            maximum: 100
            minimum: 1
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPixKeyHistoryResponse'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Authentication failed: the request carries no valid credential, or
            the credential does not identify a tenant. The error body is an RFC
            9457 problem document (`application/problem+json`) with error code
            `PBP-0003`. Obtain a valid bearer token and send the request again.
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            The authenticated principal is not allowed to perform this request.
            The error body is an RFC 9457 problem document
            (`application/problem+json`) with error code `PBP-0004`: the
            principal lacks permission for this operation, and the permission
            has to be granted before the request can succeed.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Service Unavailable. PBP-0008 means a dependency the request needs,
            authentication or the tenant's storage, is temporarily unavailable.
            The request was not processed; wait and send it again.
      security:
        - BearerAuth: []
components:
  schemas:
    ListPixKeyHistoryResponse:
      additionalProperties: false
      properties:
        items:
          description: >-
            Changes of the page, the most recent first. A tenant with no change
            answers an empty list.
          items:
            $ref: '#/components/schemas/PixKeyHistoryItem'
          type:
            - array
            - 'null'
        limit:
          description: Changes per page.
          examples:
            - 20
          format: int64
          type: integer
        page:
          description: Page number, one-based.
          examples:
            - 1
          format: int64
          type: integer
        total:
          description: >-
            Number of changes of the tenant's Pix key. A page past the last
            change answers an empty items list and 0.
          examples:
            - 3
          format: int64
          type: integer
      required:
        - items
        - page
        - limit
        - total
      type: object
    Detail:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    PixKeyHistoryItem:
      additionalProperties: false
      properties:
        changedAt:
          description: >-
            When the change was made, in UTC: the updatedAt POST
            /v1/admin/pix-config recorded for it.
          examples:
            - '2026-10-31T14:05:09Z'
          format: date-time
          type: string
        changedBy:
          description: >-
            Identifier of the authenticated principal that made the change: the
            subject of its access token.
          type: string
        firstConfiguration:
          description: >-
            True when the change was the tenant's first key: there was no key
            before it.
          type: boolean
        holderCheck:
          description: >-
            How the key the change set was held to the holder of the collection
            account. VERIFIED: a CPF or CNPJ key checked against the document of
            that account's holder. UNVERIFIED: a CPF or CNPJ key written without
            that check. NOT_VERIFIABLE: a random, e-mail or phone key, whose
            owner no record tells.
          enum:
            - VERIFIED
            - UNVERIFIED
            - NOT_VERIFIABLE
          examples:
            - VERIFIED
          type: string
        id:
          description: >-
            Identifier of the change. It is the changeId of the PIX_KEY_CHANGED
            notice that announced it.
          examples:
            - 019a3b8e-6f1c-7d2e-8a4b-5c6d7e8f9a01
          format: uuid
          type: string
        key:
          description: >-
            The key the change set, masked by its type: a CPF key shows its
            middle six digits (***.456.789-**), an e-mail key its first
            character and its domain (j***@example.com), and a phone key its
            country code and its last four digits (+55*******1234). A CNPJ key
            and a random key are shown whole. A key of type UNKNOWN is shown as
            ***.
          examples:
            - '***.456.789-**'
          type: string
        keyType:
          description: >-
            Type of the key the change set. EVP is a random key; UNKNOWN is a
            key in none of the Pix key formats.
          enum:
            - CPF
            - CNPJ
            - EMAIL
            - PHONE
            - EVP
            - UNKNOWN
          examples:
            - CPF
          type: string
        previousKey:
          description: >-
            The key the change replaced, masked as key is. Omitted on the
            tenant's first configuration, when there was no key.
          examples:
            - f34f8ec2-a4b7-41b4-8200-b53a07e00bac
          type: string
        previousKeyType:
          description: >-
            Type of the key the change replaced. Omitted on the tenant's first
            configuration, when there was no key.
          enum:
            - CPF
            - CNPJ
            - EMAIL
            - PHONE
            - EVP
            - UNKNOWN
          examples:
            - EVP
          type: string
      required:
        - id
        - changedAt
        - changedBy
        - keyType
        - key
        - firstConfiguration
        - holderCheck
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.