Reurl API

Base URL: https://api.reurl.to. Generate API tokens in the dashboard at app.reurl.to.

Authentication

A token can be sent in a header, JSON body, form body, or query string. Header authentication is recommended for production systems.

Authorization: Bearer reurl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
X-Reurl-Token: reurl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{
  "token": "reurl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "target_url": "https://example.com"
}

Account tokens

Free accounts can keep up to 3 active API tokens. Token management requires dashboard login by email or GitHub; API tokens cannot create, rename, or revoke other tokens.

GET /tokens
POST /tokens
PATCH /tokens/:id
DELETE /tokens/:id

These endpoints use the browser session cookie from app.reurl.to. They do not accept account API tokens.

QR codes

curl https://api.reurl.to/links/LINK_ID/qr \
  -H "Authorization: Bearer reurl_xxx"

Plans

The current free plan allows 5 short links and 3 active API tokens. Paid plan fields are already reserved server-side through account entitlements.

Login protection

Email-code login is protected by Cloudflare Turnstile when TURNSTILE_SECRET is configured on the backend. The widget uses action turnstile-spin-v2, and the backend verifies the token before sending email.