Endpoint facilitating the programatic upsertion of a user. Users must be upserted 1 at a time. Events created for this user are for historical tracking purposes. Any event tied to a user through this endpoint will not trigger a study through Sprig’s SDK. Attributes and attribute values can be created and tied to a user through this endpoint.
curl --request POST \
--url https://api.sprig.com/v2/users \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"attributes": {
"customer": "true"
},
"email": "user@test.com",
"events": [
{
"event": "login",
"timestamp": 1626448859836
}
],
"userId": "12347"
}
'{
"error": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://docs.sprig.com/llms.txt
Use this file to discover all available pages before exploring further.
API-Key YOUR_API_KEY
Post the necessary fields for the API to upsert a new user.
Accepted
curl --request POST \
--url https://api.sprig.com/v2/users \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"attributes": {
"customer": "true"
},
"email": "user@test.com",
"events": [
{
"event": "login",
"timestamp": 1626448859836
}
],
"userId": "12347"
}
'{
"error": "<string>"
}