Skip to main content
POST
Wipe the sandbox partition
Erase everything the sandbox partition holds. Idempotent. This is the one destructive operation in the family, and it is destructive only by construction: it binds to the reserved sandbox user, and refuses with 409 (deleting nothing) unless that user carries the sandbox provenance marker. It deletes:
  • every per-subject row in the organization’s schema owned by the sandbox user, using exactly the same table set as per-subject erasure so the two can never diverge, and including graph edges touching sandbox nodes;
  • organization-shared derived rows left pointing at nodes this reset removed, reported as orphansDeleted;
  • the sandbox user’s ingest jobs;
  • the stored files those rows referenced, uploaded imports and export documents, deleted after the database work commits so a failed reset cannot leave rows intact with the uploads already gone. These are not counted in the response.
What it does not clean, stated plainly: derived structure that carries no node key, such as organization-wide domain aggregates and clustered pattern tables. Those are shared across the organization with no way to attribute a row to the sandbox, so deleting them would take a real user’s cognition with them. Use POST /v1/purge with scope: "org" for a clean slate. It keeps the sandbox user and its keys, so a test key keeps working against a now-empty partition, which is the point. Re-running on an already-empty sandbox is a no-op that returns zero counts.

Authorization

This route requires the admin scope. A missing or invalid credential returns 401 authentication_error. A valid credential without the scope returns 403 permission_denied, and the problem body names the exact scope required.

Headers

These are request conventions the contract does not declare as parameters, so they do not appear in the schema tables below.

Success responses

Errors

Beyond the shared statuses, this route can answer with idempotency_in_flight, idempotency_key_reuse. Every problem body names its own code, and the type URI always resolves to the matching page. Every error is an RFC 9457 application/problem+json body carrying a stable code, a requestId, and a suggestedAction where Exo has one. See Errors.

Notes

  • This is the destructive one in the family, and it is bounded by construction: it binds to the reserved sandbox user and refuses with 409 unless that user carries the sandbox provenance marker.

Authorizations

X-Exo-API-Key
string
header
required

An Exo API key (exo_...) sent as the X-Exo-API-Key header.

Response

Successful Response

What POST /v1/sandbox/reset erased. Keys and the subject itself survive.

jobsDeleted
integer
required
keysRetained
integer
required
rowsDeleted
integer
required
subject
string
required
tablesCleared
integer
required
tablesSkipped
integer
required
orphansDeleted
integer
default:0

Rows removed from org-shared derived tables that pointed at nodes this reset deleted (see the route docstring for what a reset cannot clean).