Documentation
Acrossed API Reference
Everything you need to create links, track clicks, and build with Acrossed. Base URL: https://api.acrossed.com
Quickstart
Get your first short link in under 60 seconds.
# 1. Create an account at acrossed.com
# 2. Go to Dashboard → API Keys → Create key
# 3. Create your first link
curl -X POST https://api.acrossed.com/v1/links \
-H "Authorization: Bearer ac_your_api_key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/very/long/path"}'
# Response:
# {
# "id": 1,
# "slug": "aB3xK9",
# "short_url": "https://lyn.my/aB3xK9",
# "target_url": "https://example.com/very/long/path",
# "created_at": "2026-04-17T..."
# }Authentication
All API requests require an API key. Pass it as a Bearer token or via the x-api-key header.
# Bearer token (recommended)
curl -H "Authorization: Bearer ac_your_api_key" https://api.acrossed.com/v1/links
# x-api-key header
curl -H "x-api-key: ac_your_api_key" https://api.acrossed.com/v1/linksKey scopes
links:writeCreate and delete linkslinks:readList and retrieve linksanalytics:readRead click analytics (paid plan required)track:writeSend tracking events (paid plan required)Rate limiting
100 requests per minute per API key. Exceeding this returns 429 Too Many Requests.
Links API
/v1/linksCreate a new short link.
// Request body
{
"url": "https://example.com/path", // required
"title": "My campaign link", // optional
"expires_at": "2026-12-31T00:00:00Z", // optional ISO 8601
"click_limit": 1000, // optional — stop redirecting after N clicks
"password": "secret" // optional — password-protect the link
}
// Response 201
{
"id": 42,
"slug": "aB3xK9",
"short_url": "https://lyn.my/aB3xK9",
"target_url": "https://example.com/path",
"title": "My campaign link",
"created_at": "2026-04-17T12:00:00.000Z",
"expires_at": null
}/v1/linksList all links for the authenticated user. Supports ?page=1&limit=50.
/v1/links/:slugGet a single link by slug.
/v1/links/:slugDelete a link.
/v1/links/:slug/analyticsGet click analytics for a link. Requires paid plan. Supports ?days=30.
// GET /v1/links/aB3xK9/analytics?days=30
{
"slug": "aB3xK9",
"total_clicks": 1247,
"unique_clicks": 891,
"period_days": 30,
"by_country": { "United States": 412, "Germany": 203, "India": 187 },
"by_device": { "desktop": 701, "mobile": 489, "tablet": 57 },
"by_browser": { "Chrome": 634, "Safari": 401, "Firefox": 212 },
"by_os": { "Windows": 512, "macOS": 389, "iOS": 346 },
"by_referrer": { "twitter.com": 234, "github.com": 189 },
"by_day": { "2026-04-17": 42, "2026-04-16": 38 }
}Custom metadata
Pass custom key-value data with any click by appending meta[key]=value query params to the short URL:
https://lyn.my/aB3xK9?meta[campaign]=launch&meta[source]=emailThese appear in the custom_meta field of each click record.
Analytics API
Analytics endpoints require a paid plan. Each click captures:
/v1/links/:slug/analyticsPer-link analytics. Supports ?days=7|30|90.
/v1/track/analyticsAggregate track events. Supports ?domain=example.com&days=30.
Track API
Track custom events on any website. Use the REST API directly or drop in the embed snippet.
/v1/trackRecord a custom event. Requires paid plan and track:write scope.
// Request body
{
"domain": "example.com", // required
"path": "/pricing", // optional
"event_name": "button_click", // optional, default: "pageview"
"utm_source": "newsletter", // optional
"utm_campaign": "april-launch", // optional
"meta": { // optional — any key-value pairs
"plan": "pro",
"button_id": "cta-hero"
}
}
// Response
{ "ok": true }Embed snippet
Add one script tag to auto-track page views. Replace YOUR_API_KEY with your key.
<script
src="https://acrossed.com/embed.js"
data-api-key="ac_your_api_key"
data-domain="example.com"
async
></script>
<!-- Custom events from JavaScript -->
<script>
window.acrossed.track('signup', { plan: 'pro' });
</script>/v1/track/analyticsAggregate analytics for all tracked domains. Supports ?domain=example.com&days=30.
JavaScript / TypeScript SDK
npm install @acrossed/sdkimport { Acrossed } from "@acrossed/sdk";
const client = new Acrossed({ apiKey: "ac_your_api_key" });
// Create a link
const link = await client.links.create({
url: "https://example.com/path",
title: "My link",
});
console.log(link.short_url); // https://lyn.my/aB3xK9
// List links
const { data } = await client.links.list({ page: 1, limit: 20 });
// Get analytics (paid plan)
const stats = await client.links.analytics("aB3xK9", { days: 30 });
console.log(stats.total_clicks, stats.by_country);
// Delete a link
await client.links.delete("aB3xK9");
// Track a custom event (paid plan)
await client.track.event({
domain: "example.com",
path: "/pricing",
event_name: "page_view",
meta: { source: "organic" },
});
// Get track analytics
const trackStats = await client.track.analytics({ domain: "example.com", days: 7 });Python SDK
pip install acrossed-sdkfrom acrossed import Acrossed
client = Acrossed(api_key="ac_your_api_key")
# Create a link
link = client.links.create(url="https://example.com/path", title="My link")
print(link.short_url) # https://lyn.my/aB3xK9
# List links
links = client.links.list(page=1, limit=20)
# Get analytics (paid plan)
stats = client.links.analytics("aB3xK9", days=30)
print(stats.total_clicks, stats.by_country)
# Delete a link
client.links.delete("aB3xK9")
# Async variant
import asyncio
from acrossed.async_client import AsyncAcrossed
async def main():
client = AsyncAcrossed(api_key="ac_your_api_key")
link = await client.links.create(url="https://example.com")
print(link.short_url)
asyncio.run(main())Go SDK
go get github.com/acrossed/sdk-gopackage main
import (
"fmt"
"github.com/acrossed/sdk-go/acrossed"
)
func main() {
client := acrossed.New("ac_your_api_key")
// Create a link
link, err := client.Links.Create(acrossed.CreateLinkRequest{
URL: "https://example.com/path",
Title: "My link",
})
if err != nil {
panic(err)
}
fmt.Println(link.ShortURL) // https://lyn.my/aB3xK9
// List links
links, err := client.Links.List(acrossed.ListOptions{Page: 1, Limit: 20})
// Get analytics (paid plan)
stats, err := client.Links.Analytics("aB3xK9", acrossed.AnalyticsOptions{Days: 30})
fmt.Println(stats.TotalClicks, stats.ByCountry)
// Delete a link
err = client.Links.Delete("aB3xK9")
// Track event (paid plan)
err = client.Track.Event(acrossed.TrackEventRequest{
Domain: "example.com",
Path: "/pricing",
EventName: "pageview",
})
}CLI
# Install globally
npm install -g acrossed-cli
# Or use without installing
npx acrossed-cli <command>acrossed auth loginSet your API key. Stored in ~/.acrossed/config.json.
acrossed auth logoutRemove stored credentials.
acrossed link create <url>Create a short link. Use --title to add a label.
acrossed link listList all your links in a formatted table.
acrossed link delete <slug>Delete a link by slug.
acrossed analytics <slug>View click analytics in the terminal. Use --days 7|30|90.
acrossed track initOutput the embed snippet for a domain.
# Full example workflow
acrossed auth login
# Enter your API key: ac_...
acrossed link create https://github.com/myorg/myrepo --title "GitHub Repo"
# ✓ Created: https://lyn.my/xK9mP2
acrossed link list
# ┌──────────┬──────────────────────────────────────┬────────┬──────────────┐
# │ Slug │ Target URL │ Clicks │ Created │
# ├──────────┼──────────────────────────────────────┼────────┼──────────────┤
# │ xK9mP2 │ https://github.com/myorg/myrepo │ 42 │ Apr 17, 2026 │
# └──────────┴──────────────────────────────────────┴────────┴──────────────┘
acrossed analytics xK9mP2 --days 7
# Clicks: 42 total, 31 unique
# Top countries: US (18), DE (9), IN (7)
# Top devices: desktop (28), mobile (14)