Sleevy

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`.

POST/v1/saved-items/import

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.

AuthorizationBearer <token>

Personal API Key or App Session bearer token.

In: header

Header Parameters

Idempotency-Key?string

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.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

folders*array<>
Itemsitems <= 50
items*array<>
Itemsitems <= 500

Response 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"}