Create your first short link via the to.it.com API in three steps.
1. Create an API key
Follow the authentication guide to generate a key from your dashboard.
2. Create a short link
curl -X POST https://api.to.it.com/v1/short-links \
-H "Authorization: Bearer toit_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"targetUrl": "https://example.com/launch",
"slug": "launch",
"title": "Product launch"
}'
Example response:
{
"shortLink": {
"id": "…",
"slug": "launch",
"targetUrl": "https://example.com/launch",
"status": "ACTIVE",
"clickCount": 0
},
"shortUrl": "https://to.it.com/go/launch"
}
3. Read analytics
After visitors click your link, fetch analytics:
curl https://api.to.it.com/v1/short-links/SHORT_LINK_ID/analytics \
-H "Authorization: Bearer toit_YOUR_KEY"
Example response:
{
"shortLinkId": "…",
"since": "2026-01-01T00:00:00.000Z",
"totalClicks": 42,
"clickCount": 42,
"lastClickedAt": "2026-07-02T12:00:00.000Z"
}
What's next?
- Short links API reference — including scheduled launches and countdown pages
- Analytics API reference
- Rate limits