API reference · v1 beta

Trailgo API

A REST API scoped to a single workspace. Every request is authenticated with a workspace API key, and every response contains only that workspace's data — enforced at the database layer.

Authentication

Create an API key in Settings → API and send it as a bearer token. Keys are scoped to one workspace.

Authorization: Bearer tg_live_••••••••••••

Create a link

Set creator, brand and campaign at creation and every downstream click and conversion inherits them.

POST /v1/links
{
  "destination": "https://shop.example.com/spring",
  "domain": "go.yourbrand.com",
  "slug": "spring",
  "creator": "j.alvarez",
  "brand": "kettlebrook",
  "campaign": "spring-drop"
}

Read analytics

GET /v1/links/:id/analytics?from=2026-07-01&group_by=country
country
Clicks and revenue by country, region and city
device
Device type, OS and browser breakdown
referrer
Where the click came from
creator
Clicks and attributed revenue per creator
brand
Clicks and attributed revenue per brand
campaign
Rolled up across every link in the campaign

Report a conversion

POST /v1/conversions
{ "click_id": "c_8f21…", "revenue": 48.00, "currency": "USD" }

Webhooks

link.createdclick.recordedconversion.recordedalert.fired

Rate limits

Starter
60 req/min
Read + limited write
Growth
600 req/min
Full API + webhooks
Scale
Custom
Negotiated with SLA