Getting started with the API
Step 1: Create an API key
Choose the correct workspace, then go to Workspace Settings -> Developer API. Create a key and copy it immediately.
Step 2: 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 YOUR_BYTES_API_KEY" \
-d '{
"destination_url": "https://example.com",
"title": "My first API link"
}'
Step 3: Read the response
{
"message": "Short link created successfully.",
"link": {
"id": "01K0M4ZN8X7P9Q2R3S4T5V6W7X",
"slug": "ab3cd",
"destination_url": "https://example.com",
"short_url": "https://jaww.ws/ab3cd",
"activity_group": null,
"tags": []
}
}
The id is an immutable public identifier. The customer-facing URL is https://jaww.ws/{slug}.
Step 4: Organise the link
Resolve an Activity Group:
curl "https://api.jaww.ws/api/v1/activity-groups?slug=summer-events" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_BYTES_API_KEY"
Assign it by public ID or slug:
{
"destination_url": "https://example.com/coffee-tasting",
"activity_group_id": "summer-events"
}
Step 5: Use the CLI
npm install -g @jawwws/bytes-cli
bytes activity-groups list --slug summer-events