---
title: "Retrieve an account API request log"
method: GET
path: "/accounts/{account}/request-logs/{request_id}"
tags: ["Account"]
---

# Retrieve an account API request log

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

## Request

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

Retrieve one request made with any API key of your account by the `req_…` id from the `X-Request-Id` header.
- It is an opaque string, not a UUID v7; the body matches the listing.
- A missing, foreign or purged request returns 404 `resource_not_found`.

## Path parameters

- `account` string, uuid, required
- `request_id` string, required

## Headers

- `Factuarea-Version` string, date

## Response `200`

- object
  - `data` ApiRequestLog, required: A single request your integration made against this API. Read-only, scoped to your own company, and retained for 30 days before being purged. Request headers, bodies and query strings are never stored, so they are never returned.
    - `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.

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `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.
- `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)
