Skip to main content
Five things behave consistently across the whole API. Knowing them up front saves rediscovering each one through a confusing response.

1. Everything is wrapped

Success puts the payload under data. Failure puts the problem under error. They never both appear, so one check handles every endpoint:
Branch on error.code, not error.message — messages get reworded and translated, codes do not. See Errors.

2. Deletion is bulk-only

There is no single-resource delete for links, QR codes or UTM templates. To delete one, send an array of one:
This means one code path and one result shape whether you are deleting one thing or a thousand. See Bulk operations.
Campaigns and domains are the exceptions — they have ordinary single deletes, because deleting them in bulk is not a thing anyone does.

3. Writes are form-encoded

POST bodies are application/x-www-form-urlencoded, or multipart/form-data when a file is involved. Not JSON. Array and object parameters are sent as JSON-encoded strings inside the form:
The multipart endpoints are the ones that can carry an image: create_shortlink, update_shortlink, create_dynamic_link, update_dynamic_link, create_qr_code, edit_qr_code, and the two upload endpoints.

4. Lists paginate the same way

page and per_page in, four counts back:
per_page maxes at 100 and is clamped rather than rejected, so read back the value you were actually given. Loop until current_page >= total_pages. See Pagination.

5. Not-yours looks like not-found

Asking for a resource that belongs to another organization returns 404, not 403. A 403 would confirm the id exists, which is all anyone needs to discover other customers’ resources by trying ids until the status changes. So a 404 means one of two things, and the API will not tell you which.

Identifiers

Resources are referred to by their name — a generated id such as SHORT-0001, not the short URL: The back_half is the path in the URL and is not an identifier — it can be changed, and two links on different domains can share one.

Dates

YYYY-MM-DD everywhere. Analytics windows are inclusive of both date_from and date_to, and are bounded by your plan’s retention window.