Skip to content
On this page

Errors and responses

Success

A successful response wraps the result in data. Lists add pagination.

json
{
  "data": [ { "id": "…", "slug": "spring", "shortLink": "https://rvlnk.link/spring" } ],
  "pagination": { "page": 1, "limit": 50, "total": 1 }
}

Errors

Errors come with a matching HTTP status and always have this shape:

json
{
  "error": {
    "code": "conflict",
    "message": "This slug is already taken."
  }
}
HTTPcodeMeaning
400invalid_requestThe request is wrong. message says what.
401unauthorizedNo key, or an invalid or expired key.
403forbiddenThe key lacks a permission (error.requiredPermission), or the role of the key's owner cannot do this.
403license_limit_reachedA limit of the plan is reached. error.licenseLimitReached is true. error.licenseExpired is true when the plan has expired.
404not_foundNo such item in this workspace.
409conflictAlready exists, for example a taken slug or tag name.
429rate_limitedMore than 300 requests a minute for the key. See Retry-After.
5xxinternal_errorSomething went wrong on our side.

Bulk requests

Bulk create, update and delete return HTTP 200 and report each item separately. One failed item does not stop the others. A failed item has error and a code (the same codes as above), plus index (position in the request array, for create) or id (for update and delete).

json
{
  "data": {
    "created": [ { "id": "…", "slug": "a1", "shortLink": "https://rvlnk.link/a1" } ],
    "failed": [ { "index": 1, "error": "This slug is already taken.", "code": "conflict" } ]
  }
}

Pagination

GET /links takes page (default 1) and limit (default 50, maximum 200).