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.
Create a link
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
| Field | Required | Type | Notes |
|---|---|---|---|
destination_url | Yes | string | Maximum 65,535 characters. Must pass destination safety checks |
slug | No | string | 3 to 64 lowercase letters, numbers or hyphens. 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 | social, email, print, ads, sms or other |
expires_at | No | date-time | Must be in the future on creation |
password | No | string | 6 to 100 characters. Stored as a hash and never returned |
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 |
activity_group_id | No | string | Public 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.
List links
GET /api/v1/links
Read one link
GET /api/v1/links/{id}
Update a link
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.
Archive a link
DELETE /api/v1/links/{id}
A successful archive returns 204 No Content.
Active-link limits
| Plan | Active-link limit |
|---|---|
| Free | 100 |
| Starter | 500 |
| Pro | 2,000 |
| Business | Unlimited |
| Enterprise | Unlimited |
See Errors for standard responses and Activity Groups for assignment behaviour.