Skip to main content

Delete Session

Hard delete: permanently removes session metadata, event history, and internally copied resources. This action is irreversible. To preserve event history, use the archive endpoint instead.

Prerequisites

Endpoint and authentication configuration must be completed. For details, see Overview and authentication.

Endpoint

DELETE /sessions/{session_id}

Request example

curl -X DELETE "$AGENTSTUDIO_URL/sessions/sesn_xxx" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response example

{
  "id": "sesn_xxx",
  "type": "session_deleted",
  "request_id": "xxx"
}

Response fields

FieldTypeDescription
idstringThe deleted session ID
typestringFixed as session_deleted, indicating successful deletion
request_idstringUnique identifier for this request
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration