Developers
Short links from your own code
Make, change and measure links with a JSON API, and hear about every click as it happens. Each call meets the same checks, permissions and plan limits as everything else in Brevily.
What the API can do
Links
Create, list, read, change, disable and delete short links: the destination, your own back-half and domain, tags, a go-live date and an expiry, a click limit, a password, UTM tags and the preview a chat shows. Disable, enable or delete up to 100 at once.
QR codes
The code for any link, as SVG or PNG, plain or in your colours with your logo.
Analytics
Each link’s clicks day by day, its unique visitors and QR scans, and where they came from: countries, devices, browsers, systems and referrers. On paid plans, single clicks export as CSV.
Tags
Tag links by person, team, campaign, channel, product or region, and read the numbers by tag.
Events
Report a sign-up, an install or a sale against the click that led to it, and see what each link earned. A sale, with its amount and your own order id, comes from your server; a web page or an app reports the rest with its own key.
Domains and routing
Read your domains, send a link’s visitors to different pages by device, country, region or time, split them between destinations, and open your app with a deep link.
Webhooks
A signed JSON POST to your server when something happens. Each webhook picks the events it receives; a delivery your server misses is tried again, 6 tries in all over about 7 hours.
Clicks
link.clickA person followed a link. Bots and link previews are never sent.
Links made
link.createdA link was made, by a person, the API or an import.
Destinations changed
link.updatedA link’s destination changed, by an edit or a scheduled change going live.
Links expired
link.expiredA link reached its expiry date or its click limit.
Links broken
link.brokenA link’s destination stopped answering: gone, a redirect loop, or a server error or no answer twice running.
Events
event.reportedA sale, an install, a lead or an event of your own was reported.
Signed, so you can check it. Every delivery carries a signature made with the webhook’s own secret, its time included, so your server can refuse anything that did not come from Brevily, or that is more than 5 minutes old. Or straight to Google Analytics. Send each click to a Google Analytics 4 property as well, or instead, as an event with its link, country, device and referrer.
Keys, signatures and limits
Every call with its fields and answers, the webhook body and every error is in the reference.
An API key per job
A key belongs to the organisation or to one person, holds only the permissions it needs and never more than whoever made it, and expires when you choose. Rolling or revoking one takes a click.
Two headers, or a signature
Each call carries the key’s ID and secret in two headers, or a signature made with the secret (HMAC-SHA256 over the request and a one-time nonce), so the secret never travels and a captured call cannot be replayed.
Limits you can read
Calls count per minute and per day against the plan, shared by the organisation’s keys, and every answer says how many are left and when they reset.
Safe to retry
Send an Idempotency-Key with a create or a change and a retry runs once: the first answer comes back again, never a second link.