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

Headers

App-Id
string
required

Unique identifier for the application.

Api-Key
string
required

Authentication key to access the API.

Body

application/json
type
string

The type of event being tracked.

userId
string
required

Email ID of the user triggering the event.

event
string

Name of the event being tracked.

properties
object

Additional properties related to the event.

timestamp
string

Time when the event took place.

Response

200 - application/json
message
string

Details about the tracking status.