API Overview
The UpsellSDK API is a REST API used by the JavaScript SDK and React components.
Base URL
https://api.upsellsdk.com
Authentication
All SDK endpoints require an API key passed in the X-API-Key header:
curl -X POST https://api.upsellsdk.com/sdk/track \
-H "X-API-Key: us_your_api_key" \
-H "Content-Type: application/json" \
-d '{"eventName": "limit_reached", "properties": {"feature": "projects"}}'
SDK Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /sdk/identify | Identify a user |
| POST | /sdk/track | Track an event |
Admin Endpoints
These endpoints are used by the dashboard:
| Method | Endpoint | Description |
|---|---|---|
| GET | /tenants | List all tenants |
| POST | /tenants | Create a tenant |
| POST | /tenants/{id}/api-keys | Generate API key |
| GET | /users | List tracked users |
| GET | /events | List tracked events |