On this page
Authentication
All management API endpoints require API key authentication. Every request must supply two things: an API key in the request header and a Workspace ID in the request body or query string.
Base URL
https://api.revolink.link/apiv1/
Getting Your Credentials
- Open the Revolink app and go to Profile → Integrations.
- Click Generate API Key. Copy and save the key — it is shown only once. If you lose it, regenerate a new one (the old key is invalidated immediately).
- Copy your Workspace ID from the same page.
Sending the API Key
Pass the key in the X-Api-Key header on every request:
X-Api-Key: rvlnk_your_api_key_here
Sending the Workspace ID
Include workspaceId on every request:
- POST / PUT / DELETE — in the JSON request body.
- GET — as a query parameter.
bash
# POST example
curl -X POST https://api.revolink.link/apiv1/link/create \
-H "Content-Type: application/json" \
-H "X-Api-Key: rvlnk_your_api_key_here" \
-d '{
"workspaceId": "your_workspace_id",
"name": "My link",
"rules": [
{
"id": "rule-1",
"targetUrl": "https://example.com",
"isDefault": true
}
]
}'
Authentication Errors
| HTTP Status | Response Body | Cause |
|---|---|---|
401 | {"error": "API key is required. Pass it in the X-Api-Key header."} | X-Api-Key header is missing |
401 | {"error": "Invalid API key."} | Key does not match any user |
400 | {"error": "workspaceId is required."} | workspaceId not provided |
400 | {"error": "Invalid workspaceId format."} | workspaceId is not a valid ObjectId |
404 | {"error": "Workspace not found."} | No workspace with this ID exists |
403 | {"error": "You do not have access to this workspace."} | The API key owner is not a member or owner of the workspace |
403 | {"licenseExpired": true, "error": "The workspace license has expired."} | The workspace plan has expired |