Skip to main content
@linkvite/js is generated from the Linkvite OpenAPI spec: every endpoint has a typed method, and request and response types match the API. It works anywhere with fetch: Node 20+, Deno, Bun, browsers and browser extensions.

Create a client

Call the API

Methods are grouped by resource (bookmarks, collections, highlights, …). Path parameters come first, then the request body, then query parameters. Every method resolves to the response’s data.
Each method’s JSDoc shows its required scope and rate limit. For an endpoint the SDK doesn’t have yet, use linkvite.request('GET', '/v1/...').

OAuth helpers

The oauth namespace implements the authorization code flow with PKCE:
Refresh tokens rotate, so only one refresh may run at a time. singleFlightRefresher handles that, and onUnauthorized retries a request once with the new token:

Errors and retries

Failed requests throw a LinkviteError with status, errors (validation details) and requestId. Idempotent requests are retried on 429, 5xx and network errors, honouring Retry-After.

Pagination

Types

Source and changelog: github.com/linkvite/js.