Skip to main content

Create and manage short links

The public Developer API supports creating, listing, reading, updating and archiving short links in the workspace attached to your API key.

POST /api/v1/links
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/cops-and-coffee/coffee-tasting",
"slug": "cops-coffee-tasting",
"title": "Cops and Coffee tasting event",
"channel": "print",
"activity_group_id": "summer-events",
"utm_source": "poster",
"utm_medium": "qr",
"utm_content": "poster-v1"
}'

Request fields

FieldRequiredTypeNotes
destination_urlYesstringMaximum 65,535 characters. Must pass destination safety checks
slugNostring3 to 64 lowercase letters, numbers or hyphens. Generated when omitted
titleNostringMaximum 190 characters
notesNostringMaximum 255 characters
is_activeNobooleanDefaults to true
channelNostringsocial, email, print, ads, sms or other
expires_atNodate-timeMust be in the future on creation
passwordNostring6 to 100 characters. Stored as a hash and never returned
utm_sourceNostringMaximum 100 characters
utm_mediumNostringMaximum 100 characters
utm_campaignNostringMaximum 100 characters
utm_termNostringMaximum 100 characters
utm_contentNostringMaximum 100 characters
activity_group_idNostringPublic Activity Group ID or slug in the API key workspace

When activity_group_id is supplied and utm_campaign is omitted, Bytes uses the Activity Group default UTM campaign when one exists. An explicit utm_campaign always takes precedence.

Successful response

{
"message": "Short link created successfully.",
"link": {
"id": "01K0M4ZN8X7P9Q2R3S4T5V6W7X",
"slug": "cops-coffee-tasting",
"destination_url": "https://example.com/cops-and-coffee/coffee-tasting",
"short_url": "https://jaww.ws/cops-coffee-tasting",
"activity_group": {
"id": "01KYNVZSNW6Y56W2SHB4ZZ9QKE",
"name": "Summer events",
"slug": "summer-events",
"type": "event",
"status": "active",
"assignment": {
"role": "primary",
"channel": "print"
}
}
}
}

The link id is an opaque public identifier. Do not use or store internal numeric database IDs.

Canonical short URL

https://jaww.ws/{slug}

The legacy /s/{slug} route may continue to redirect older integrations, but new customer-facing output should use the slug-only URL.

GET /api/v1/links
GET /api/v1/links/{id}
PATCH /api/v1/links/{id}
curl -X PATCH \
"https://api.jaww.ws/api/v1/links/01K0M4ZN8X7P9Q2R3S4T5V6W7X" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_BYTES_API_KEY" \
-d '{
"activity_group_id": "summer-events",
"utm_content": "poster-v2"
}'

Repeating the same Activity Group assignment reconciles the primary relationship without creating duplicate active items.

DELETE /api/v1/links/{id}

A successful archive returns 204 No Content.

PlanActive-link limit
Free100
Starter500
Pro2,000
BusinessUnlimited
EnterpriseUnlimited

See Errors for standard responses and Activity Groups for assignment behaviour.