Developer guide: shorten links programmatically with the API

Deciding whether the API fits? What the API does, and its rate limits. It is on every plan, the free one included.

When you're creating links at volume (from a CMS, an internal tool, or a script) you don't want to click a form. The Urlicer API lets you create and manage short links straight from your own code.

Get a key

Generate an API key under Developers in the app (/app/<workspace>/api-keys). The workspace Owner or an Admin can create keys. Keys look like url_live_…, are scoped to that workspace, and are sent as a Bearer token:

Authorization: Bearer url_live_your_key_here

Create a link

A single POST creates a short link and returns it:

curl -X POST https://urlicer.com/api/v1/links \
  -H "Authorization: Bearer url_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/very/long/path"}'

To choose the code yourself, add "alias":"spring" to the body. Custom aliases need Pro or above. On the free plan that request is refused with a 403 and {"error":"feature","key":"CustomAliases","upgrade":true}.

The rest of the endpoints

  • POST /api/v1/links: create a link.
  • POST /api/v1/links/bulk: create up to 10,000 links in one request. Bulk creation needs Pro or above; bulk-shortening from a spreadsheet shows the same thing without code.
  • GET /api/v1/links: list your links.
  • GET /api/v1/links/{code}: fetch one.
  • PATCH /api/v1/links/{code}: update the destination or settings.
  • DELETE /api/v1/links/{code}: remove one.

Good to know

Requests are rate-limited per plan, and everything is workspace-scoped to the key. Full request and response details live in the API docs. The API is included in every plan, the free one included. What changes with your plan is how many requests each key may make per minute, how many keys you can hold, and which link features (custom aliases, expiry, passwords, branded domains, bulk) those keys can use; see pricing.

The API is on every plan, free included. Create a free account and make a key under Developers.