Skip to main content

Create short links

Create a new short link in the workspace that owns your API key.

Current Beta scope

The public Developer API currently supports creating links. It does not yet support public Developer API endpoints for listing, updating, deleting or retrieving analytics for links.

You can view created links in the Bytes dashboard.

Endpoint

POST /api/v1/links

Base URL:

https://api.jaww.ws

Authentication

Send your workspace API key as a bearer token:

Authorization: Bearer YOUR_BYTES_API_KEY

API keys are workspace-specific. A key can only create links inside the workspace it belongs to.

Example request

curl -X POST https://api.jaww.ws/api/v1/links \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_BYTES_API_KEY" \
-d '{
"destination_url": "https://example.com/summer-sale",
"slug": "summer-sale",
"title": "Summer sale campaign",
"channel": "print",
"utm_source": "poster",
"utm_medium": "qr",
"utm_campaign": "summer-sale",
"utm_content": "a1-window-poster"
}'

Request fields

FieldRequiredTypeNotes
destination_urlYesstringMaximum 65535 characters. Must pass destination safety checks
slugNostring3 to 64 characters. Lowercase letters, numbers and hyphens. Auto-generated when omitted
titleNostringMaximum 190 characters
notesNostringMaximum 255 characters
is_activeNobooleanDefaults to true
channelNostringOne of social, email, print, ads, sms, other
expires_atNodateMust be in the future when supplied
passwordNostring6 to 100 characters. Stored securely as a hash
utm_sourceNostringMaximum 100 characters
utm_mediumNostringMaximum 100 characters
utm_campaignNostringMaximum 100 characters
utm_termNostringMaximum 100 characters
utm_contentNostringMaximum 100 characters
Public API scope

Only documented /api/v1/* endpoints are supported for external integrations.

Do not rely on undocumented dashboard routes. Public endpoints for additional workspace features will be documented when they are ready for external developers.

Successful response

201 Created
{
"message": "Short link created successfully.",
"link": {
"id": 123,
"workspace_id": 1,
"slug": "summer-sale",
"destination_url": "https://example.com/summer-sale",
"short_url": "https://jaww.ws/s/summer-sale",
"title": "Summer sale campaign",
"is_active": true,
"click_count": 0,
"unique_click_count": 0
}
}

Short URL format

The canonical public short URL format is:

https://jaww.ws/s/{slug}

Bytes uses active-link limits per plan. Inactive or archived links do not count toward the limit.

PlanActive-link limit
Free100
Starter500
Pro2,000
BusinessUnlimited
EnterpriseUnlimited

An active link is enabled and capable of redirecting visitors.

Common errors

See Errors for full examples.

Missing, invalid or revoked API key

401 Unauthorized
{
"message": "Unauthenticated."
}

Duplicate or reserved slug

422 Unprocessable Content
{
"message": "That slug is not available.",
"errors": {
"slug": [
"That slug is already in use."
]
}
}
422 Unprocessable Content
{
"message": "Active link limit reached for this workspace plan.",
"code": "active_link_limit_reached",
"limit": 100,
"active_links": 100,
"plan": "free"
}

Beta limitations

Not yet available through the public Developer API:

  • listing links
  • updating links
  • deleting links
  • retrieving analytics
  • additional dashboard feature APIs
  • OAuth2
  • API scopes
  • SDKs and CLI
  • Webhooks