Bridge REST API¶
Base URL: http://localhost:19876
All endpoints accept and return JSON. The server rejects requests with non-chrome-extension:// Origin headers.
Health¶
GET /health¶
Returns server status.
Tabs¶
GET /tabs¶
Returns the last synced active tabs from the extension.
Response:
{
"tabs": [
{
"id": 123,
"windowId": 1,
"url": "https://github.com",
"title": "GitHub",
"pinned": false,
"index": 0,
"lastAccessed": 1712345678000,
"createdAt": 1712345600000
}
]
}
POST /tabs/sync¶
Syncs active tabs from the extension. Called automatically every minute.
Request body:
Each tab must have id (number), url (string), and title (string).
Lifecycle¶
GET /lifecycle¶
Returns all lifecycle tabs.
Response:
GET /lifecycle/:state¶
Returns lifecycle tabs filtered by state.
Parameters:
state:snoozed|queued|watching
POST /lifecycle/snooze¶
Create a snoozed tab.
Request body:
{
"url": "https://example.com",
"title": "Example",
"favIconUrl": "https://example.com/favicon.ico",
"wakeAt": 1712345678000,
"originWindowId": 1
}
| Field | Type | Required | Validation |
|---|---|---|---|
url |
string | Yes | Must be http or https |
title |
string | No | Defaults to "" |
wakeAt |
number | No | Must be positive if provided |
originWindowId |
number | No | Defaults to 0 |
Response: 201 with { "tab": LifecycleTab }
POST /lifecycle/queue¶
Create a queued tab. Position is assigned automatically (end of queue).
Request body:
| Field | Type | Required | Validation |
|---|---|---|---|
url |
string | Yes | Must be http or https |
title |
string | No | Defaults to "" |
Response: 201 with { "tab": LifecycleTab }
POST /lifecycle/watch¶
Create a watching tab.
Request body:
{
"url": "https://example.com",
"title": "Example",
"cssSelector": "#price",
"pollIntervalMinutes": 15
}
| Field | Type | Required | Validation |
|---|---|---|---|
url |
string | Yes | Must be http or https |
cssSelector |
string | Yes | Max 500 characters |
pollIntervalMinutes |
number | No | Defaults from config |
Response: 201 with { "tab": LifecycleTab }
POST /lifecycle/:id/wake¶
Wake a lifecycle tab (removes from storage, returns data for reopening).
Response: 200 with { "tab": LifecycleTab }
Error: 404 if tab not found
DELETE /lifecycle/:id¶
Permanently remove a lifecycle tab.
Response: 200 with { "removed": true }
Error: 404 if tab not found
Meeting¶
POST /meeting/start¶
Snooze all active tabs for a meeting.
Request body:
Response:
POST /meeting/end¶
Restore all tabs from a meeting.
Request body:
meetingId is required (returns 400 if missing).
Response:
Stats¶
GET /stats¶
Returns tab count and hygiene statistics.
Response: