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.

Open reference β†’

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:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per day
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUTC 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:

RequestsLimit per IP
Sign-in, sign-up, password reset, email verification, two-factor checks10 per minute, 50 per hour
Anonymous shortening (POST /api/public/shorten)10 per minute, 100 per day
Password-protected link checks20 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 / mail attribute; displayName or 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.

EndpointNotes
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 / DELETERemoves 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, /ResourceTypesPATCH 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>, sourcetype webbin:audit.
  • Datadog Logs β€” https://http-intake.logs.<site>/api/v2/logs with DD-API-KEY, ddsource:webbin.
  • Signed webhook (any SIEM) β€” JSON {"source","team","events":[…]} with X-Webb-Signature: sha256=HMAC(secret, body) and X-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.approve are 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 403 with "ipNotAllowed": true.

Error Handling

All API responses use a consistent envelope format. Errors include a machine-readable code and a human-friendly message.

Response
{
  "success": false,
  "error": {
    "code": "INVALID_URL",
    "message": "The provided URL is not valid."
  }
}

Error Codes

CodeHTTP StatusDescription
INVALID_URL400The target URL is not valid or is missing
PATH_EXISTS409The requested custom path is already taken
DESTINATION_BLOCKED400The destination failed the link-safety check (error.reason: scheme, blocklist, threat_feed, shortener, loop, lookalike or slug)
URL_NOT_FOUND404Short URL not found or you do not own it
QUOTA_EXCEEDED429Daily quota has been exhausted
INVALID_API_KEY401API key is missing, invalid, or revoked
FORBIDDEN403You do not have access to this resource
BULK_LIMIT400Bulk request exceeds max of 100 URLs
INTERNAL_ERROR500An unexpected server error occurred

Endpoints

Complete reference for all API endpoints.

MethodEndpointDescription
POST/urlsCreate a short URL
GET/urlsList 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}/statsGet click statistics
POST/urls/bulkCreate multiple URLs
GET/accountGet account info & quota

Create Short URL

POST/urls

Create a new short URL. If customPath is not specified, a random short code will be generated.

Request Body

NameTypeRequiredDescription
urlstringRequiredThe destination URL to shorten
customPathstringOptionalCustom short path (3-50 chars, alphanumeric + hyphens)
titlestringOptionalA descriptive title for the URL
domainstringOptionalDomain to use (default: webb.in)
Response
{
  "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

GET/urls

Retrieve a paginated list of your short URLs.

Query Parameters

NameTypeRequiredDescription
limitintegerOptionalNumber of results per page (default: 20, max: 100)
offsetintegerOptionalNumber of results to skip (default: 0)
Response
{
  "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

GET/urls/{domain}/{path}

Retrieve details for a specific short URL including click count and metadata.

Path Parameters

NameTypeRequiredDescription
domainstringRequiredThe domain (e.g., webb.in or your custom domain)
pathstringRequiredThe short path
Response
{
  "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

PATCH/urls/{domain}/{path}

Update the target URL, title, or active status of an existing short URL.

Request Body

NameTypeRequiredDescription
targetUrlstringOptionalNew destination URL
titlestringOptionalNew title
isActivebooleanOptionalEnable or disable the URL
Response
{
  "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

DELETE/urls/{domain}/{path}

Permanently delete a short URL. This action cannot be undone. The short path will become available for reuse.

Response
{
  "success": true,
  "data": { "message": "URL deleted successfully" }
}

URL Statistics

GET/urls/{domain}/{path}/stats

Retrieve click analytics for a short URL, including daily click counts and top referrers.

Query Parameters

NameTypeRequiredDescription
daysintegerOptionalNumber of days of history (default: 7, max: 90)
Response
{
  "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

POST/urls/bulk

Create multiple short URLs in a single request. Maximum 100 URLs per request. Partial failures are supported.

Request Body

NameTypeRequiredDescription
urlsarrayRequiredArray of URL objects to create (max 100)
urls[].urlstringRequiredDestination URL
urls[].customPathstringOptionalCustom short path
urls[].titlestringOptionalURL title
Response
{
  "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

GET/account

Retrieve your account details, quota information, and usage statistics.

Response
{
  "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&currency=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.

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/html in Accept) 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.

EventWhen
url.createdA short link was created.
url.updatedA link was edited (destination, title, tags, expiry, active state).
url.deletedA link was deleted.
url.clickedA person clicked a link (bots and link previews excluded; no IP or visitor id).
url.suspended / url.unsuspendedA link was suspended for breaking the Terms of Service, or restored.
conversion.createdA conversion was attributed to a link (without the click id).
link.approval_requestedA team member created a link that needs approval (sent to the team owner).
link.reviewedA team link was approved or rejected.
alert.createdA 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);
Documentation

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"])
Documentation

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.