---
title: "Ingest Traces"
method: POST
path: "/traces/ingest"
tags: ["Deprecated"]
deprecated: true
---

# Ingest Traces

`POST /traces/ingest`

> **Deprecated.**

Ingest a batch of traces in the canonical `Traces` list shape.

Accepts a list of trace records (each `trace_id` plus nested
`spans`). Internally normalized into the same pipeline as
`POST /tracing/spans/ingest`. Use this when you already hold
data in the `Traces` list shape — for example, replaying traces
from another environment.

Returns `202 Accepted` with the list of accepted `trace_ids`. See
[Tracing — Async write
contract](/reference/api-guide/tracing#async-write-contract-202)
for what `count` means here.

## Request body

- TracesRequest — Ingest payload in the canonical `Traces` list shape. Used by `POST /traces/ingest`. Each entry is one trace with its `trace_id` and a nested `spans` tree.
  - `traces` TraceInput[], nullable — List of trace records. Each record is a `trace_id` plus the nested `spans` tree. Equivalent to the map-shaped payload accepted by `POST /tracing/spans/ingest`.
    - `spans` object, nullable
    - `trace_id` string, nullable

## Response `202`

Successful Response

- TraceIdsResponse
  - `count` integer — Number of distinct trace IDs in this response.
  - `trace_ids` string[] — 32-char hex UUIDs of the traces that were ingested. Compare against the number you submitted to detect partial failures.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.net/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agenta-ai/agenta-api/versions/ea6421d829f1/schema)
