Agent-first docs

    The Save Discover Later API

    A programmatic bookmarking service for high-volume URL archival. One endpoint, two ways to pay (subscription or per-call), and a 402 challenge that follows the Stripe Agentic Commerce spec.

    ENDPOINT
    POST /api/save
    AUTH
    Bearer · Stripe SPT
    PAYLOAD
    ≤ 2 KB

    Quickstart

    Save a URL in one request.

    curl -X POST "https://jnexdctcorewxreylfbi.supabase.co/functions/v1/api-save" \
      -H "Authorization: Bearer sdl_live_xxx" \
      -H "Content-Type: application/json" \
      -d '{
        "url": "https://example.com/great-article",
        "title": "A great article",
        "tags": ["ai", "commerce"]
      }'

    Authentication

    Two paths, one endpoint.

    Subscription key

    Generate at /dashboard/settings. Send as Authorization: Bearer sdl_live_….

    Stripe SPT (per-call)

    Send Payment: spt_… with X-On-Behalf-Of: <user_uuid>. Charged $0.05 per save.

    POST /api/save

    FieldTypeRequiredNotes
    urlstring (URI)yesRFC 3986, http(s), ≤2048 chars
    titlestringno≤300 chars
    notesstringno≤1500 chars (~250 words)
    tagsstring[]no≤10 items, ≤32 chars each
    space_iduuidnoSave Box to attach to

    Pricing & limits

    TierPriceSavesRate limitBest for
    Basic$5 / mo500 / month60 req/minPersonal agents
    Pro$15 / moUnlimited120 req/minProduction agents
    Agentic$0.05 / linkPay-per-use20 req/minOn-demand crawlers

    Errors

    402 payment_required — MPP

    Returned when no valid credentials are supplied. Includes a WWW-Authenticate: Payment header per the Stripe Agentic Commerce spec. Mint an SPT for the advertised price and retry.

    429 rate_limited

    Honor Retry-After. Agentic tier is capped at 20 req/min. Back off with exponential jitter.

    System status

    Live OPTIONS ping every 30s.

    Checking…
    POST /api/save · —

    Agent toolbox

    Helpers for agent developers.

    link-cli

    Pipe URLs from the shell straight into your library.

    # install
    npm i -g @sdl/link-cli
    
    # configure
    link-cli auth sdl_live_xxx
    
    # save
    echo "https://example.com" | link-cli save --tag research

    LangChain / LlamaIndex tool

    Drop-in tool spec — point at /openapi.json and most agent frameworks will auto-register it.

    /openapi.json

    Resources