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

# Retrieve Key Statistics

> Use this endpoint to fetch usage and risk statistics for a specific Pix
key.


**Notes:**

- Returns both key-level statistics and owner-level statistics in a
single response.

- Key statistics track data specific to the Pix key as an entity
independent of its current owner.

- Owner statistics provide the same data as the person statistics
endpoint for the key's current owner.

- This endpoint queries the provider directly and does not store data
locally.

- Use this information for comprehensive risk assessment when processing
payments to a Pix key.



## OpenAPI

````yaml /en/openapi/v3-current/indirect-pix.yaml get /v1/dict/statistics/keys/{key}
openapi: 3.0.3
info:
  title: Plugin BR Pix Indirect - Complete API
  description: |
    Complete API for Brazilian Pix instant payment system including
    Pix key dictionary operations, QR code generation/decoding, transactions and
    transaction limits.
  version: 1.0.0
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/dict/statistics/keys/{key}:
    get:
      tags:
        - MED API
      summary: Retrieve Key Statistics
      description: |-
        Use this endpoint to fetch usage and risk statistics for a specific Pix
        key.


        **Notes:**

        - Returns both key-level statistics and owner-level statistics in a
        single response.

        - Key statistics track data specific to the Pix key as an entity
        independent of its current owner.

        - Owner statistics provide the same data as the person statistics
        endpoint for the key's current owner.

        - This endpoint queries the provider directly and does not store data
        locally.

        - Use this information for comprehensive risk assessment when processing
        payments to a Pix key.
      parameters:
        - $ref: '#/components/parameters/KeyPath'
      responses:
        '200':
          description: Key statistics retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyStatisticsOutput'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0001:
                  $ref: '#/components/examples/ErrorPIX0001'
                ErrorPIX0008:
                  $ref: '#/components/examples/ErrorPIX0008'
                ErrorPIX0280:
                  $ref: '#/components/examples/ErrorPIX0280'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX1091:
                  $ref: '#/components/examples/ErrorPIX1091'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0000:
                  $ref: '#/components/examples/ErrorPIX0000'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX1000:
                  $ref: '#/components/examples/ErrorPIX1000'
                ErrorPIX1007:
                  $ref: '#/components/examples/ErrorPIX1007'
                ErrorPIX1099:
                  $ref: '#/components/examples/ErrorPIX1099'
      deprecated: false
      security:
        - bearerAuth: []
components:
  parameters:
    KeyPath:
      name: key
      in: path
      description: Pix key value (CPF, CNPJ, Email, Phone, or EVP).
      required: true
      example: john.doe@example.com
      schema:
        type: string
  schemas:
    KeyStatisticsOutput:
      type: object
      properties:
        keyStatistics:
          type: object
          description: Statistics specific to the Pix key.
        ownerStatistics:
          type: object
          description: Statistics for the key owner.
    ErrorFormat:
      type: object
      description: The response message error.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
  examples:
    ErrorPIX0001:
      summary: Missing Headers in Request
      value:
        code: PIX-0001
        title: Missing Headers in Request
        message: >-
          Your request is missing one or more required header params. Please
          refer to the documentation to ensure all necessary header params are
          included in your request.
    ErrorPIX0008:
      summary: Invalid Path Parameter in Request
      value:
        code: PIX-0008
        title: Invalid Path Parameter in Request
        message: >-
          One or more path parameters are invalid. Please refer to the
          documentation to verify the expected format and allowed values for
          each path parameter.
    ErrorPIX0280:
      summary: Invalid Key Value
      value:
        code: PIX-0280
        title: Invalid Key Value
        message: >-
          The key value is invalid or exceeds the maximum length of 77
          characters.
    ErrorPIX1091:
      summary: Key Statistics Not Found
      value:
        code: PIX-1091
        title: Key Statistics Not Found
        message: >-
          The provider reports that no statistics were found for the specified
          Pix key.
    ErrorPIX0000:
      summary: Internal Server Error
      value:
        code: PIX-0000
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
    ErrorPIX1000:
      summary: Provider Connection Error
      value:
        code: PIX-1000
        title: Provider Connection Error
        message: Failed to connect to provider.
    ErrorPIX1007:
      summary: Provider Internal Error
      value:
        code: PIX-1007
        title: Provider Internal Error
        message: Provider returned an internal error.
    ErrorPIX1099:
      summary: Provider Unmapped Error
      value:
        code: PIX-1099
        title: Provider Unmapped Error
        message: Provider returned an unmapped error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````