POST
/
external
/
v1
/
collections
/
users
curl --request POST \
  --url https://api.castled.io/backend/external/v1/collections/users \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "userId": "1a56624a-1223bc-127283d",
  "traits": {}
}'

Headers

Api-Key
string
required

API generated from Castled dashboard.

Body

application/json
User data to be tracked.

Schema representing the user data.

userId
string
required

Unique id of the user

Example:

"1a56624a-1223bc-127283d"

traits
object

Flatmap for tracking traits associated with the user.

Response

204

User successfully tracked