API
Users
curl --request POST \
  --url https://api.frigade.com/v1/public/users \
  --header 'Authorization: Bearer <token>'

The users endpoint allows you to create users, add events, and update user properties. The endpoint is especially useful for bootstrapping your user data in Frigade so that you can target Flows based on user properties and events.

Creating users in Frigade

Frigade will create a user for any foreignId that is sent to the users endpoint, which does not already exist. If the user already exists, the user will be updated with the new properties and events.

If you wish to create a user without any properties, you can simply call the endpoint with the foreignId:

curl -i -X POST \
   -H "Authorization:Bearer api_public_J3FNG3dJASDKLW98SN4KLOJHNTYUFGNVSK" \
   -H "Content-Type:application/json" \
   -d \
'{
  "foreignId":"MyUserId"
}' \
 'https://api.frigade.com/v1/public/users'

Add events to a user

curl -i -X POST \
   -H "Authorization:Bearer api_public_J3FNG3dJASDKLW98SN4KLOJHNTYUFGNVSK" \
   -H "Content-Type:application/json" \
   -d \
'{
  "foreignId":"MyUserId",
  "events": [
    {
      "event": "ProjectCreation",
      "properties": {
        "hasCreatedProject": true
      }
    }
  ]
}' \
 'https://api.frigade.com/v1/public/users'

Update user properties

curl -i -X POST \
   -H "Authorization:Bearer api_public_J3FNG3dJASDKLW98SN4KLOJHNTYUFGNVSK" \
   -H "Content-Type:application/json" \
   -d \
'{
  "foreignId":"MyUserId",
  "properties": {
    "hasCreatedProject": true
  }
}' \
 'https://api.frigade.com/v1/public/users'