The main extension endpoint for saving bookmarks from the Chrome extension. Handles deduplication, source tracking, auto-grouping, and metadata fetching.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ephraimduncan/minimal.so/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
app/api/extension/bookmark/route.ts:135
Authentication
Requires a valid user session. The extension authenticates by including session cookies in the request.CORS
This endpoint validates the request origin against configured extension IDs:chrome-extension://<CHROME_EXTENSION_ID>(from env)http://localhost:3000(for development)
Request body
The URL to bookmark (must be a valid URL)
Optional title to use instead of auto-fetched title
The source of the bookmark. One of:
manual_popup- Saved via extension popupmanual_context_menu- Saved via right-click menumanual_shortcut- Saved via keyboard shortcutx_bookmark- Auto-captured from X/Twitterbrowser_bookmark- Auto-captured from browser bookmarks
Optional group name override. If not provided, uses group based on source:
x_bookmark→ “Imported - X”browser_bookmark→ “Imported - Browser”- All others → User’s default group (oldest group)
ISO 8601 timestamp of when the bookmark was captured (defaults to current time)
Response
Always
true on successful saveThe action performed:
created- New bookmark createdupdated- Existing bookmark updated (metadata refreshed)reclassified- Existing bookmark moved to new group due to source priority
Deduplication & reclassification
The endpoint uses normalized URLs for deduplication. If a bookmark with the same normalized URL already exists:- Metadata is always updated (title and favicon refreshed)
- Reclassification occurs if:
- New capture timestamp is more recent, OR
- Same timestamp but higher source priority
Source priority (lowest to highest)
Source history
The endpoint tracks all sources that have captured a bookmark in thesourceHistory field. This allows you to see if a bookmark was both manually saved and auto-imported from X, for example.
Auto-grouping
If nodestinationGroup is provided:
x_bookmark→ Creates/uses “Imported - X” groupbrowser_bookmark→ Creates/uses “Imported - Browser” group- All other sources → Uses user’s oldest (default) group
#6b7280).
Example requests
Save from extension popup
Save from context menu with custom title
Auto-capture from X
Example responses
Created new bookmark
Updated existing bookmark
Reclassified to new group
Error responses
Unauthorized (401)
Invalid URL (400)
No group exists (400)
Origin not allowed (403)
Related endpoints
- Check bookmarks - Check if URLs are already bookmarked
- Bulk import - Import multiple bookmarks at once
- Create bookmark (oRPC) - Create bookmark via oRPC API