Appfiliate Docs
appfiliate.io

API Reference

The Appfiliate REST API lets you record clicks, attribute installs, track purchases, and retrieve analytics. All endpoints accept and return JSON.


Base URL

https://us-central1-appfiliate-5a18b.cloudfunctions.net/api

All endpoint paths are relative to this base URL. For example, the click endpoint is available at https://us-central1-appfiliate-5a18b.cloudfunctions.net/api/v1/click.


Authentication

Authenticated endpoints require two headers:

HeaderDescription
X-API-KeyYour app's API key, found on the Appfiliate dashboard under app settings.
X-App-IDYour app's unique identifier, also available on the dashboard.

The SDK handles authentication automatically. If you are calling the API directly, include both headers on every request. The /v1/click and /v1/link/:code endpoints are called by infrastructure and do not require these headers.


Rate Limits

The API enforces the following rate limits per app:

  • Click recording: 1,000 requests per minute
  • Attribution: 500 requests per minute
  • Purchase tracking: 500 requests per minute
  • Stats: 60 requests per minute

If you exceed a limit, the API returns a 429 Too Many Requests response. Back off and retry after a short delay.


Response Format

All responses are JSON. Successful responses return the relevant data directly. Error responses use a consistent format:

Error response
{
  "error": "Description of what went wrong"
}

Common HTTP status codes:

  • 200 -- Success
  • 400 -- Bad request (missing required fields)
  • 401 -- Invalid API key
  • 404 -- Resource not found
  • 429 -- Rate limit exceeded
  • 500 -- Internal server error

Endpoints