DELETE /tabs/:id
Closes a specific browser tab and releases associated resources. Safe to call even if the tab doesn’t exist.Authentication
RequiresuserId in the request body to verify ownership of the tab.
Request
Path parameters
The
tabId to close.Body parameters
User identifier. Must match the user who owns the tab.
Response
Always
true. Returns success even if tab was already closed or doesn’t exist.Example
DELETE /tabs/group/:groupId
Closes all tabs within a session group (identified bysessionKey or legacy listItemId). Useful for cleaning up all tabs associated with a task or conversation.
Authentication
RequiresuserId in the request body to verify ownership.
Request
Path parameters
The
sessionKey (or listItemId) identifying the tab group to close.Body parameters
User identifier. Must match the user who owns the tab group.
Response
Always
true. Returns success even if the group was empty or doesn’t exist.Example
Error responses
| Status | Error | Cause |
|---|---|---|
| 500 | Internal server error | Page close operation failed |
Notes
Cleanup behavior
- Closing a tab removes it from the session’s tab group
- If closing the last tab in a group, the entire group is deleted
- Tab locks are released immediately upon closure
- Page close has a 5-second timeout to prevent hangs (
PAGE_CLOSE_TIMEOUT_MS)
Session cleanup
- If a session has zero tabs remaining, it becomes eligible for cleanup
- Sessions expire after 30 minutes of inactivity (configurable via
SESSION_TIMEOUT_MS) - When all sessions are closed, the browser enters idle mode and shuts down after 5 minutes (configurable via
BROWSER_IDLE_TIMEOUT_MS)
Safe to call multiple times
- Both endpoints are idempotent - calling them on already-closed tabs/groups returns success
- No error is thrown if the tab or group doesn’t exist