sessions.destroy
api reference5 sections
sessions.destroy – Documentation
🧹 Cleanly shuts down a browser session and frees up system resources.
Use this endpoint when you're done with a session to ensure the browser instance is properly closed and memory is released.
🔧 Parameters
| Parameter | Required | Description |
|---|---|---|
session |
✅ Yes | The ID of the session you want to destroy. |
🛑 Why Use sessions.destroy?
- Prevents resource leaks by closing the browser instance tied to the session.
- Ensures you don’t exceed any session or memory limits.
- Recommended as part of good session lifecycle management.
Request Format
json4 lines
{
"cmd": "sessions.destroy",
"session": "my-session-id"
}Response Format
json6 lines
1{
2 "solution": {},
3 "data": "success",
4 "timeElapsed": 14,
5 "session": "my-session-id"
6}