Authentication
Every request to API v2 needs two things: an API key and the workspace it works in.
Base URL
https://api.revolink.link/apiv2
The OpenAPI 3.1 specification is served at https://api.revolink.link/apiv2/openapi.json and interactive documentation at https://api.revolink.link/apiv2/docs.
Getting your credentials
- Open the Revolink app and go to Profile → API.
- Create an API key and pick the permissions it needs. Copy the key: it is shown only once.
- Copy the ID of your workspace.
Sending the API key
Send the key as a Bearer token. The X-Api-Key header is accepted as well.
Authorization: Bearer rvlnk_your_api_key_here
Sending the workspace
Send the workspace ID in the X-Workspace-Id header on every request. The owner of the key must be a member of the workspace.
Unlike API v1, the workspace is only read from this header, never from the request body or the query string.
curl https://api.revolink.link/apiv2/me \
-H "Authorization: Bearer rvlnk_your_api_key_here" \
-H "X-Workspace-Id: your_workspace_id"
GET /me returns the user, the workspace and the permissions of the key, which makes it a good first request to check your setup.
Permissions
A key carries permissions (scopes). An endpoint answers 403 with error.requiredPermission when the key does not have the one it needs.
| Permission | Allows |
|---|---|
links:read | List and get links |
links:write | Create, upsert and update links |
links:delete | Delete a link |
links:bulk | Bulk create, update and delete (up to 100 links per request) |
analytics:read | Click analytics |
tags:read / tags:write / tags:delete | Read, create and update, delete tags |
domains:read / domains:write / domains:delete | Read, add, delete custom domains |
Rate limit
300 requests per minute per API key. Over the limit the API answers 429 with a Retry-After header.
See Errors for the error format and codes.