---
title: "Create Trace"
method: POST
path: "/traces/"
tags: ["Observability"]
---

# Create Trace

`POST /traces/`

## Request body

- TraceRequest
  - `trace` TraceInput
    - `spans` object, nullable
    - `trace_id` string, nullable

## Response `202`

Successful Response

- TraceIdResponse
  - `count` integer
  - `trace_id` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-04-18** `c469c2f6cdba` — 1 info
  - endpoint added
- **2025-06-27** `e3e84db47198` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/traces/post.md)

---

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