Skip to main content

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.

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

FieldRequiredNotes
destination_urlYesMust be a valid http or https URL
slugNo3–64 characters, lowercase letters, numbers and hyphens
titleNoHuman-readable link title
notesNoInternal notes
is_activeNoDefaults to active
channelNoOne of social, email, print, ads, sms, other
expires_atNoOptional expiry datetime
utm_sourceNoUTM source
utm_mediumNoUTM medium
utm_campaignNoUTM campaign
utm_termNoUTM term
utm_contentNoUTM 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."
]
}
}

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"
}
PlanActive-link limit
Free100
Starter500
Pro2,000
BusinessUnlimited
EnterpriseUnlimited

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