Skip to main content

POST /api/identify

Updates user traits. This endpoint is optional as identify events can also be sent via /api/events.

Request

Headers

Content-Type
string
required
application/json
X-Api-Key
string
required
Your API key

Body

userId
string
required
User ID
anonymousId
string
Anonymous ID
traits
object
User traits (properties that describe the user)
timestamp
string
required
ISO 8601 timestamp

Example Request

curl -X POST https://api.solute.dev/api/identify \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your_api_key" \
  -d '{
    "userId": "user_123",
    "traits": {
      "email": "[email protected]",
      "plan": "premium",
      "created_at": "2025-01-01T00:00:00Z"
    },
    "timestamp": "2025-01-15T10:30:00Z"
  }'

Response

Success Response

success
boolean
required
true if the request was successful
userId
string
required
The user ID

Example Response

{
  "success": true,
  "userId": "user_123"
}