POST
/
external
/
v1
/
collections
/
events
curl --request POST \
  --url https://api.castled.io/backend/external/v1/collections/events \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "userId": "email@domain.com",
  "event": "Added to cart",
  "properties": {},
  "timestamp": "2012-12-02T00:30:08.276Z"
}'

Headers

Api-Key
string
required

API generated from Castled dashboard.

Body

application/json
userId
string
required

Email ID of the user triggering the event.

event
string

Name of the event being tracked.

properties
object

Flatmap for tracking additional properties related to the event.

timestamp
string

Time when the event took place. Optional, if not specified, event gets the current timestamp.