Skip to content

Documentation

API reference

Authentication, the endpoints that exist today, and the error responses you should expect.

This page covers the endpoints you call with a secret key, from your own server. The endpoints your app calls with a publishable key — resolving a link, reporting an install, and erasing everything held about one installation — are on Native and REST.

Base address

All requestshttp
https://app.quberoute.com/api/v1

Authentication

A bearer token in the Authorization header. Keys look like qr_sk_live_… or qr_sk_test_… — the environment is in the key itself, so one pasted into the wrong configuration is obvious on sight, and a live key committed to a public repository is recognisable to automated scanners.

Every requestbash
curl https://app.quberoute.com/api/v1/app \
  -H "Authorization: Bearer qr_sk_live_YOUR_KEY"

A key belongs to one app and one environment and cannot be moved between them. The server reads both from the key row it just authenticated, never from the request — which is why the endpoint below takes no parameters at all.

Revocation takes effect on the very next request. Nothing is cached anywhere: not in memory, not in a session, not at the edge.

GET /api/v1/app

Returns the app the presented key belongs to.

Request and responsebash
curl https://app.quberoute.com/api/v1/app \
  -H "Authorization: Bearer qr_sk_live_YOUR_KEY"

200 OK
{
  "app": {
    "id": "0d6f1a3c-2f4b-4c8e-9a1d-7b2c6e5f0a11",
    "name": "Northwind Retail",
    "subdomainKey": "71k8c",
    "linkHost": "71k8c.qbrt.app"
  },
  "environment": "live"
}

GET /api/v1/apps/{appId}

The same data, addressed by identifier. The identifier in the path is compared against the one on your key, and anything else is a 404.

Asking for an app that is not yoursbash
curl https://app.quberoute.com/api/v1/apps/SOMEONE_ELSES_ID \
  -H "Authorization: Bearer qr_sk_live_YOUR_KEY"

404 Not Found
{ "error": "not_found", "message": "No such resource." }

404, not 403. “Forbidden” would confirm the app exists and belongs to somebody, which is enough to work out who our customers are. “Not found” says nothing.

POST /api/v1/links

Creates a link. It takes no app or environment parameter: both come off the key you authenticated with, so nothing in a request to this endpoint can reach another app, another customer, or the other environment of the same app.

Only webFallbackUrl is required. Everything else is optional, including deepLinkData — an alias you do not supply is generated for you.

FieldRules
webFallbackUrlRequired. Absolute, http or https. Where somebody without the app installed ends up.
deepLinkDataA JSON object, handed to your app when the link opens it. Up to 8,000 characters once serialised.
aliasLetters, digits, - and _, starting with a letter or digit; 128 characters. Unique within the app and environment. Some words are reserved. It cannot be changed afterwards.
title, campaign, channel, feature200 characters each.
tagsUp to 25, each 60 characters. Anything beyond that is dropped silently — you get a 201 and fewer tags than you sent.
expiresAtISO 8601, for example 2026-12-31T23:59:59Z. After it passes, the link stops opening the app and resolves to webFallbackUrl instead. It does not start erroring and it does not stop resolving — the same behaviour as archiving, and for the same reason: a link may be printed on something nobody can recall.
iosFallbackUrlOptional. When it is set, iOS goes here instead of the App Store: it takes precedence over both the App Store address from the app’s iOS settings and webFallbackUrl, so a link that carries it will never send anybody to the App Store. Leave it null to use the App Store address. There is no Android equivalent — Android uses webFallbackUrl.
Creating a linkbash
curl -X POST https://app.quberoute.com/api/v1/links \
  -H "Authorization: Bearer qr_sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "spring-sale",
    "deepLinkData": { "path": "/offers/spring" },
    "webFallbackUrl": "https://example.com/offers/spring"
  }'

201 Created
{
  "link": {
    "id": "0f9c…",
    "alias": "spring-sale",
    "url": "https://71k8c.qbrt.app/spring-sale",
    "environment": "live",
    "title": null,
    "deepLinkData": { "path": "/offers/spring" },
    "webFallbackUrl": "https://example.com/offers/spring",
    "iosFallbackUrl": null,
    "campaign": null,
    "channel": null,
    "feature": null,
    "tags": [],
    "expiresAt": null,
    "archivedAt": null,
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z"
  }
}
The host of the returned url is your app's subdomainKey — 71k8c above, from GET /api/v1/app — and never your key. In the test environment it carries a -test suffix: 71k8c-test.qbrt.app.

