Skip to content

Document sync & the CLI

How sync apps and the CLI sign in

Document sync apps and the il command-line tool talk to the InterlinedList API with a token. You can give them one in two ways:

  • Paste a personal access token. This works for the CLI, scripts and any sync tool. You choose exactly what the token can do, and you can revoke it at any time.
  • Sign in with your email and password in an InterlinedList app that offers it. The app gets its own device sign-in, which lasts 30 days and renews itself while you keep using it.

Either way, your password never has to live in a config file.

Create a sync token

  1. Open Settings → Developer.
  2. Choose For a sync app or CLI. The form opens with the two scopes sync needs, documents:read and documents:write, already ticked.
  3. Finish the name with the device, for example Document sync on my laptop.
  4. Pick an expiry (30, 90 or 365 days) and choose Create token.
  5. Copy the token straight away. It starts with ilp_ and is shown only once.
  6. Paste it where the app or CLI asks for it, or set it as an environment variable such as IL_TOKEN.

Make one token per device. Each one shows its name, scopes, when it was last used and when it expires, so you can tell them apart and revoke one without breaking the others. You can have up to 20 tokens.

Revoke or replace a token

  • Revoke: in Settings → Developer, choose Revoke next to the token. Anything using it stops working immediately.
  • Replace: create a new token for the device, paste it in, then revoke the old one.
  • Lost device: revoke its token. Nothing else needs to change.

Device sign-ins from apps are listed under Settings → Account in Sessions, where Sign out all others ends them.

What sync does

Sync works on whole documents, as Markdown:

  • Pull asks for everything that changed since the last sync. It returns each document's Markdown, its version and whether it was deleted, a page at a time.
  • Push sends up to 100 changed documents at once. Each one succeeds or fails on its own.
  • Conflicts: if a document changed on the server since you last pulled it, that document comes back as a conflict, with the server's current Markdown, so the app can merge or ask you which to keep. Nothing is overwritten.

Deleting a document through sync moves it to your Trash, like deleting it on the web, and needs you to be its owner. Editing needs at least editor access.

For developers

The endpoints are GET /v1/documents/sync and POST /v1/documents/sync. Send the token as Authorization: Bearer ilp_…. A request without the scope it needs fails with scope_missing. See the API reference for the request and response shapes.