- Retention expiry — time-bounded writes (
1h/2h/6h/1d) expire on their own; see Data retention. - Session deletion — one call tears down a named working scope (below).
- Subject offboarding — one call erases everything about a Subject (below).
Sessions
Asession_id can identify both a working-data scope and an Agent conversation:
- Scopes
retention=sessiondata — records written viaPOST /v1/data(orPOST /v1/extractwithstore=true) withretention: "session"must carry asession_idand live until the session is deleted — deleting the session is what clears them, so don’t skip it. - Binds durable conversations on the Agent API — passing
session_idtoPOST /v1/responsesmakes the conversation durable and resumable under that id. See State & memory.
retention=session under this session_id are erased (together with their FHIR mirrors), session-tier file uploads are removed, and the underlying chat session is marked closed.
Pass the same
user you used when writing the session’s data; omitting it targets your account’s default Subject.deleted counts session-scoped records, session-scoped files, and the underlying chat-session row. It does not count stored Responses API objects. 0 means none of those resources matched.
Offboarding a Subject
- Structured records — everything written via
POST /v1/dataor stored extractions, regardless ofretention— including their FHIR resources. - Files — everything uploaded via
POST /v1/files, immediately gone from the API. - Stored Agent API conversations — immediately unreadable (
GET /v1/responses/{id}returns404) and purged by a background job. - The identity mapping — the Subject itself becomes unreachable. A later request that passes the same
usermints a fresh, empty Subject with no connection to the erased one.
An erase never creates the very Subject it is erasing: resolution looks up the existing mapping only. Passing a
user your account has never used returns 404 — nothing is minted.
For finer-grained deletion, use the per-piece levers instead:
DELETE /v1/data (records), DELETE /v1/files/{key} (one file), DELETE /v1/responses/{id} (one stored response), DELETE /v1/sessions/{id} (session-scoped data and files). See Compliance for the full user-rights picture.