Purge trace content
Deletes the trace's steps object from storage and clears its content columns (file_id, error), cascading to every descendant trace and to all of their generations. A descendant holds its own steps object covering the same run, so the cascade is what makes the erasure complete rather than merely partial.
The rows survive as auditable skeletons with content_redacted_at set — ids, timestamps, step counts, and the generations' usage-attribution fields are preserved, because the billing and audit ledger must outlive a tenant's erasure of the content. A purged trace therefore reads back as a skeleton, not a 404: a 404 would prove nothing.
Idempotent — purging an already-purged trace succeeds and leaves the original content_redacted_at in place.
Request
- Base URL: https://api.naturali.ai
- URL: https://api.naturali.ai/v1/projects/{project_id}/traces/{trace_id}/content
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)
Path parameters
Public ID of the trace
Response
The purged trace skeleton
Example response
{
"id": "trace_V1StGXR8Z5jdHi6B",
"file_id": "file_xyz789",
"step_count": 2,
"error": {
"code": "AI_PROVIDER_ERROR",
"message": "Provider returned 402: insufficient credits"
},
"content_redacted_by_principal_type": "user",
"content_redacted_by_principal_id": "user_V1StGXR8Z5jdHi6B"
}Changes
No recorded changes to this operation across all 1 revision of this API.