Skip to content
On this page

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

  1. Open the Revolink app and go to Profile → API.
  2. Create an API key and pick the permissions it needs. Copy the key: it is shown only once.
  3. 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.

bash
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.

PermissionAllows
links:readList and get links
links:writeCreate, upsert and update links
links:deleteDelete a link
links:bulkBulk create, update and delete (up to 100 links per request)
analytics:readClick analytics
tags:read / tags:write / tags:deleteRead, create and update, delete tags
domains:read / domains:write / domains:deleteRead, 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.