Create short links
Create a new short link in the workspace that owns your API key.
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
| Field | Required | Type | Notes |
|---|---|---|---|
destination_url | Yes | string | Maximum 65535 characters. Must pass destination safety checks |
slug | No | string | 3 to 64 characters. Lowercase letters, numbers and hyphens. Auto-generated when omitted |
title | No | string | Maximum 190 characters |
notes | No | string | Maximum 255 characters |
is_active | No | boolean | Defaults to true |
channel | No | string | One of social, email, print, ads, sms, other |
expires_at | No | date | Must be in the future when supplied |
password | No | string | 6 to 100 characters. Stored securely as a hash |
utm_source | No | string | Maximum 100 characters |
utm_medium | No | string | Maximum 100 characters |
utm_campaign | No | string | Maximum 100 characters |
utm_term | No | string | Maximum 100 characters |
utm_content | No | string | Maximum 100 characters |
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}
Active-link limits
Bytes uses active-link limits per plan. Inactive or archived links do not count toward the limit.
| Plan | Active-link limit |
|---|---|
| Free | 100 |
| Starter | 500 |
| Pro | 2,000 |
| Business | Unlimited |
| Enterprise | Unlimited |
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."
]
}
}
Active-link limit reached
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