Docs · Section 14
API Keys & Public API
Cut.bd provides a REST API so you can create links, query analytics, manage tags, and more from your own code or integrations.
Key format
Every key looks like sl_live_XXXXXXXXXXXXXXXXXXXX — a brand prefix, environment marker, and a 22-character random body with 110 bits of entropy.
The raw key is shown only once at creation time. Cut.bd stores only a salted hash — the original key cannot be retrieved later. If you lose a key, revoke it and create a new one.
Scopes
| Scope | Permission |
|---|---|
| links:read / links:write / links:delete | Read, create/update, or delete links. |
| analytics:read | Read click analytics and the raw click log. |
| domains:read / domains:write | List or manage custom domains. |
| tags:read / tags:write | List/read or create/update/delete tags. |
| pixels:read / pixels:write | List or create/delete retargeting pixels. |
| funnels:read / funnels:write | List/read or create/update/delete funnels. |
| workspaces:read | List workspaces you’re a member of. |
You can have up to 50 active (non-revoked) API keys per account at any time.
Public API reference
Base URL: https://api.cut.bd/api/v1/public. All requests must include:
Authorization: Bearer sl_live_YOUR_KEY_HERE
Create a link
POST /links
{
"destinationUrl": "https://example.com/page",
"slug": "my-slug",
"title": "My Campaign Link",
"tags": ["launch", "email"],
"expiresAt": "2026-12-31T23:59:59Z",
"utm": {
"source": "newsletter",
"medium": "email",
"campaign": "q1-launch"
}
}Required scope: links:write.
List links
GET /links?limit=20&cursor=...&status=active&tag=launch-2026
Required scope: links:read.
Get link analytics
GET /links/:id/analytics?range=7d
Response includes totals, previousTotals, timeSeries, topCountries, topReferrers, topDevices, deepLinkBreakdown, hourlyHeatmap, and utmBreakdown. Required scope: analytics:read.
Error responses
{
"error": {
"code": "VALIDATION_ERROR",
"message": "destinationUrl is required",
"details": [{ "path": "destinationUrl", "message": "Required" }]
}
}| Code | HTTP | Meaning |
|---|---|---|
| UNAUTHORIZED | 401 | Missing or invalid API key. |
| KEY_REVOKED / KEY_EXPIRED | 401 | The API key has been revoked or has expired. |
| INSUFFICIENT_SCOPE | 401 | The key lacks the required scope. |
| FORBIDDEN | 403 | Authenticated but not allowed (e.g. wrong workspace). |
| NOT_FOUND | 404 | Resource does not exist. |
| CONFLICT | 409 | Duplicate slug or other uniqueness violation. |
| VALIDATION_ERROR | 422 | Request body failed validation. |
| TOO_MANY_REQUESTS | 429 | Rate limit exceeded. |