Linenote

API reference

Everything the website does is available over a small JSON API. No key is needed for public pastes. Base URL:

https://sync.rooni.dev/api/v1

Pastes are plain UTF-8 text. They are never rendered as HTML, and links inside them are not clickable.

Create a paste

POST/v1/pastes
FieldDescription
contentText, up to 128 KB. Required.
titleUp to 100 characters.
syntaxLabel used for display: text, log, json, yaml, xml, ini, shell, sql, python, javascript, go, rust, php, diff, markdown.
expires_inSeconds: 600, 3600, 86400 (default) or 604800.
burn_after_readDelete the paste after the first time it is opened.
curl -s https://sync.rooni.dev/api/v1/pastes \
  -H "Content-Type: application/json" \
  -d '{"content":"hello","expires_in":3600}'
{
  "id": "Xk3p9QaZ",
  "url": "https://sync.rooni.dev/p/Xk3p9QaZ",
  "raw_url": "https://sync.rooni.dev/p/Xk3p9QaZ/raw",
  "expires_at": "2026-11-13T19:04:11Z",
  "delete_token": "c3VwZXJzZWNyZXR0b2tlbg..."
}

Keep the delete_token if you want to remove the paste before it expires. It is shown only once.

Read a paste

GET/v1/pastes/{id}

Returns metadata and content. For pastes created with burn_after_read the content is omitted until you pass ?reveal=1; that request deletes the paste.

Raw text

GET/p/{id}/raw

The content as text/plain. Useful with curl and wget. Not available for burn-after-read pastes.

Delete

DELETE/v1/pastes/{id}

Pass the token in the X-Delete-Token header. Returns 204.

Limits

Up to 128 KB per paste and 40 new pastes per hour per client. The longest lifetime is one week; there are no permanent pastes. Current values are available at GET /v1/limits.

Errors

{"error":{"code":"validation_failed","message":"Content is required.","fields":{"content":"is required"},"request_id":"..."}}

404 means the paste does not exist or has expired, 413 that the body is too large, 429 that you are creating pastes too quickly.