Creating short links
The Bytes Developer API lets you create short links programmatically using a workspace-specific API key.
This Beta API is intentionally small. It currently supports creating links only.
Endpoint
POST /api/v1/links
Base URL:
https://api.jaww.ws
Authentication
Send your workspace API key as a bearer token:
Authorization: Bearer <api_key>
API keys are workspace-specific. A key can only create links inside the workspace it belongs to.
Do not put API keys in URLs, query strings, frontend code, screenshots, or public repositories.
Create a link
curl -X POST https://api.jaww.ws/api/v1/links \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <api_key>" \
-d '{
"destination_url": "https://example.com/summer-sale",
"slug": "summer-sale",
"title": "Summer sale campaign"
}'
Request fields
| Field | Required | Notes |
|---|---|---|
destination_url | Yes | Must be a valid http or https URL |
slug | No | 3–64 characters, lowercase letters, numbers and hyphens |
title | No | Human-readable link title |
notes | No | Internal notes |
is_active | No | Defaults to active |
channel | No | One of social, email, print, ads, sms, other |
expires_at | No | Optional expiry datetime |
utm_source | No | UTM source |
utm_medium | No | UTM medium |
utm_campaign | No | UTM campaign |
utm_term | No | UTM term |
utm_content | No | UTM content |
Successful response
{
"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
}
}
Error responses
Missing, invalid, or revoked API key
401 Unauthorized
{
"message": "Unauthenticated."
}
Invalid destination URL
Only http and https destinations are accepted.
422 Unprocessable Content
{
"message": "The destination URL must be a valid http or https URL.",
"errors": {
"destination_url": [
"The destination URL must be a valid http or https URL."
]
}
}
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
Bytes uses active-link limits per plan. Inactive or archived links do not count toward the limit.
422 Unprocessable Content
{
"message": "Active link limit reached for this workspace plan.",
"code": "active_link_limit_reached",
"limit": 100,
"active_links": 100,
"plan": "free"
}
Active-link limits
| Plan | Active-link limit |
|---|---|
| Free | 100 |
| Starter | 500 |
| Pro | 2,000 |
| Business | Unlimited |
| Enterprise | Unlimited |
An active link is a link that is enabled and capable of redirecting visitors.
API key safety
API keys are shown only once when they are created. Store the key securely before leaving the reveal screen.
- Do not commit API keys to source control
- Do not expose API keys in frontend code
- Do not share API keys in screenshots or support messages
- Revoke keys that are no longer needed
- Create separate keys for different systems or integrations
Beta limitations
In Beta, the API currently supports link creation only.
Not yet available:
- Listing links
- Updating links
- Deleting links
- Retrieving analytics
- OAuth2
- API scopes
- SDKs and CLI
- Webhooks
- OpenAPI specification