Create links with the API on your own domain

Pass domain or domain_id when you POST a link and it lands straight on go.yourbrand.com. The same verified domains you use in the dashboard.

The write API can put a link on any custom domain you've already verified - no extra setup beyond the DNS you did once in the dashboard. Add one field to your create/update body and the short link comes back on your domain instead of blnq.it. Custom domains need a paid plan; the write API needs a paid plan; if you have one, you have both.

Step 1: Verify the domain first

The API won't create a domain for you - it only uses ones that are already Live. Verify go.yourbrand.com in Settings → Custom domain (the TXT + CNAME steps in the "Set up a custom domain" guide). Once it shows Live you can target it from the API.

Step 2: Find the domain you want to target

List your verified domains to grab their ids and hostnames:

curl https://blnq.it/api/v1/domains \
  -H "Authorization: Bearer blnq_live_..."

Each row has an id (use it as domain_id) and a hostname like go.yourbrand.com (use it as domain). Either one works; you don't need both.

Step 3: Create the link on that domain

Pass domain (the hostname) when you POST:

curl -X POST https://blnq.it/api/v1/links \
  -H "Authorization: Bearer blnq_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/spring",
    "slug": "spring",
    "domain": "go.yourbrand.com"
  }'

Or pass domain_id instead, which is handy when a hostname might change:

curl -X POST https://blnq.it/api/v1/links \
  -H "Authorization: Bearer blnq_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/spring",
    "slug": "spring",
    "domain_id": "dom_..."
  }'

The response's short_url comes back as https://go.yourbrand.com/spring. Omit both fields and the link lands on blnq.it as usual.

Moving an existing link onto a domain

PATCH the same fields onto a link you already have. Slugs are scoped per domain, so the same slug can live on blnq.it and on your domain without clashing:

curl -X PATCH https://blnq.it/api/v1/links/spring \
  -H "Authorization: Bearer blnq_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "domain": "go.yourbrand.com" }'

Gotchas

  • 404 on the domain: it isn't verified/Live yet, or it isn't yours. Check GET /api/v1/domains.
  • 409 on the slug: that slug is already taken on that domain. Slugs are per-domain, so it may be free on blnq.it but taken on yours (or vice versa).
  • 403: your plan doesn't include the write API or custom domains. Both come with any paid plan.
  • On a team, you can target domains the owner has shared with the workspace, not just your own.