# List reports

Returns reports available to the current API key, sorted by creation date (newest first). The response includes only report types the API key has access to. Supports cursor-based pagination.

Endpoint: POST /reports/list
Version: 2.0.0
Security: bearerAuth

## Request fields (application/json):

  - `report_type` (string)
    Filters results by report type. Omit to return all accessible report types.
    Enum: "INVOICES", "SUBSCRIPTIONS"

  - `pagination` (object)
    Pagination details.

  - `pagination.page_size` (integer, required)
    Number of items returned in this response.
    Example: 20

  - `pagination.next_page_token` (string)
    Token to retrieve the next page of results. It is empty on the last page.
    Example: "eyJMYXN0SUQiOiIxYTYyYjQ0Ni01ZDM0LTRiYTQtOGRlZS02NTM5NTU0NjY2MTQifQ=="

## Response 200 fields (application/json):

  - `items` (array, required)
    List of reports for the current page.
    Example: [{"id":"rprt_01K8F3ZQ8X9YBCDEFGHJKMNPQR","report_type":"INVOICES","status":"PROCESSING","created_at":"2024-01-01T00:00:00.000000Z"}]

  - `items.id` (string, required)
    Unique report identifier.
    Example: "rprt_01K8F3ZQ8X9YBCDEFGHJKMNPQR"

  - `items.report_type` (string, required)
    Report type.
    Enum: same as `report_type` (2 values)

  - `items.status` (string, required)
    Current report status.
    Enum: "PROCESSING", "SUCCEEDED", "FAILED", "EXPIRED"

  - `items.created_at` (string, required)
    Date and time when the report was created.
    Example: "2024-01-01T00:00:00.000000Z"

  - `pagination` (object, required)
    Pagination details.

  - `pagination.page_size` (integer, required)
    Number of items returned in this response.
    Example: 20

  - `pagination.next_page_token` (string)
    Token to retrieve the next page of results. It is empty on the last page.
    Example: "eyJMYXN0SUQiOiIxYTYyYjQ0Ni01ZDM0LTRiYTQtOGRlZS02NTM5NTU0NjY2MTQifQ=="

## Response 400 fields (application/json):

  - `code` (string, required)
    Code identifying the error type.
    Enum: "VALIDATION"

  - `message` (string, required)
    Message describing the error.
    Example: "One or more fields failed validation due to constraints"

  - `context` (object, required)
    Additional context about the validation error, including specific constraints.
    Example: {"constraints":{"email":{"type":"TYPE","message":"The 'email' field must be a valid email address"},"age":{"type":"MIN","message":"The 'age' field must be a number greater than or equal to 18"}}}

  - `context.constraints` (object, required)
    Failed constraints keyed by the field name.
    Example: {"email":{"type":"TYPE","message":"The 'email' field must be a valid email address"},"age":{"type":"MIN","message":"The 'age' field must be a number greater than or equal to 18"}}

## Response 401 fields (application/json):

  - `code` (string, required)
    Code identifying the error type.
    Enum: "UNAUTHENTICATED"

  - `message` (string, required)
    Message describing the error.
    Example: "Credentials are invalid or missing"

## Response 403 fields (application/json):

  - `code` (string, required)
    Code identifying the error type.
    Enum: "PERMISSION_DENIED"

  - `message` (string, required)
    Message describing the error.
    Example: "Permission denied"

## Response 429 fields (application/json):

  - `code` (string, required)
    Code identifying the error type.
    Enum: "RATE_LIMIT"

  - `message` (string, required)
    Message describing the error.
    Example: "Rate limit exhausted"

  - `context` (object)
    Additional context about the error.

  - `context.next_try_at` (string)
    Timestamp indicating when to retry the request.
    Example: "2024-12-31T23:59:59.000000Z"


