REST API
Programmatic access to your AppRefer attribution data, apps, links, and integrations.
Authentication#
All API requests require an API key sent in the Authorization header:
Authorization Header
Authorization: Bearer ak_live_...API Key Permissions#
Create API keys in the Dashboard under the API page. Each key can be scoped with specific permissions:
| Permission | Access Level |
|---|---|
| Full | Read and write access to all endpoints |
| Read-only | Read access to all endpoints, no mutations |
| Analytics | Read access to analytics and stats endpoints only |
Base URL#
The base URL is your AppRefer instance URL. All API endpoints are prefixed with /api/v1.
Quick Examples#
cURL - List Attributions
curl -X GET "https://your-domain.com/api/v1/apps/{appId}/stats" \
-H "Authorization: Bearer ak_live_your_key"JavaScript - Fetch Overview Stats
const response = await fetch(
"https://your-domain.com/api/v1/apps/{appId}/overview",
{
headers: {
"Authorization": "Bearer ak_live_your_key",
},
}
);
const data = await response.json();
console.log(data);Python - Get Events
import requests
response = requests.get(
"https://your-domain.com/api/v1/apps/{appId}/events",
headers={"Authorization": "Bearer ak_live_your_key"},
params={"limit": 50}
)
events = response.json()
print(events)Interactive Documentation
Explore the full API interactively via the Swagger UI at
/api/v1/docs or download the OpenAPI spec at /openapi.yaml.Endpoint Groups#
| Group | Endpoints | Description |
|---|---|---|
| Analytics | /v1/apps/{appId}/stats, /v1/apps/{appId}/events, /v1/apps/{appId}/overview | Attribution stats, event logs, and overview KPIs |
| Apps | /v1/apps | List, create, and update app configurations |
| Links | /v1/apps/{appId}/links | CRUD operations for tracking links |
| Integrations | /v1/apps/{appId}/integrations | Get and update ad network integration settings |
| SKAN | /v1/apps/{appId}/skan | SKAdNetwork conversion value configuration |
| Portfolio | /v1/portfolio | Cross-app overview and comparison data |
Pagination#
List endpoints use cursor-based pagination. Pass limit and cursor as query parameters. The response includes a meta object:
Paginated Response
{
"data": [...],
"meta": {
"hasMore": true,
"cursor": "eyJsYXN0SWQiOiAiYWJjMTIzIn0="
}
}To fetch the next page, pass the returned cursor value as a query parameter in the next request. When meta.hasMore is false, there are no more results.