cURL
curl --request DELETE \ --url https://api.pathors.com/project/{projectId}/session \ --header 'Authorization: <authorization>' \ --header 'Content-Type: application/json' \ --data ' { "session_id": "<string>" } '
{ "success": true, "sessionId": "<string>", "message": "<string>" }
结束现有会话以清理资源并终止对话上下文。
DELETE /project/{projectId}/session
sk_
Bearer {your-api-key}
curl -X DELETE https://api.pathors.com/project/{projectId}/session \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "session_id": "user-123-session-456" }'
{ "success": true, "sessionId": "user-123-session-456", "message": "Session ended successfully" }
{ "error": "session_id is required" }
{ "error": { "message": "Invalid authentication" } }