---
title: "List your account API request logs"
method: GET
path: "/accounts/{account}/request-logs"
tags: ["Account"]
---

# List your account API request logs

`GET /accounts/{account}/request-logs`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/accounts/{account}/request-logs`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

List the requests made with ANY API key of your account, newest first, in the credential’s environment.
- Filters: `method`, `status_range`, `only_errors`, `api_key_prefix`, `path_search`, `created_at[gte|lte]`; cursor is `starting_after`.
- Rows are purged after 30 days. Needs a credential reaching every tax ID, issued by an owner or admin.

## Path parameters

- `account` string, uuid, required

## Query parameters

- `method[]` string[]
- `status_range[]` string[]
- `only_errors` boolean
- `api_key_prefix` string
- `path_search` string
- `created_at[gte]` string, date-time
- `created_at[lte]` string, date-time
- `relationship` 'own' | 'client'
- `company` string, uuid
- `limit` integer
- `starting_after` string

## Headers

- `Factuarea-Version` string, date

## Response `200`

`ApiRequestLogListV1Resource`

- object: Cursor-paginated page of request logs (`{ data, has_more, next_cursor }`), most recent first.
  - `data` object[], required: Page of request logs, newest first.
    - `request_id` string, required: Opaque identifier of the request (`req_` + ULID), the same value returned in the `X-Request-Id` response header of that call. It is the identity of this resource — quote it in support requests and use it in `GET /v1/companies/{company}/request-logs/{request_id}`. Deliberately NOT a UUID v7: request logs are ephemeral rows, not domain resources.
    - `object` 'api_request_log', required: Always `api_request_log`.
    - `api_key_prefix` string, nullable, required: First 8 characters of the identifier of the API key that authenticated the request — enough to attribute the call to one of your keys without exposing the full identifier. `null` when the request was not authenticated. The plaintext secret is never involved.
    - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', required: HTTP method of the request.
    - `path` string, required: Request path, without the query string (which is never stored).
    - `status_code` integer, required: HTTP status code of the response.
    - `duration_ms` integer, required: Server-side processing time in milliseconds.
    - `ip` string, required: Source IP address of the request.
    - `user_agent` string, nullable, required: `User-Agent` header sent by the client, or `null` when absent.
    - `error_type` string, nullable, required: Error family of the response envelope (e.g. `invalid_request_error`, `not_found_error`). `null` for 2xx and 3xx responses.
    - `error_code` string, nullable, required: Machine-readable error code of the response envelope (e.g. `invalid_param_value`, `resource_not_found`). `null` for 2xx and 3xx responses.
    - `factuarea_version` string, nullable, required: API version (date-based) the request was resolved under, as reported in the `Factuarea-Version` response header. `null` for requests logged before versions were sealed.
    - `environment` 'live' | 'test', required: Environment of the key that issued the request: `live` (`fact_live_`) or `test` (`fact_test_`). Test keys operate on the sandbox company, so their logs belong to a different tenant and a live key never sees them; the filter is what lets a test key inspect its own traffic.
    - `created_at` string, date-time, required: When the request was received (ISO 8601).
    - `company` object, nullable, required: The company (tax ID) the request acted on, or `null` when the request did not act on one (for example an account-level call) or the company no longer exists.
      - `id` string, uuid, required: Opaque identifier (UUID v7) of the company.
      - `tax_id` string, required: Spanish fiscal identifier (NIF, CIF, NIE). Structural format: NIF `^\d{8}[A-Z]$`, NIE `^[XYZ]\d{7}[A-Z]$`, CIF `^[A-Z]\d{7}[A-Z0-9]$`. AEAT control-digit (checksum) validation is enforced when the request opts in via the `Factuarea-Version` header on or after the activation version; without that opt-in the legacy permissive behaviour is preserved.
      - `name` string, required
    - `axis` 'company' | 'account' | 'null', nullable, required: Axis the request was made on, derived from the path prefix: `company` for `/v1/companies/{company}/…` and `account` for `/v1/accounts/{account}/…`. `null` when the path belongs to neither.
  - `has_more` boolean, required: `true` when more logs exist beyond this page.
  - `next_cursor` string, nullable, required: Opaque cursor to pass as `starting_after` for the next page, or `null` when `has_more` is `false`. Unlike the rest of the v1 listings it is a numeric string, not a UUID v7 — treat it as opaque and reuse it verbatim.

## Other responses

- `400`: The request is syntactically malformed — e.g. an unknown query parameter, an integer parameter with non-numeric value, or a value outside the documented range.
- `401`: Missing or invalid API key.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`).
- `404`: The requested resource does not exist or belongs to another company. `account_not_found`: the account in the path does not exist or is not the account of the API key.
- `422`: Validation failed — e.g. the API key plan limit was reached, or an invoice language outside the allowed catalog (`es`, `en`, `ca`). The `error.param` field identifies which input is invalid, if any.
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
