---
title: "Update trace sharing"
method: PATCH
path: "/api/traces/{trace_unique_id}/"
tags: ["Traces"]
---

# Update trace sharing

`PATCH /api/traces/{trace_unique_id}/`

## Request

- Base URL: `https://api.respan.ai`
- URL: `https://api.respan.ai/api/traces/{trace_unique_id}/`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Set public-sharing metadata for a trace ID. This operation upserts the sharing record and returns `200` when `is_public` is supplied; it does not first verify that trace spans exist.

## Path parameters

- `trace_unique_id` string, required

## Request body

- object
  - `is_public` boolean, required: Set `true` to make the trace public, or `false` to revoke public access.

## Response `200`

Trace sharing state updated.

- object
  - `trace_unique_id` string, required
  - `is_public` boolean, required

## Other responses

- `400`: Bad Request
- `403`: The API key is missing, invalid or expired.

## Changes

- **2026-10-21** `c30bcb383ee8`: 1 breaking, 4 info
  - request body became required
  - api operation id `traces_shareTrace` removed and replaced with `shareTrace`
  - the endpoint scheme security `DashboardJwt` was added to the API
  - api tag `Traces` added
  - …1 more
- **2026-10-02** `b830b79cfd52`: 2 info
  - added the non-success response with the status `403`
  - removed the non-success response with the status `401`
- **2026-09-17** `6fa8242da8c2`: 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `RespanApiKey` was added to the API
- **2026-09-12** `22b868ef3f22`: 1 info
  - api operation id `share-trace` removed and replaced with `traces_shareTrace`

[Operation history](https://skmtc.dev/respan/apis/respan-api/changes/api/traces/:trace_unique_id/patch.md)

---

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