---
title: "List traces"
method: GET
path: "/v1/projects/{project_id}/traces"
tags: ["Traces"]
---

# List traces

`GET /v1/projects/{project_id}/traces`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/projects/{project_id}/traces`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Returns a paginated list of execution traces for the project.

## Query parameters

- `parent_trace_id` string
- `limit` integer
- `offset` integer

## Response `200`

List of traces

- object
  - `data` Trace[]
    - `id` string: Public ID of the trace
    - `project_id` string: Public ID of the project
    - `agent_id` string: Public ID of the agent that produced this trace
    - `file_id` string, nullable: Public ID of the File containing the full serialized steps JSON. Null if the trace has not been saved yet (save is fire-and-forget).
    - `step_count` integer: Number of steps recorded in this trace
    - `parent_trace_id` string, nullable: Public ID of the parent trace. Null if this trace is the root (i.e., it was not triggered by a sub-agent call from another trace).
    - `root_trace_id` string, nullable: Public ID of the root trace for the entire execution tree. Null if this trace is itself the root.
    - `error` StoredError: Why a resource's work failed, in the shape of an error response's `error` without `hint` and `docs_url`. Every `error` field a resource records carries it, so `code` can be read without first checking the type of `error`.
      - `code` string, required: A key from the server's ERROR_CODES registry, documented on the Error Codes page. `INTERNAL_ERROR`, with the message `Internal Server Error`, records an unexpected failure whose detail reaches the server log only.
      - `message` string, required
      - `meta` object: The failure's own structured context, when it names any.
    - `content_redacted_at` string, date-time, nullable: When the trace's content was purged. Non-null means the steps object has been deleted from storage and the content columns cleared, while this row survives as an auditable skeleton (ids, timestamps, step count). A purged trace still reads back as a skeleton with this marker set rather than as a 404, so the erasure is provable.
    - `content_redacted_by_principal_type` 'user' | 'api_key' | 'agent' | 'automation' | 'approval' | 'system': What kind of principal acted. `user` and `api_key` are authenticated callers, and the id is the user's (`user_…`) or the key's own (`key_…`), so a record names which key acted rather than its owner. `agent` is an agent writing under its own identity (`agent_…`). `automation` is the task engine acting on a dispatch outcome and `approval` an approval resolution; neither carries an id. `system` is the platform itself, with an id naming the mechanism (`retention_sweep`, `zero_retention`).
    - `content_redacted_by_principal_id` string, nullable: Public id of that principal — the API key's own id for key auth, so the record names which key acted. `retention_sweep` or `zero_retention` for `system`.
    - `created_at` string, date-time
  - `total` integer
  - `limit` integer
  - `offset` integer

## Other responses

- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/naturali/apis/naturali-ai-api.md) · [All operations](https://skmtc.dev/naturali/apis/naturali-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/naturali/apis/naturali-ai-api/revisions/e4905b78f422?raw)
