Import a Local Library
Import the Saved Items and Folders the iOS app kept on the device before the person connected an Account. Up to 500 items and 50 Folders per request. The device already enriched each item, so the server keeps the title, description, favicon, Preview Summary and Tags it sends and does not enrich, check, classify or file the item again. A Link the server already knows keeps its own metadata, and a Saved Item the Account already has keeps its fields: it only becomes read when the import says read, and gains the Folder when it has none. Folders match the Account's Folders by name, ignoring case, and are created when missing. An item's `folderName` that matches no Folder leaves the item unfiled. Items match by Normalized URL, so the same import twice creates nothing the second time. The response holds one Saved Item per item sent, in request order. The request is one transaction: an invalid URL or Folder name refuses the whole import with `400`.
/v1/saved-items/importImport the Saved Items and Folders the iOS app kept on the device before the person connected an Account. Up to 500 items and 50 Folders per request.
The device already enriched each item, so the server keeps the title, description, favicon, Preview Summary and Tags it sends and does not enrich, check, classify or file the item again. A Link the server already knows keeps its own metadata, and a Saved Item the Account already has keeps its fields: it only becomes read when the import says read, and gains the Folder when it has none.
Folders match the Account's Folders by name, ignoring case, and are created when missing. An item's folderName that matches no Folder leaves the item unfiled. Items match by Normalized URL, so the same import twice creates nothing the second time.
The response holds one Saved Item per item sent, in request order. The request is one transaction: an invalid URL or Folder name refuses the whole import with 400.
Personal API Key or App Session bearer token.
In: header
Header Parameters
A unique value identifying this write. The first response for a given key is recorded for 24 hours and replayed for every later request that repeats it, so a retry after a timeout cannot create a duplicate. Replayed responses carry Idempotent-Replay: true. A key whose original request is still running gets 409. Use a UUID or a ULID, and reuse a key only when retrying the same request.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
items <= 50items <= 500Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/saved-items/import" \ -H "Idempotency-Key: 8f14e45f-ea4e-4a1f-9c2b-6f0a1d3c5e77" \ -H "Content-Type: application/json" \ -d '{ "folders": [], "items": [] }'{ "savedItems": [ { "id": "string", "originalUrl": "string", "normalizedUrl": "string", "host": "string", "title": "string", "description": "string", "siteName": "string", "faviconUrl": "string", "faviconLightUrl": "string", "faviconDarkUrl": "string", "imageUrl": "string", "canonicalUrl": "string", "authorName": "string", "authorHandle": "string", "authorAvatarUrl": "string", "previewSummary": "string", "type": "article", "tags": [ "ai" ], "enrichmentStatus": "pending", "sourceName": "string", "captureChannel": "chrome-extension", "folder": { "id": "string", "name": "string", "emoji": "string", "color": "string", "isPublished": true }, "isRead": true, "hasReadableContent": true, "lastSavedAt": "string", "createdAt": "string", "updatedAt": "string" } ]}{ "_tag": "InvalidUrlError", "message": "string", "url": "string"}{ "_tag": "Unauthorized", "message": "string"}{ "_tag": "RateLimitExceeded", "message": "string"}Read a saved item's readable content GET
Return the Readable Content of this Saved Item as Markdown, for a Reader View. Only the Markdown form is served. Check `hasReadableContent` on the Saved Item before calling: a Saved Item whose Link yielded no article answers 404, the same answer a Saved Item belonging to another account gets, so absence and non-ownership are indistinguishable. Extraction is best effort and most Links are not articles, so a 404 here is ordinary rather than an error to report.
List saved items GET
List the authenticated account's Saved Items. Use `sort` to choose the ordering and `folder` to restrict the list to one Folder. Pass `limit` and the `nextCursor` of the previous response to page through the list; `nextCursor` is `null` on the last page. Treat the cursor as opaque and never construct one.