useLoyalty
Api reference

Track Event

Send a custom event that matches against AUTOMATED quests. Events trigger quest completions based on matching action names.

POST/events

Send a custom event that matches against AUTOMATED quests. Events trigger quest completions based on matching action names.

AuthorizationBearer <token>

Use your private API key (sk_xxx) as the bearer token

In: header

Request Body

application/json

externalId*string

Member's external ID

event*string

Event name (matches quest action field)

properties?object

Additional event metadata

Response Body

application/json

curl -X POST "https://app.useloyalty.app/api/v1/events" \  -H "Content-Type: application/json" \  -d '{    "externalId": "user_123",    "event": "product_review",    "properties": {      "productId": "prod_456",      "rating": 5    }  }'
{
  "tracked": true,
  "event": "string",
  "externalId": "string",
  "questsTriggered": 0,
  "questsCompleted": [
    {
      "id": "string",
      "questId": "string",
      "questName": "string",
      "pointsAwarded": 0,
      "basePoints": 0,
      "multiplier": 0,
      "multiplierEventName": "string",
      "completedAt": "2019-08-24T14:15:22Z"
    }
  ]
}