POST /sdk/track
Track a conversion signal event.
Request
POST /sdk/track
Content-Type: application/json
X-API-Key: us_your_api_key
Body
{
"userId": "user-123",
"eventName": "limit_reached",
"properties": {
"feature": "projects",
"current": 5,
"limit": 5
}
}
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | User identifier (from identify) |
eventName | string | Yes | Name of the event |
properties | object | No | Event metadata |
Response
Success (200)
{
"success": true,
"eventId": "evt_abc123"
}
Error (401)
{
"error": "Invalid API key"
}
Error (400)
{
"error": "User not found. Call identify first."
}
Example
curl -X POST https://api.upsellsdk.com/sdk/track \
-H "X-API-Key: us_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"userId": "user-123",
"eventName": "feature_blocked",
"properties": {
"feature": "analytics"
}
}'