API and MCP server
Create tokens in your workspace, under Developers. Each token has limited permissions and can be revoked at any time.
Authentication
Authorization: Bearer rl_live_…
JSON responses. Errors: { "error": { "code", "message" } }. Rate limit by plan (Solo 20, Pro 60, Agence 120 requests per minute) and at most 1 request per second, shown in the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Burst headers. Beyond: 429 with Retry-After. Service under heavy load: 503 with Retry-After. To create many links, use /v1/links/batch.
Create a link
curl https://api.reli.es/v1/links \
-H "Authorization: Bearer rl_live_…" \
-H "Content-Type: application/json" \
-d '{
"url": "https://exemple.fr/offre",
"slug": "offre-hiver",
"tags": ["sms"],
"utm": {"source": "sms", "campaign": "hiver"},
"expires_at": "2026-12-31T23:59:00+01:00"
}'
201 Created
{ "data": { "id": 42, "short_url": "https://reli.es/offre-hiver", "status": "active", "clicks": 0, "qr_svg": "https://api.reli.es/v1/links/42/qr.svg", … } }
Endpoints
| Method | Path | Permission | Role |
|---|---|---|---|
| POST | /v1/links | links:write | Create a link: url, domain, slug, title, tags, utm, starts_at, expires_at, expired_url, password |
| POST | /v1/links/batch | links:write | Create up to 100 links: { "links": [ … ] } |
| GET | /v1/links | links:read | List: tag, status, domain, q, cursor, limit (100 at most) |
| GET | /v1/links/{id} | links:read | Read a link |
| PATCH | /v1/links/{id} | links:write | Edit destination, title, tags, dates, UTM |
| DELETE | /v1/links/{id} | links:write | Archive (the link ending is never reassigned) |
| GET | /v1/links/{id}/stats | stats:read | Statistics: days (7 to 365) |
| GET | /v1/links/{id}/qr.svg | links:read | QR code SVG or PNG |
| GET | /v1/domains | domains:read | Available domains |
| GET · PATCH | /v1/pages/{handle} | pages:read · pages:write | Read a bio page, edit title and bio |
| GET | /v1/account | — | Plan, limits and usage |
| GET · POST · PATCH | /v1/campaigns · /v1/campaigns/{id}/contacts | campaigns:read · campaigns:write | Managed accounts’ campaigns by Le Web 2 KS: one link per contact |
Webhooks
Events: link.created, link.blocked, link.clicked (grouped by minute), page.form_submitted, campaign.contact_clicked (managed accounts). Each delivery carries the X-Relies-Signature header: t=timestamp,v1=signature, where the signature is the HMAC-SHA256 of “timestamp.body” with your secret. Reject deliveries older than 5 minutes. Three retries on failure: after 1 minute, 10 minutes, 1 hour.
$payload = file_get_contents('php://input');
[$t, $v1] = sscanf($_SERVER['HTTP_X_RELIES_SIGNATURE'], 't=%d,v1=%s');
$valid = abs(time() - $t) < 300
&& hash_equals(hash_hmac('sha256', $t.'.'.$payload, $secret), $v1);
MCP server
Address: https://api.reli.es/mcp · HTTP transport, same token as the API.
claude mcp add --transport http reli-es https://api.reli.es/mcp \ --header "Authorization: Bearer rl_live_…"
| Tool | Role |
|---|---|
liens_creer | Create one or more links |
liens_chercher | Search by destination, tag, status |
liens_stats | Statistics for a link or the account |
lien_modifier | Edit destination, title, tags, dates |
lien_archiver | Archive, with explicit confirmation |
page_lire · page_modifier | Read a bio page, add a link button |
qr_exporter | QR code SVG or PNG address |
compte_etat | Plan, limits and usage |