Skip to main content
POST
/
v2
/
users
Upsert a User
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.

Headers

Authorization
string
required

API-Key YOUR_API_KEY

Body

application/json

Post the necessary fields for the API to upsert a new user.

userId
string
required

Existing or desired id for visitor

attributes
object

Key value pairs of attributes

emailAddress
string

Valid Email to track visitor by

events
object[]

Response

Accepted