---
title: "Edit Trace"
method: PUT
path: "/traces/{trace_id}"
tags: ["Observability"]
---

# Edit Trace

`PUT /traces/{trace_id}`

## Path parameters

- `trace_id` string, required

## 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/:trace_id/put.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)
