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

# Listar runs

> Retorna lista paginada de runs do tenant, do mais recente para o mais antigo.



## OpenAPI

````yaml GET /api/v1/bureau/runs
openapi: 3.0.3
info:
  title: kycert API
  version: '2026-06-03'
  description: >
    API KYC/AML para corretoras de câmbio autorizadas pelo Banco Central do
    Brasil.

    Permite rodar verificações de bureau em CPF ou CNPJ e receber o resultado
    via webhook.


    **Fluxo principal:**

    ```

    POST /runs → 202 (run_id) → [bureau processa 5–30s] → webhook entregue →
    agir

    ```
  contact:
    name: kycert
    url: https://kycert.com.br
  license:
    name: Proprietário
    url: https://kycert.com.br
servers:
  - url: https://admin.kycert.com.br
    description: Produção (sk_live_...)
  - url: https://admin.kycert.com.br
    description: Sandbox (sk_test_...)
security:
  - ApiKeyHeader: []
  - BearerToken: []
tags:
  - name: Runs
    description: Execução de bureau para CPF ou CNPJ
  - name: Customers
    description: Gestão de clientes do tenant
paths:
  /api/v1/bureau/runs:
    get:
      tags:
        - Runs
      summary: Listar runs
      description: >-
        Retorna lista paginada de runs do tenant, do mais recente para o mais
        antigo.
      operationId: listRuns
      parameters:
        - name: template_id
          in: query
          schema:
            type: string
            format: uuid
          description: Filtrar por template
        - name: status
          in: query
          schema:
            type: string
            enum:
              - queued
              - pending
              - running
              - completed
              - blocked
              - pending_review
              - partial
              - failed
          description: Filtrar por status
        - name: external_id
          in: query
          schema:
            type: string
          description: Filtrar pelo seu identificador interno
        - name: created_after
          in: query
          schema:
            type: string
            format: date-time
          description: Retornar apenas runs criados após esta data (ISO 8601)
        - name: created_before
          in: query
          schema:
            type: string
            format: date-time
          description: Retornar apenas runs criados antes desta data (ISO 8601)
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Número máximo de runs por página
        - name: cursor
          in: query
          schema:
            type: string
          description: Cursor de paginação retornado em next_cursor da página anterior
        - name: x-kycert-api-version
          in: header
          required: false
          schema:
            type: string
            example: '2026-06-03'
      responses:
        '200':
          description: Lista de runs
          headers:
            X-Request-Id:
              schema:
                type: string
                format: uuid
            X-Kycert-Api-Version:
              schema:
                type: string
            X-RateLimit-Limit:
              schema:
                type: integer
            X-RateLimit-Remaining:
              schema:
                type: integer
            X-RateLimit-Reset:
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunList'
              example:
                data:
                  - run_id: 550e8400-e29b-41d4-a716-446655440000
                    template_id: 661e9511-f3ac-52e5-b827-557766551111
                    status: completed
                    decision: approved
                    risk_band: baixo
                    subject_type: pf
                    external_id: cust_abc123
                    metadata:
                      channel: app_mobile
                    created_at: '2026-06-12T14:00:00Z'
                    completed_at: '2026-06-12T14:00:18Z'
                has_more: false
                livemode: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    RunList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RunSummary'
        has_more:
          type: boolean
        next_cursor:
          type: string
          nullable: true
          description: >-
            Cursor para buscar a próxima página (presente apenas quando
            has_more=true)
        livemode:
          type: boolean
    RunSummary:
      type: object
      properties:
        run_id:
          type: string
          format: uuid
        template_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - queued
            - pending
            - running
            - completed
            - blocked
            - pending_review
            - partial
            - failed
        decision:
          type: string
          nullable: true
          enum:
            - approved
            - rejected
            - review
        risk_band:
          type: string
          nullable: true
          enum:
            - baixo
            - medio
            - alto
        subject_type:
          type: string
          enum:
            - pf
            - pj
        external_id:
          type: string
          nullable: true
        metadata:
          type: object
          nullable: true
        created_at:
          type: string
          format: date-time
        completed_at:
          type: string
          nullable: true
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - authorization_error
                - billing_error
                - server_error
            code:
              type: string
              description: Código específico do erro
            message:
              type: string
              description: Descrição legível do erro
            param:
              type: string
              nullable: true
              description: Campo que causou o erro (quando aplicável)
  responses:
    Unauthorized:
      description: API key ausente ou inválida
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_api_key:
              value:
                error:
                  type: authentication_error
                  code: missing_api_key
                  message: API key ausente.
                  param: null
            invalid_api_key:
              value:
                error:
                  type: authentication_error
                  code: invalid_api_key
                  message: API key inválida ou inativa.
                  param: null
    Forbidden:
      description: Escopo insuficiente para esta operação
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: authorization_error
              code: insufficient_scope
              message: Esta chave não tem permissão para criar runs.
              param: null
    InternalError:
      description: Falha interna — tente novamente com backoff exponencial
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              type: server_error
              code: internal_error
              message: Erro interno. Tente novamente.
              param: null
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: API key no header x-api-key (recomendado)
    BearerToken:
      type: http
      scheme: bearer
      description: API key como Bearer token no header Authorization

````