Purge Deals
POST
/api/superadmin/purge_deals
const url = 'https://example.com/api/superadmin/purge_deals';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"mode":"example","deal_id":"example","org_id":"example","include_checkpoints":false,"exclude_active_within_secs":1,"dry_run":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/superadmin/purge_deals \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "mode": "example", "deal_id": "example", "org_id": "example", "include_checkpoints": false, "exclude_active_within_secs": 1, "dry_run": true }'Purge per-deal Redis state (Canvas sessions, locks, presence, events, image crops, digitization cache, intake summaries, doc readiness, deal-intel cache, brush findings).
LangGraph checkpoint keys are NOT purged unless include_checkpoints
is true — this avoids aborting in-flight synthesis runs.
Modes:
“all” — purge every deal in Redis. Use exclude_active_within_secs
to skip deals with recent canvas:events activity.
“by_deal” — purge a single deal_id (org_id optional but recommended).
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
PurgeDealsBody
Request body for /api/superadmin/purge_deals.
Responses
Section titled “ Responses ”Successful Response
Media type application/json
Response Purge Deals Api Superadmin Purge Deals Post
object
key
additional properties
any
Example generated
{}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}