Links
All endpoints need authentication. Base URL: https://api.revolink.link/apiv2.
Endpoints
| Method | URL | Permission | Description |
|---|---|---|---|
GET | /apiv2/links | links:read | List links |
POST | /apiv2/links | links:write | Create a link |
PUT | /apiv2/links | links:write | Create or update by slug |
GET | /apiv2/links/{id} | links:read | Get a link |
PATCH | /apiv2/links/{id} | links:write | Update a link |
DELETE | /apiv2/links/{id} | links:delete | Delete a link (permanent) |
POST | /apiv2/links/bulk | links:bulk | Create up to 100 links |
PATCH | /apiv2/links/bulk | links:bulk | Update up to 100 links |
DELETE | /apiv2/links/bulk | links:bulk | Delete up to 100 links |
Click analytics of a link: GET /apiv2/links/{id}/analytics.
List links
GET https://api.revolink.link/apiv2/links
| Query parameter | Description |
|---|---|
page, limit | Page (default 1) and page size (default 50, maximum 200) |
search | Substring of the name, slug or description |
domain | Short domain. Several separated by commas |
active | true or false |
tagIds | Tag IDs separated by commas |
sortBy | name, description, shortLink, clicks, active or createdAt (default) |
order | asc or desc (default) |
rql | A filter in the Revolink query language, see Advanced Filters |
curl "https://api.revolink.link/apiv2/links?search=sale&sortBy=clicks&order=desc" \
-H "Authorization: Bearer rvlnk_your_api_key_here" \
-H "X-Workspace-Id: your_workspace_id"
Create a link
POST https://api.revolink.link/apiv2/links
Send url for a link with one destination, or rules for smart routing (exactly one default rule). name defaults to the host of the destination, slug is generated when omitted, domain defaults to rvlnk.link and may be a verified domain of the workspace.
curl -X POST https://api.revolink.link/apiv2/links \
-H "Authorization: Bearer rvlnk_your_api_key_here" \
-H "X-Workspace-Id: your_workspace_id" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/spring-sale",
"slug": "spring",
"expirationDate": "2026-12-31T23:59:59Z"
}'
Response 201 Created: { "data": { …the link… } }.
Smart routing
{
"name": "App download",
"rules": [
{ "isDefault": true, "targetUrl": "https://example.com/download" },
{ "isDefault": false, "targetUrl": "https://apps.apple.com/app/id1", "device": ["mobile"], "os": ["iOS"] }
]
}
A rule can match on country, region, city, device, os, browser, locale, timeStart and timeEnd (HH:MM, UTC) and daysOfWeek (0 = Sunday). A rule may also have a password.
Other fields
description, active, tagIds, clicksLimit, expirationDate, expiredUrl, conversionTracking, gpsTracking, shareStats, abTest, ogTitle, ogDescription, appearanceColor, qrColor, qrBgColor, qrShowLogo. Types and limits of every field are in the interactive reference.
Create or update a link by slug
PUT https://api.revolink.link/apiv2/links
slug is required. If a link with this slug exists on this domain it is updated (its slug and domain stay) and the API answers 200. Otherwise it is created and the API answers 201.
Update a link
PATCH https://api.revolink.link/apiv2/links/{id}
Send only what changes.
urlreplaces the destination of the default rule.rules, when sent, replace all rules. Keep theidof every rule you want to keep: it preserves the statistics of that rule.tagIdsis the full list of tags. An empty array removes all tags.
curl -X PATCH https://api.revolink.link/apiv2/links/LINK_ID \
-H "Authorization: Bearer rvlnk_your_api_key_here" \
-H "X-Workspace-Id: your_workspace_id" \
-H "Content-Type: application/json" \
-d '{ "active": false }'
Bulk operations
| Request | Body |
|---|---|
POST /apiv2/links/bulk | { "links": [ …link objects as in create… ] } |
PATCH /apiv2/links/bulk | { "updates": [ { "id": "…", …fields to change… } ] } |
DELETE /apiv2/links/bulk | { "ids": [ "…", "…" ] } |
Each request takes 1 to 100 items. The response reports every item separately, see Errors and responses.