Delete Multiple Sessions
Select sessions and storage
Use the registered session database; db_id is required when multiple database IDs are available, and table requires db_id. Authentication and user isolation determine the effective user scope; non-admin service-account PAT callers self-scope.
Send equal-length, nonempty session_ids and session_types arrays. The local adapters delete by session ID and effective user; session_types does not act as a type guard. Use IDs from the intended sessions rather than relying on a supplied type to prevent deletion.
delete_media=false retains offloaded media. With true, AgentOS must have media storage configured (503 otherwise); RemoteDb media deletion is unsupported (501). Media cleanup is best-effort after database rows are deleted, so failure does not imply session deletion was rolled back.
/sessionsDelete multiple sessions by their IDs in a single operation. This action cannot be undone and will permanently remove all specified sessions and their runs.
Authorization
HTTPBearer In: header
Query Parameters
User ID to scope deletion to
Database ID to use for deletion
Table to use for deletion
Also delete the sessions' offloaded media from media storage
falseRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl --request DELETE 'https://example.com/sessions' \ --header 'Content-Type: application/json' \ --data-raw '{"session_ids":["string"],"session_types":["agent"]}'{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}