Webb.in Developer API
Programmatically create, manage, and track short URLs with the Webb.in REST API. Build integrations, automate URL management, and embed URL shortening into your applications.
RESTful API
Standard JSON requests & responses with predictable resource-oriented URLs.
Fast & Reliable
Built on enterprise serverless infrastructure with global edge caching for sub-50ms redirects.
Rich Analytics
Track clicks, referrers, and daily trends for every short URL you create.
Base URL
https://api.webb.in/api/v1
All API endpoints are relative to this base URL.
π§ͺ Try the API live
Interactive reference for every endpoint, with a public sandbox key β no account needed.
Authentication
Authenticate with the API using an API key. Include your key in the Authorization header of every request:
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Getting your API key: Sign in to your Developer Dashboard and generate a new key. You can create up to 5 keys per account.
Key format: All API keys start with sk_live_ followed by 32 characters.
Keep your API key secure
Never expose your API key in client-side code, public repositories, or browser requests. Always use it server-side. If a key is compromised, revoke it immediately from your dashboard.
Rate Limits
API requests are rate-limited based on your account quota. Every response includes headers to help you track your usage:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed per day |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | UTC timestamp when the limit resets (midnight UTC) |
When you exceed your rate limit, the API returns a 429 Too Many Requests status. Default quota is 100 URLs per day. Contact us if you need a higher limit.
Abuse protection limits (per IP address)
Independently of your API quota, some public endpoints are limited per client IP address to stop password guessing, spam and floods. These apply to everyone, signed in or not:
| Requests | Limit per IP |
|---|---|
| Sign-in, sign-up, password reset, email verification, two-factor checks | 10 per minute, 50 per hour |
Anonymous shortening (POST /api/public/shorten) | 10 per minute, 100 per day |
| Password-protected link checks | 20 per minute, 100 per hour |
Organisation single sign-on (/api/auth/sso/β¦) | 30 per minute, 200 per hour |
| Short-link visits (redirects) | about 300 per minute |
API sandbox key (sk_test_webbin_sandbox) | 100 per day |
| Whole service (all clients together) | 500 requests per second, bursts up to 1,000 |
Over a limit you get 429 with a Retry-After header (seconds) and an X-RateLimit-Policy header naming the limit. Wait that long before retrying, and back off further on repeated 429s.
Single sign-on & SCIM provisioning
On the Business and Enterprise plans an organisation (a Webb.in team) can sign its people in through its own identity provider with SAML 2.0, require it, and let the identity provider create, update and remove members with SCIM 2.0. Set it up in the portal under Teams β Single sign-on & provisioning.
SAML 2.0
- Verify each email domain with a DNS TXT record
_webbin-sso.yourcompany.com. Only emails on verified domains can sign in or be provisioned; a domain belongs to one organisation. - Entity ID / audience:
https://api.webb.in/api/auth/sso/<teamId>; ACS (HTTP-POST):β¦/acs; metadata:β¦/metadata; sign-in link:β¦/login. - Responses must be signed with the certificate you configure. Issuer, audience, destination/recipient, lifetime and one-time use are all checked. Both SP- and IdP-initiated sign-in work.
- The email comes from the NameID or an
email/mailattribute;displayNameor given/surname set the member's name. - With Require SSO on, members can't use passwords or Google/GitHub sign-in and their existing sessions end. The team owner is exempt so the organisation can't be locked out. API keys keep working.
SCIM 2.0
Base URL https://api.webb.in/scim/v2, authenticated with the bearer token created in the portal (shown once; creating a new one replaces it). Responses use application/scim+json.
| Endpoint | Notes |
|---|---|
| GET/POST /Users, GET/PUT/PATCH/DELETE /Users/{id} | id is the Webb.in username, userName the email. Filters: userName eq "β¦", externalId eq "β¦". Creating a user links an existing account or creates an SSO-only one. |
| active: false / DELETE | Removes access at once: the person's sessions end, and accounts the organisation created are deactivated (no sign-in or API access). Links are kept. |
| GET/POST /Groups, GET/PUT/PATCH/DELETE /Groups/{id} | Groups are roles: Admin, Member, Viewer and your custom roles. Adding a member to a group gives them that role; new groups become custom roles with view-only permissions until an admin edits them. |
| GET /ServiceProviderConfig, /ResourceTypes | PATCH and filtering supported; bulk, sorting and ETags aren't. |
Custom roles
Besides Owner, Admin, Member and Viewer, an organisation can define roles from these permissions: team.manage, members.view, members.manage, roles.manage, links.view, links.create, links.approve, audit.view, security.manage, sso.manage. Nobody can grant a permission they don't hold.
Audit log export & SIEM streaming
An organisation's audit log covers team actions (settings, members, roles, SSO, links, approvals) and everything done by accounts the organisation created. View it or download a CSV under Teams β Security & audit (audit.view), or stream new events within seconds to up to five destinations (security.manage):
- Splunk HTTP Event Collector β
POST <url>/services/collector/event,Authorization: Splunk <token>, sourcetypewebbin:audit. - Datadog Logs β
https://http-intake.logs.<site>/api/v2/logswithDD-API-KEY,ddsource:webbin. - Signed webhook (any SIEM) β JSON
{"source","team","events":[β¦]}withX-Webb-Signature: sha256=HMAC(secret, body)andX-Webb-Event: audit.events.
Each event: id, timestamp, actor, action, resourceType, resourceId, details, teamId, team, source. Destinations must be public HTTPS endpoints. Use "Send test" to check a connection and "Resend" to replay a time range (up to 31 days).
Link approval & IP allowlists
- Link approval β with it on, team links from members without
links.approveare created switched off (visiting them returns 404 "waiting for approval") until approved in the portal. - Organisation allowlist β members can only use the team's resources from the listed addresses/CIDR ranges, and accounts the organisation created can only use Webb.in at all from them. The owner is exempt.
- Account allowlist β under Security, anyone can restrict sign-in, the portal and their API keys to listed addresses. Requests from elsewhere get
403with"ipNotAllowed": true.
Error Handling
All API responses use a consistent envelope format. Errors include a machine-readable code and a human-friendly message.
{
"success": false,
"error": {
"code": "INVALID_URL",
"message": "The provided URL is not valid."
}
}
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
INVALID_URL | 400 | The target URL is not valid or is missing |
PATH_EXISTS | 409 | The requested custom path is already taken |
DESTINATION_BLOCKED | 400 | The destination failed the link-safety check (error.reason: scheme, blocklist, threat_feed, shortener, loop, lookalike or slug) |
URL_NOT_FOUND | 404 | Short URL not found or you do not own it |
QUOTA_EXCEEDED | 429 | Daily quota has been exhausted |
INVALID_API_KEY | 401 | API key is missing, invalid, or revoked |
FORBIDDEN | 403 | You do not have access to this resource |
BULK_LIMIT | 400 | Bulk request exceeds max of 100 URLs |
INTERNAL_ERROR | 500 | An unexpected server error occurred |
Endpoints
Complete reference for all API endpoints.
| Method | Endpoint | Description |
|---|---|---|
| POST | /urls | Create a short URL |
| GET | /urls | List your URLs |
| GET | /urls/{domain}/{path} | Get URL details |
| PATCH | /urls/{domain}/{path} | Update a URL |
| DELETE | /urls/{domain}/{path} | Delete a URL |
| GET | /urls/{domain}/{path}/stats | Get click statistics |
| POST | /urls/bulk | Create multiple URLs |
| GET | /account | Get account info & quota |
Create Short URL
/urlsCreate a new short URL. If customPath is not specified, a random short code will be generated.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Required | The destination URL to shorten |
customPath | string | Optional | Custom short path (3-50 chars, alphanumeric + hyphens) |
title | string | Optional | A descriptive title for the URL |
domain | string | Optional | Domain to use (default: webb.in) |
{
"success": true,
"data": {
"domain": "webb.in",
"path": "my-link",
"shortUrl": "https://webb.in/my-link",
"targetUrl": "https://example.com/very/long/path",
"title": "My Example Link",
"clickCount": 0,
"isActive": true,
"createdAt": "2025-01-15T10:30:00Z"
}
}List URLs
/urlsRetrieve a paginated list of your short URLs.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | Optional | Number of results per page (default: 20, max: 100) |
offset | integer | Optional | Number of results to skip (default: 0) |
{
"success": true,
"data": {
"urls": [{ "domain": "webb.in", "path": "my-link", "shortUrl": "https://webb.in/my-link", "targetUrl": "https://example.com/very/long/path", "title": "My Example Link", "clickCount": 142, "isActive": true, "createdAt": "2025-01-15T10:30:00Z" }],
"pagination": { "total": 47, "limit": 20, "offset": 0, "page": 1, "totalPages": 3 }
}
}Get URL Details
/urls/{domain}/{path}Retrieve details for a specific short URL including click count and metadata.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | The domain (e.g., webb.in or your custom domain) |
path | string | Required | The short path |
{
"success": true,
"data": { "domain": "webb.in", "path": "my-link", "shortUrl": "https://webb.in/my-link", "targetUrl": "https://example.com/very/long/path", "title": "My Example Link", "clickCount": 142, "isActive": true, "createdAt": "2025-01-15T10:30:00Z" }
}Update URL
/urls/{domain}/{path}Update the target URL, title, or active status of an existing short URL.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
targetUrl | string | Optional | New destination URL |
title | string | Optional | New title |
isActive | boolean | Optional | Enable or disable the URL |
{
"success": true,
"data": { "domain": "webb.in", "path": "my-link", "shortUrl": "https://webb.in/my-link", "targetUrl": "https://new-destination.com", "title": "Updated Title", "clickCount": 142, "isActive": true, "createdAt": "2025-01-15T10:30:00Z" }
}Delete URL
/urls/{domain}/{path}Permanently delete a short URL. This action cannot be undone. The short path will become available for reuse.
{
"success": true,
"data": { "message": "URL deleted successfully" }
}URL Statistics
/urls/{domain}/{path}/statsRetrieve click analytics for a short URL, including daily click counts and top referrers.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
days | integer | Optional | Number of days of history (default: 7, max: 90) |
{
"success": true,
"data": {
"domain": "webb.in", "path": "my-link", "totalClicks": 1247,
"dailyClicks": [{ "date": "2025-01-15", "clicks": 89 }, { "date": "2025-01-14", "clicks": 156 }, { "date": "2025-01-13", "clicks": 72 }],
"topReferrers": [{ "referrer": "twitter.com", "clicks": 523 }, { "referrer": "github.com", "clicks": 312 }, { "referrer": "direct", "clicks": 198 }]
}
}Bulk Create URLs
/urls/bulkCreate multiple short URLs in a single request. Maximum 100 URLs per request. Partial failures are supported.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
urls | array | Required | Array of URL objects to create (max 100) |
urls[].url | string | Required | Destination URL |
urls[].customPath | string | Optional | Custom short path |
urls[].title | string | Optional | URL title |
{
"success": true,
"data": {
"succeeded": [{ "domain": "webb.in", "path": "abc123", "shortUrl": "https://webb.in/abc123", "targetUrl": "https://example.com/page1", "title": "Page 1" }],
"failed": [{ "url": "not-a-valid-url", "error": "INVALID_URL", "message": "The provided URL is not valid." }],
"total": 3, "successCount": 2, "failureCount": 1
}
}Account Information
/accountRetrieve your account details, quota information, and usage statistics.
{
"success": true,
"data": {
"username": "john", "email": "john@example.com", "createdAt": "2025-01-01T00:00:00Z",
"quota": { "dailyLimit": 100, "todayUsage": 47, "remaining": 53, "resetAt": "2025-01-16T00:00:00Z" },
"usage": { "totalUrls": 234, "totalClicks": 15678, "activeUrls": 198 }
}
}Conversion Tracking
Attribute sign-ups and sales to the short link (and A/B variant) that brought the visitor. Turn on Track conversions on a link (user portal β Edit link, or trackConversions: true when creating). Visitors then arrive on your site with a signed click id: ?wbclid=β¦. Report a conversion with that id in one of three ways. Click ids are valid for 30 days, and the same click + event + order id is counted once.
1. JavaScript snippet (easiest)
Add the script to your landing page(s) and conversion page (it remembers the wbclid in a first-party cookie), then call webbin.conversion() when the visitor converts:
<script src="https://api.webb.in/api/conversions/tracker.js" async></script>
<script>
window.webbin && webbin.conversion('purchase', { value: 49.99, currency: 'USD', orderId: 'A1001' });
</script>Cookieless mode: load tracker.js?storage=none and the script stores nothing on the visitor’s device (no cookie, no local storage) — the click id is only known on the landing page itself, so report the conversion there or pass the wbclid to your backend for a server postback. By default the id is kept for 30 days in a first-party cookie and local storage on your site.
2. Pixel
If you already keep the wbclid, fire a 1Γ1 image (it always returns a GIF):
<img src="https://api.webb.in/api/conversions/pixel?wbclid=WBCLID&event=purchase&value=49.99¤cy=USD&order=A1001"
width="1" height="1" alt="">3. Server postback (most reliable)
From your backend with your API key, for links you own. It returns 201 when recorded and 200 for a duplicate. See the API reference.
curl -X POST https://api.webb.in/api/v1/conversions \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"clickId":"WBCLID","event":"purchase","value":49.99,"currency":"USD","orderId":"A1001"}'event: 1β40 lower-case letters, digits, _ - . (default conversion). value: 0β1,000,000,000. currency: ISO code (default USD). Results (conversions, conversion rate, revenue, each per A/B variant) appear in link analytics and in GET /api/v1/urls/{domain}/{path}/stats. The pixel and snippet are limited to 60 reports per minute per IP.
App Deep Links
Open your native app straight from a short link. iPhone/iPad and Android visitors go into the app; if it isn't installed, to the App Store / Play Store page β or to the link's normal destination when you don't give a store URL. Desktop visitors and crawlers get the normal redirect, and smart routing still picks the web destination. Available on every plan: set it in the user portal (Edit link β App deep links) or with appLinks on create / update:
curl -X PATCH https://api.webb.in/api/v1/urls/webb.in/spring-sale \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"appLinks":{
"iosUrl":"myshop://product/42",
"iosStoreUrl":"https://apps.apple.com/app/id123456789",
"androidUrl":"myshop://product/42",
"androidPackage":"com.example.shop"}}'| Field | Meaning |
|---|---|
iosUrl / androidUrl | A custom scheme (myapp://path) or an https universal link / App Link. https links are a plain redirect β the OS opens the app if it's installed. |
iosStoreUrl / androidStoreUrl | https fallback when the app isn't installed. Only a store URL (no app URL)? Phones go straight to the store β a "download our app" link. |
androidPackage | With a custom scheme, Chrome gets an intent:// that opens the app or falls back by itself; the Play Store page is the default fallback. |
For custom schemes the visitor sees a short "Opening the appβ¦" page with Open in the app and Get the app / Continue buttons (for in-app browsers that block app switches); it falls back after about 2.5 seconds. removeAppLinks: true on PATCH clears them. Clicks are counted as usual.
Interstitials & Retargeting Pixels
On Pro and above, a link can show a branded page before redirecting and/or fire your retargeting pixels in the visitor's browser, so people who clicked your links can be reached again in your ad platforms.
- Pixels (user portal β Integrations β Retargeting pixels): Meta, Google Analytics 4, Google Tag Manager, LinkedIn Insight Tag, TikTok, X and Pinterest β up to 10 per account.
- Per link (Edit link β Interstitial & retargeting): a branded page with your logo, colour, message, button and a countdown (or wait for the click), and/or a quick "Redirectingβ¦" page that fires the selected pixels (about 1 second).
- Consent: by default visitors in the EU/EEA, UK and Switzerland are asked first, and pixels load only if they allow them; declining or waiting continues without pixels. You can ask everyone, or turn the prompt off if you collect consent yourself.
- Bots, crawlers, API clients (no
text/htmlinAccept) and app deep links skip the page. Clicks are counted as usual, and conversion click ids (wbclid) are kept.
API: GET/PUT /api/user/link-page (branding, consent, pixels) and GET/PUT/DELETE /api/urls/{{domain}}/{{path}}/interstitial with {{ "show", "message", "buttonText", "delaySeconds", "firePixels", "pixelIds" }}.
Webhooks
Get events pushed to your server instead of polling. Create webhooks in the user portal (Webhooks) or with the API below β Zapier and Make use the same API. Webhooks are available on Pro (3 webhooks) and above.
| Event | When |
|---|---|
url.created | A short link was created. |
url.updated | A link was edited (destination, title, tags, expiry, active state). |
url.deleted | A link was deleted. |
url.clicked | A person clicked a link (bots and link previews excluded; no IP or visitor id). |
url.suspended / url.unsuspended | A link was suspended for breaking the Terms of Service, or restored. |
conversion.created | A conversion was attributed to a link (without the click id). |
link.approval_requested | A team member created a link that needs approval (sent to the team owner). |
link.reviewed | A team link was approved or rejected. |
alert.created | A traffic insight: spike, decline or audience shift. |
* | Everything above. |
Subscribe with the API (REST Hooks)
The target must be a public https URL. The response contains the signing secret β it is shown only once.
curl -X POST https://api.webb.in/api/v1/webhooks \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"targetUrl":"https://example.com/webhooks/webbin","events":["url.created","url.clicked"]}'Also: GET /api/v1/webhooks (list), GET /api/v1/webhooks/{id}, DELETE /api/v1/webhooks/{id} (unsubscribe), GET /api/v1/webhooks/events (event list) and GET /api/v1/webhooks/samples/{event} (example deliveries β your latest links for url.* events). See the API reference.
Deliveries & signatures
Each event is a POST with a JSON body and three headers: X-Webb-Event (the event), X-Webb-Delivery (a unique id, also id in the body β use it to ignore duplicates) and X-Webb-Signature: sha256= + the hex HMAC-SHA256 of the raw body with your secret.
{
"id": "evt_6f1cβ¦",
"event": "url.clicked",
"timestamp": "2026-01-15T09:35:02.1234567Z",
"data": { "domain": "webb.in", "path": "spring-sale", "country": "Canada", "deviceType": "Mobile", "browser": "Safari", "source": "link" }
}// Node (no SDK)
import { createHmac, timingSafeEqual } from 'node:crypto';
const expected = 'sha256=' + createHmac('sha256', secret).update(rawBody).digest('hex');
const valid = expected.length === signature.length && timingSafeEqual(Buffer.from(expected), Buffer.from(signature));Answer with any 2xx within 5 seconds. Answer 410 Gone to unsubscribe: Webb.in deletes the webhook. Delivery is best effort and not retried, so treat webhooks as notifications and use the API to reconcile if you need every event.
SDKs & Libraries
Official SDKs wrap every v1 endpoint, handle pagination and retries (never repeating a create that may have happened), expose rate-limit headers and verify webhook signatures. Use them server-side β never put an API key in browser code.
JavaScript / TypeScript
Node 18+, Deno, Bun, edge runtimes Β· ESM & CommonJS Β· typed Β· no dependencies
npm install webbin-sdk
import { Webbin } from 'webbin-sdk';
const webb = new Webbin({ apiKey: process.env.WEBBIN_API_KEY });
const link = await webb.urls.create({ url: 'https://example.com', customPath: 'launch' });
for await (const l of webb.urls.listAll()) console.log(l.shortUrl);Python
Python 3.9+ Β· standard library only Β· typed
pip install webbin-sdk
from webbin import Webbin webb = Webbin(api_key=os.environ["WEBBIN_API_KEY"]) link = webb.urls.create(url="https://example.com", custom_path="launch") for l in webb.urls.list_all(): print(l["shortUrl"])
Other languages: the API is plain JSON over HTTPS β the OpenAPI document works with any OpenAPI generator.
Zapier & Make
No-code apps built on the webhook API β every trigger is instant:
- Triggers: new link, new click, link updated/deleted, new conversion, link awaiting approval, link approved/rejected, link suspended/restored, traffic insight.
- Actions: create a short link, update a link, report a conversion; searches: find a link (Zapier: find or create), list links (Make); plus Make's "Make an API call".
Connect with an API key (Pro plan or above for triggers). The apps are coming to the Zapier and Make directories; until then you can use any webhook-capable tool (n8n, Pipedream, "Webhooks by Zapier", Make's HTTP module) with the API above.