---
title: "PUT /api/v1/traces/{id}"
method: PUT
path: "/api/v1/traces/{id}"
tags: ["Traces"]
---

# PUT /api/v1/traces/{id}

`PUT /api/v1/traces/{id}`

Update individual trace

## Path parameters

- `id` string, uuid, required

## Request body

- TraceUpdateRequest
  - `score` number — Updated evaluator score between 0 and 1.
  - `feedback` string, nullable — Updated feedback text for this trace.
  - `projectId` string, uuid, nullable — Project to associate with the trace.

## Response `200`

success response

- Trace
  - `id` string, uuid, required — Unique trace identifier.
  - `createdAt` string, date-time, required — ISO timestamp representing when the trace was recorded.
  - `modelId` string, required — Model identifier attached to the trace.
  - `projectId` string, uuid, nullable, required — Project identifier, null when the trace is not linked to a project.
  - `input` string, required — Prompt or message provided to the model.
  - `output` string, required — Model response captured for the trace.
  - `score` number, nullable, required — Score between 0 and 1. Null when the trace has not been scored yet.
  - `feedback` string, nullable, required — Feedback provided for the trace.
  - `addedToDataset` boolean, required — Flag indicating whether the trace is already in the dataset.
  - `processingStatus` 'none' | 'processing' | 'failed', required — Background processing status used when generating improved datapoints.

## Other responses

- `400` — bad request
- `401` — unauthenticated
- `403` — unauthorized
- `404` — not found
- `409` — conflict
- `500` — internal server error

## Changes

- **2025-11-12** `d71329d1d771` — 5 breaking, 7 info
  - the `input` response property's minLength was decreased from `1` to `0` for the response status `200`
  - the `modelId` response property's minLength was decreased from `1` to `0` for the response status `200`
  - the `output` response property's minLength was decreased from `1` to `0` for the response status `200`
  - the `createdAt` response's property type/format changed from `string`/`date` to `string`/`date-time` for status `200`
  - …8 more
- **2025-11-12** `25d63a01824a` — 1 warning, 5 info
  - the `feedback` request property's maxLength was set to `2048`
  - added the new optional request property `projectId`
  - added the optional property `processingStatus` to the response with the `200` status
  - added the required property `addedToDataset` to the response with the `200` status
  - …2 more
- **2025-09-23** `4f595e224e0c` — 1 breaking
  - the `score` request property's max was decreased to `1.00`
- **2025-09-09** `25b5483d62a9` — 1 warning
  - removed the optional property `conversationId` from the response with the `200` status
- **2025-09-04** `6fce808cc14e` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/premai-io/apis/prem-studio-api/changes/api/v1/traces/:id/put.md)

---

[API](https://skmtc.dev/premai-io/apis/prem-studio-api.md) · [All operations](https://skmtc.dev/premai-io/apis/prem-studio-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/premai-io/prem-studio-api/revisions/2cb1f5df1b89/schema)
