API documentationDashboard

0h.vc API

Create short links, read statistics and export data from your own apps. Responses are JSON. Errors look like {"error":"message"}.

Authentication

API keys are part of the Business plan. Create one in Dashboard › Settings, then send it on every request:

Authorization: Bearer 0h_your_key_here

Without a key, POST /api/links works anonymously on the Free plan (25 links per 30 days, rate limited per IP).

Create a link

curl -X POST https://0h.vc/api/links \
  -H "Authorization: Bearer 0h_your_key" -H "content-type: application/json" \
  -d '{"url":"https://example.com/long/page","alias":"spring-sale","tags":["promo"],
       "utm":{"source":"newsletter","medium":"email","campaign":"spring"}}'

201 {"id":42,"host":"0h.vc","code":"spring-sale","url":"https://example.com/long/page?utm_source=…","short":"https://0h.vc/spring-sale"}
FieldDescription
urlRequired. http or https destination, up to 2,048 characters.
aliasOptional custom ending: 3 to 30 letters, numbers, - or _.
hostOptional. A verified branded domain of yours. Default is the main domain.
tags, utmUp to 10 tags. UTM source, medium and campaign are added to the destination.
expiresAt, maxClicks, passwordPro and Business. ISO date, click limit, password for the link.
iosUrl, androidUrlPro and Business. Send iPhone or Android visitors to a different http(s) destination.

Create many links

Pro: 100 per request. Business: 500. Every row is checked and reported separately.

curl -X POST https://0h.vc/api/links/batch -H "Authorization: Bearer 0h_your_key" -H "content-type: application/json" \
  -d '{"tags":["launch"],"items":[{"url":"https://example.com/a","alias":"a-page"},{"url":"https://example.com/b","tags":["extra"]}]}'

{"created":2,"failed":0,"results":[{"row":1,"ok":true,"id":43,"short":"https://0h.vc/a-page","url":"https://example.com/a"}, …]}

List and search

GET /api/links?q=sale&tag=promo&status=active&sort=clicks&limit=50&offset=0
→ {"links":[{"id":42,"short":"…","url":"…","click_count":10,"status":"active","tags":["promo"],…}],"total":1,"tags":["promo"]}

Update and delete

PATCH  /api/links/42   {"url":"https://example.com/new","tags":["a"],"status":"disabled","expiresAt":null,"maxClicks":100}
DELETE /api/links/42
POST   /api/links/bulk {"ids":[1,2,3],"action":"tag","tag":"q3"}   # actions: enable, disable, delete, tag, untag (200 ids max)

Statistics and exports

GET /api/links/42/stats?days=30     → {"total":120,"daily":[{"day":"2026-10-01","clicks":4}],"country":[{"k":"US","n":40}],"device":[…],"browser":[…],"os":[…],"referrer":[…]}
GET /api/stats/overview?days=30     → account-wide totals, daily clicks, top links and breakdowns
GET /api/links/export.csv           → all your links as CSV (accepts q, tag, status)
GET /api/links/42/clicks.csv?days=30 → click log as CSV

History is limited by plan: 30 days Free, 12 months Pro, 24 months Business. Bots and link-preview crawlers are not counted.

Preview a link safely

Add a plus sign to any short link, for example https://0h.vc/spring-sale+, to see its destination without being redirected or counted.

Limits

Link creation is limited to 20 requests per minute per IP, bulk import to 10 per hour, exports to 10 per minute. Free-plan links show an ad page before redirecting; Pro and Business links redirect immediately.