More than a shorter URL
A basic URL shortener API maps a short identifier to a destination. A webhook-enabled shortener also tells your application when that identifier is opened. yousnap.me lets you attach custom JSON at link creation, so the notification already includes the context your application needs.
For example, a campaign service can create a link with {"campaign":"fall-demo","placement":"poster-a"}. The destination remains the customer-facing page; your webhook receives the campaign fields. Use business identifiers rather than secrets or unnecessary personal information in the payload.
One request to create the link
const response = await fetch('https://usnp.me/shorten', {
method: 'POST',
headers: {
'X-API-Key': process.env.USNAP_KEY,
'Content-Type': 'application/json'
},
body: JSON.stringify({
redirect_url: 'https://example.com/offer',
data: { campaign: 'fall-demo', placement: 'poster-a' },
webhooks: ['https://your-app.example/hooks/scan']
})
});
if (!response.ok) throw new Error(await response.text());
const link = await response.json();
console.log(link.short_url);Run authenticated requests from your backend, where the API key can stay private. Get your key through self-service signup. Use the returned short URL in an email, printed QR code, or application interface. Direct visits and QR visits both open the same redirect endpoint.
API capabilities
| Task | Interface |
|---|---|
| Create a link with data and webhooks | POST /shorten |
| Open a shortlink | GET /{short_id} |
| Generate a PNG or SVG QR image | GET /{short_id}/qr |
| Inspect webhook delivery | GET /{short_id}/webhooks/status |
| Check quota usage | GET /usage |
See the interactive OpenAPI documentation for authentication, parameters, and response schemas. The written API reference also documents link management and analytics.
Free API access and production limits
Free includes 100 new links and 1,000 webhook deliveries per month, detailed analytics on up to five tracked links, and a 10-request-per-minute creation rate limit. Pro is $19/month with unlimited link creation, unlimited tracked links, 50,000 webhook deliveries per month, and a 60-request-per-minute creation limit.
API access is not a promise of unlimited throughput. Keep request pacing and quota checks in your integration. Read the rate-limit documentation before creating a large batch.
Build a reliable receiver
Verify the HMAC-SHA256 signature against the raw body and your webhook secret. Treat repeated delivery as possible, deduplicate by hit identifier, and queue slower work in your own application. yousnap.me makes up to three delivery attempts; inspect delivery status when troubleshooting.
How should I choose a shortlink API?
Compare the whole workflow: payload format, plan access to webhooks, monthly delivery allowance, rate limits, signature verification, and debugging tools. If you need enterprise collaboration, a visual link-in-bio editor, or sales attribution, evaluate those independently. Several competing shorteners support webhooks; the useful question is which API and plan fit your application.
Explore QR scan triggers, read the Bitly comparison, or follow the quickstart.