Get started

API / Cookbook / 06

Export, redact or delete

Your transcripts are yours. Take everything out, scrub a session that caught a secret, or remove one for good, and every consumer following the change feed hears about it.

RESTGraphQLMCPLive

Deleting a session, and what everyone else sees
actor you: You
actor tz: Tracez
actor feed: A feed consumer
actor col: A collector
you -> tz: DELETE /api/sessions/SESSION_ID
note tz: remove the session, keep an exclusion
tz --> you: {action: excluded_and_deleted}
feed -> tz: GET /api/stream/events?cursor=…
tz --> feed: action delete_session, resource null
note feed: drop every cached turn for the session
col -> tz: replay a batch from that session
tz --> col: receipt; excluded turns are skipped

Steps

  1. Export everything

    Ten turns a page, each with its session and source details. Follow next_after until has_more is false; artifacts come from /api/artifacts.

    curl "https://tracez.recurz.ai/api/export?after=0" \
      -H "Authorization: Bearer $RECURZ_TOKEN"

    An export reads committed data as it stands, so a session that changes mid-export can show its newer revision on a later page.

  2. Redact a session

    Keeps the session's shape but replaces every turn with [Redacted by account owner], clears its title and working directory, and removes its artifacts and source paths. Later turns for that session arrive redacted too.

    curl -X POST https://tracez.recurz.ai/api/sessions/SESSION_ID/redact \
      -H "Authorization: Bearer $RECURZ_TOKEN"
  3. Delete a session

    Removes the session and remembers that you deleted it, so a collector replaying old batches can't bring it back. Deleting twice is fine.

    curl -X DELETE https://tracez.recurz.ai/api/sessions/SESSION_ID \
      -H "Authorization: Bearer $RECURZ_TOKEN"
    {"session_id":"…","action":"excluded_and_deleted","source_objects_deleted":false}
  4. Set a retention window

    Sessions older than the window are removed by a nightly job. Use 7 to 3650 days, or null to keep everything.

    curl -X PUT https://tracez.recurz.ai/api/privacy \
      -H "Authorization: Bearer $RECURZ_TOKEN" \
      -d '{"retention_days":90}'

source_objects_deleted: false refers to original source objects that Tracez doesn't own, such as data migrated in from an earlier system; GET /api/privacy spells out what each control covers. The privacy policy has the full picture.