POST /api/v1/links/batch

Creates up to 100 links in one request. The body is { "links": [ … ] }, where each entry takes exactly the fields above. Built for generating a link per message when you send email or SMS, which is the one thing the single endpoint made tedious.

One bad entry does not reject the others, so read the status code. 201 means every link was created. 207 means some were and some were not, and the results array says which by index. 422 means the request itself was wrong — not an array, empty, over 100, or holding something that is not an object — and nothing was created. If you only ever check for 201, you will never mistake a partial batch for a whole one.

Retrying is safe only if you supply your own aliases. An alias you supply is refused as a duplicate the second time, so resending the same batch creates nothing new. Aliases we generate are different every time, so a batch of those sent twice gives you two sets of links. There are no idempotency keys; supplying aliases is the answer.

If your rate limit or plan quota runs out part way through, the batch stops there and the response still lists every link already created, with stoppedEarly explaining it. Those links exist — retry only the entries reported as rate_limited or counted in notAttempted, or you will create the earlier ones twice.

Creating a batchbash
curl -X POST https://app.quberoute.com/api/v1/links/batch   -H "Authorization: Bearer qr_sk_live_YOUR_KEY"   -H "Content-Type: application/json"   -d '{
    "links": [
      { "alias": "may-newsletter-1",
        "deepLinkData": { "path": "/offers/may" },
        "webFallbackUrl": "https://example.com/offers/may" },
      { "alias": "may-newsletter-1",
        "webFallbackUrl": "https://example.com/offers/may" }
    ]
  }'

207 Multi-Status
{
  "created": 1,
  "failed": 1,
  "notAttempted": 0,
  "results": [
    { "index": 0, "ok": true, "link": { "alias": "may-newsletter-1", "…": "…" } },
    { "index": 1, "ok": false, "error": "validation_failed",
      "message": "That alias is already in use.",
      "fieldErrors": { "alias": "Already in use." } }
  ]
}
207 rather than 201, because the second entry was refused. The first link exists and the response says so.

GET /api/v1/links

Lists this app’s links in this environment, newest first. Query parameters: search, tag, status (active, archived, expired; the default is all of them), sort (newest, oldest, alias, clicks), page and perPage, which defaults to 25 and is capped at 200 — ask for more and you get 200, without an error, so page from pagination rather than from the perPage you asked for.

An unrecognised status or sort falls back to the default rather than failing, so a typo returns results rather than an error.

Listing linksbash
curl "https://app.quberoute.com/api/v1/links?status=active&perPage=2" \
  -H "Authorization: Bearer qr_sk_live_YOUR_KEY"

200 OK
{
  "links": [
    {
      "id": "0f9c…",
      "alias": "spring-sale",
      "url": "https://71k8c.qbrt.app/spring-sale",
      "clickCount": 128
    }
  ],
  "pagination": { "page": 1, "perPage": 2, "total": 1, "pageCount": 1 }
}
Each link carries the same fields as the create response, plus clickCount. Abridged here.

GET /api/v1/links/{linkId}

One link, by identifier. The identifier is matched together with the app and environment from your key, so an id belonging to somebody else — or to the same app’s other environment — matches nothing and the answer is 404.

PATCH /api/v1/links/{linkId}

Edits a link. Send only the fields you are changing; the rest are left as they were. The response is the whole link as it now stands.

alias cannot be changed. It is the address, and it may already be printed on something. Sending a different one is a 422 with fields.alias set. Create a second link instead.

DELETE /api/v1/links/{linkId}

This archives the link. It does not delete it. The verb is DELETE because that is what a REST client expects for “take this out of service”, but the link goes on resolving to its web fallback for ever — it may be printed on something nobody can recall. The response returns the link and a note saying so, rather than a bare 204.

Two consequences follow, and neither can be undone. The alias stays taken — archiving spring-sale does not free it for next spring, and recreating it is a 422. There is no unarchive. Nothing in the API or the dashboard brings an archived link back.

