Reference
A typed tRPC layer over HTTP. Every dashboard feature is exposed at /trpc/<router>.<procedure>. 56 endpoints across 7 routers, all reachable with the same authentication header.
Chapter one
Every request needs an API key. Generate one from the personal dashboard, then send it on every request.
1# Header on every request
2x-api-key: your_api_key_here
3
4# Or as an Authorization bearer token
5Authorization: Bearer your_api_key_hereCookie-based session auth also works for browser flows. API keys are the right choice for scripts, automations, and MCP tool access.
Chapter two
tRPC over HTTP wraps every request body in { json: ... } and unwraps responses through .result.data.json. The wrapper looks unusual at first but it's mechanical.
Base URL
1https://a.i6t.co.zaEndpoint format
1# Mutations and queries both POST to the same shape
2POST https://a.i6t.co.za/trpc/<router>.<procedure>
3Content-Type: application/json
4x-api-key: your_api_key_here
5
6# Body
7{ "json": { ...input } }
8
9# Response
10{ "result": { "data": { "json": { ...output } } } }Chapter three
Creating a short link with cURL, JavaScript, Python, PHP, and C#. The same shape works for every other endpoint — just swap the URL and the body fields.
1curl -X POST "https://a.i6t.co.za/trpc/links.create" \
2 -H "Content-Type: application/json" \
3 -H "x-api-key: your_api_key_here" \
4 -d '{
5 "json": {
6 "destinationUrl": "https://example.com/very-long-url",
7 "title": "My Link",
8 "customCode": "mylink"
9 }
10 }'Chapter four
Every procedure on every router. Mutations are POST-only writes. Queries are POST-but-idempotent reads.
links · 16 endpoints
The core of the platform. Create new short links with custom slugs, expirations, and password protection. Read, update, archive, and delete existing links. Pull analytics and time-series data per link or per account.
links.createlinks.listlinks.getlinks.getByShortCodelinks.updatelinks.deletelinks.bulkDeletelinks.bulkCreatelinks.getAnalyticslinks.getTimeSeriesAnalyticslinks.getOverallStatslinks.getUsageStatslinks.getUsageAnalyticslinks.exportCsvlinks.generateQRCodelinks.verifyPasswordcollections · 8 endpoints
Group related links into a shared theme — a campaign, a launch, a newsletter issue. A link can belong to multiple collections. Each collection exposes aggregate stats so you can see how a whole bundle is performing.
collections.listcollections.getcollections.createcollections.updatecollections.deletecollections.addLinkcollections.removeLinkcollections.getLinkMembershipsinsights · 1 endpoint
Surface what's interesting, not just what's there. The insights endpoint returns top performers, unexpected spikes, fresh hits, cold links, and weekly rhythm — all derived from existing clicks. No new schema, no caching.
insights.getbio · 8 endpoints
A linktr.ee-style public profile page per user. Manage your slug, display name, tagline, and an ordered list of entries. Entries can point to your own short links or external URLs. The getBySlug endpoint is the only public procedure on the entire API.
bio.getBySlugbio.getMinebio.suggestSlugbio.upsertbio.addEntrybio.updateEntrybio.removeEntrybio.reorderEntrieswebhooks · 7 endpoints
Register URLs to receive HMAC-signed POST requests when link events happen. Subscribe to link.created, link.updated, link.deleted, or link.clicked. Inspect delivery history per webhook to debug receivers.
webhooks.listwebhooks.getwebhooks.createwebhooks.updatewebhooks.deletewebhooks.rotateSecretwebhooks.testworkspaces · 13 endpoints
Workspaces let multiple users collaborate on the same set of links. Owners, admins, members, and viewers each have different permissions. Pro tier billing is per-workspace, not per-seat.
workspaces.listworkspaces.getworkspaces.createworkspaces.updateworkspaces.deleteworkspaces.getMembersworkspaces.addMemberworkspaces.removeMemberworkspaces.updateMemberRoleworkspaces.getAnalyticsworkspaces.getBillingworkspaces.createCheckoutSessionworkspaces.createBillingPortalSessionapikeys · 3 endpoints
Most key management lives in Better-Auth's /api/auth/api-key endpoints (create, list, delete via authClient). These tRPC procedures handle the workspace-default-association layer that's specific to this app.
apikeys.listWithWorkspacesapikeys.setDefaultWorkspaceapikeys.getCurrentContextChapter five
tRPC error codes are returned in the response body alongside an HTTP status. Map them to your own error handling.
BAD_REQUESTHTTP 400Input failed Zod validation. Check the response body for the offending field.
UNAUTHORIZEDHTTP 401Missing or invalid API key. Check your x-api-key header and that the key is enabled.
FORBIDDENHTTP 403You're authenticated but not allowed to do this. Workspace permissions or admin checks failed.
NOT_FOUNDHTTP 404The resource doesn't exist or has been deleted. Sometimes also returned to hide existence from unauthorized callers.
CONFLICTHTTP 409Request conflicts with existing state — duplicate slug, member already exists, etc.
TOO_MANY_REQUESTSHTTP 429Rate limited. The API key has its own per-minute limit (100 by default). Back off and retry.
INTERNAL_SERVER_ERRORHTTP 500Something went wrong on our side. Safe to retry idempotent operations.