Quick Start
Get your first Tolinku API call working in under 5 minutes.
Prerequisites
Section titled “Prerequisites”- A Tolinku account (sign up free)
- An Appspace with at least one route configured
- An API key (create one in API Keys in the sidebar)
1. Get your API key
Section titled “1. Get your API key”Go to API Keys in your Appspace dashboard and create a key:
- Publishable key (
tolk_pub_): Use in client-side code (browser, mobile app) - Secret key (
tolk_sec_): Use in server-side code only
For this quick start, create a secret key so you can access all endpoints.
2. Make your first request
Section titled “2. Make your first request”Fetch your app’s analytics overview:
curl -H "X-API-Key: tolk_sec_your_secret_key" \ https://your-app.tolinku.com/v1/api/analytics/overviewconst res = await fetch('https://your-app.tolinku.com/v1/api/analytics/overview', { headers: { 'X-API-Key': 'tolk_sec_your_secret_key' }});const data = await res.json();console.log(data);import requests
res = requests.get( 'https://your-app.tolinku.com/v1/api/analytics/overview', headers={'X-API-Key': 'tolk_sec_your_secret_key'})print(res.json())Response:
{ "total_clicks": 10041, "total_installs": 1401, "conversion_rate": 14.0, "days": 30}3. Track a custom event
Section titled “3. Track a custom event”Send a custom event from your app or server:
curl -X POST https://your-app.tolinku.com/v1/api/analytics/track \ -H "X-API-Key: tolk_pub_your_publishable_key" \ -H "Content-Type: application/json" \ -d '{"event_type": "custom.signup_complete", "properties": {"user_id": "user_123"}}'Response:
{ "ok": true }4. Install an SDK
Section titled “4. Install an SDK”For client-side integration, install the SDK for your platform:
npm install @tolinku/web-sdkimport { Tolinku } from '@tolinku/web-sdk';
const tolinku = new Tolinku({ apiKey: 'tolk_pub_your_key' });tolinku.track('custom.page_view');Add via Xcode: File > Add Package Dependencies > https://github.com/tolinku/ios-sdk
import TolinkuSDK
let tolinku = try Tolinku.configure(apiKey: "tolk_pub_your_key")tolinku.track("custom.app_open")implementation("com.tolinku:sdk:0.1.0")import com.tolinku.sdk.Tolinku
Tolinku.configure(apiKey = "tolk_pub_your_key", context = this)Tolinku.track("custom.app_open")Next steps
Section titled “Next steps”- API Reference: Full endpoint documentation
- SDK Guides: Detailed SDK setup for each platform
- Universal Links: Set up iOS deep linking
- App Links: Set up Android deep linking
- Ecommerce Analytics: Track purchases, revenue, and conversion funnels