Where a link actually sends somebody

This table is generated. Every row below is produced by calling the same function the live redirect calls, and the explanation in each row is that function’s own sentence, word for word — the one the link debugger shows you. It is not a description of the behaviour that somebody has to remember to update; it is the behaviour, printed.

Read down the list and stop at the first row that matches your situation. That is what the code does, in that order.

SituationPlatformOutcomeWhere it goes, and why
The link has passed its expiry dateiosexpired_fallbackhttps://example.com/spring-saleThis link has passed its expiry date, so it no longer opens the app. It still resolves to the web fallback rather than showing an error.
The link has been archivedandroidexpired_fallbackhttps://example.com/spring-saleThis link has been archived, so it no longer opens the app. It still resolves — to the web fallback — because a link may be printed on something nobody can recall.
iOS, and the link carries its own iOS fallbackiosios_fallbackhttps://example.com/ios-landingiOS, and this link has its own iOS fallback address, which takes precedence over the App Store and the web fallback.
iOS, no iOS fallback on the link, App Store address configurediosapp_storehttps://apps.apple.com/app/id123456789iOS, iOS is switched on for this app, and an App Store address is configured. Reaching this point means the app did not take the link, so the visitor is sent to install it.
iOS, but iOS is switched off for the appiosweb_fallbackhttps://example.com/spring-saleiOS, but iOS is not switched on for this app, so there is nothing to send the visitor to except the web fallback.
iOS, switched on, but no App Store address savediosweb_fallbackhttps://example.com/spring-saleiOS, but no App Store address is configured for this app and this link has no iOS fallback, so the visitor gets the web fallback.
Android, Play Store address configured, referrer token mintedandroidplay_storehttps://play.google.com/store/apps/details?id=com.example.app&referrer=qr%3Drt_exampleAndroid, and the app is not installed, so the visitor goes to the Play Store with an install referrer attached. When they open the app, Google hands it that referrer and the install is matched exactly.
Android, Play Store configured, no referrer token for this clickandroidplay_storehttps://play.google.com/store/apps/details?id=com.example.appAndroid, and the app is not installed, so the visitor goes to the Play Store. No install referrer was minted for this click, so the install will not be attributed.
Android, but Android is switched off for the appandroidweb_fallbackhttps://example.com/spring-saleAndroid, but Android is not switched on for this app, so there is nothing to send the visitor to except the web fallback.
A desktop browser, where there is no app to openwebweb_fallbackhttps://example.com/spring-saleA desktop or unrecognised browser, which cannot open a mobile app, so the visitor gets the web fallback.

Three outcomes are not in that table because the decision never reaches them: a link preview fetcher is answered before any of this runs, an unknown alias is a 404, and a failure is a 500. The addresses above are examples; the referrer on the Play Store row is where your install referrer is attached at the moment of the click.

Errors

Every failure is { "error": <slug>, "message": <text> }. Branch on the slug; the message is for a person.

  • 400 invalid_body — the request body is not valid JSON, or is not a JSON object. Nothing was read.
  • 401 unauthorised — the key is missing, malformed, unknown or revoked. All four give the same answer, deliberately.
  • 404 not_found — the thing does not exist, or it is not yours. These are the same response, deliberately.
  • 409 conflict — the change conflicts with the link’s current state; archiving one that is already archived, for instance.
  • 422 invalid_request — the body was read and rejected. It carries a fields object naming each field that failed, so a form can show the errors beside the inputs rather than as one sentence.
    A 422 with no fields, and a message about your plan, means you have reached your link allowance. Nothing is wrong with the request — do not go looking for it.
  • 429 rate_limited — too many link creations. Honour the Retry-After header; see Rate limits below.

400 and 422 are next to each other and mean opposite things: invalid_body is “we could not read it”, invalid_request is “we read it and it is wrong”.

Creating links is limited to 300 an hour per app. Over that, the API answers 429 with a Retry-After header giving the seconds to wait — honour it rather than retrying immediately, and a bulk import of more than that should pace itself. Reads are not limited.

Versioning

The version is in the path. Breaking changes appear in the changelog.

Ask the documentation

It answers from these pages only, and links what it used. If the answer is not here it says so rather than guessing — then email [email protected].

← All documentation