Skip to main content

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

FieldTypeRequiredDescription
userIdstringYesUser identifier (from identify)
eventNamestringYesName of the event
propertiesobjectNoEvent 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"
}
}'