Skip to content

Guides

Step by step.

Short walkthroughs for the things people do most with 2xurl. Follow them in order, or jump to the one you need.

Last updated:

2. Connect a Custom Domain

Coming soon — custom domains are paused while we finish and test them. These are the steps it will take.

  1. 1Choose a domain or subdomain you control, such as go.yourbrand.com. A subdomain is easiest.
  2. 2In Domains, press Add domain and enter it.
  3. 3Create the DNS record 2xurl shows you at your DNS provider.
  4. 4Press Verify. DNS can take a few minutes to update; try again if it is not found yet.
  5. 5Once verified, HTTPS is set up automatically. Mark the domain as default to use it for new links.

3. Design a QR Code

  • Open a link and go to its QR code tab.
  • Pick colours and upload your logo. The preview updates as you go.
  • Download it in the format you need for print or screen.
  • Scans count as clicks, and you can change the destination later without reprinting.

4. Track a Campaign with UTMs

  • Create a campaign for the launch or promotion.
  • Create one link per channel (email, Instagram, WhatsApp…) and add it to the campaign.
  • Fill in the UTM fields — source, medium, campaign — so your own analytics tools see them too.
  • Open the campaign’s analytics to compare channels, or break clicks down by UTM source.

6. Import Links from CSV

  • Prepare a CSV with one destination URL per row, plus optional columns such as back-half and title.
  • In Links, choose Import and upload the file.
  • Review the result. Rows that fail (for example a back-half already taken) are reported so you can fix them.
  • Use Export to download all your links, with their short URLs, as CSV.

7. Invite Your Team

  • Open workspace settings and go to Members.
  • Invite people by email and choose a role: Viewer, Editor, Admin or Owner.
  • They join when they accept the invite. You can change roles or remove members at any time.

8. Make Your First API Call

  • In workspace settings, open API keys and create a key with the links.write scope.
  • Copy the key — it is shown only once. Keys start with 2x_.
  • Send it as a bearer token:
Create a short link
curl -X POST https://2xurl.com/api/v1/links \
  -H "Authorization: Bearer 2x_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"destinationUrl": "https://example.com/very/long/page", "slug": "launch"}'

The response includes shortUrl. See the API Reference for every endpoint and field.

9. Receive Webhooks

  • In Webhooks, add your endpoint URL and pick the events you want.
  • Each delivery is a JSON POST signed with your webhook secret in the X-2xurl-Signature header.
  • Verify the signature, then answer with a 2xx status quickly. Failed deliveries are retried.
Verify a delivery (Node.js)
import { createHmac, timingSafeEqual } from 'node:crypto';

function isValid(rawBody, header, secret) {
  const expected = 'sha256=' + createHmac('sha256', secret).update(rawBody).digest('hex');
  return header.length === expected.length && timingSafeEqual(Buffer.from(header), Buffer.from(expected));
}

10. Need More Help?

Read the Documentation, search the Help Center, or email [email protected].