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 fields

idstringThe deleted session IDtypestringFixed as session_deleted, indicating successful deletionrequest_idstringUnique identifier for this request

Response example

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