Urlicer API v1

Links

Create, list, read, update and delete short links.

Everything a link integration needs lives under one resource. Create a link, read it back, change where it points, switch it off, delete it. All five endpoints take and return the same link object, so once you have parsed one response you have parsed them all.

The examples on this page are real calls, captured against our own API and reprinted with the public host and a placeholder key. Responses are shown pretty-printed for reading; on the wire they are compact.

Using every option at once

A create request can carry a custom alias, an expiry, a password and one of your own domains together. Each of those is a paid feature, and each is checked separately, so a request that asks for two features you have and one you do not is refused for the one you do not, and creates nothing.

Request
curl -X POST "https://urlicer.com/api/v1/links" \
  -H "Authorization: Bearer url_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/spring-sale",
  "alias": "spring-sale",
  "expiresOn": 1790000000,
  "domain": "go.example.com"
}'
Response
{
  "short": "https://go.example.com/spring-sale",
  "code": "spring-sale",
  "domain": "go.example.com",
  "url": "https://example.com/spring-sale",
  "clicks": 0,
  "active": true,
  "expiresOn": 1790000000,
  "createdOn": 1787314771
}

Times and click counts

Every time in a response is unix seconds in UTC, including createdOn and expiresOn, and including the expiry you send when creating a link. Milliseconds will be read as a date tens of thousands of years from now, which is a valid expiry and will not be rejected, so it is worth checking that conversion first when an expiry behaves oddly.

clicks is read live at the moment you ask, from the same counter the redirect itself increments, so it includes clicks from seconds ago. It counts redirects served, which is not the same as people: one person following a link twice is two clicks, and a link opened from a preview-generating chat app may be counted without anyone having read it.