Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.saytics.com/llms.txt

Use this file to discover all available pages before exploring further.

The users endpoints let you identify users, set traits, retrieve profiles, and delete user data via the API — without going through the Saytics dashboard.

POST /v1/users/identify

Associate a user ID with a set of traits. Call this endpoint when a user signs up, logs in, or when you need to update their profile attributes.
userId
string
required
Your system’s unique identifier for the user.
traits
object
Key-value attributes to set or update on the user’s profile, such as name, email, or subscription plan.
curl -X POST https://api.saytics.com/v1/users/identify \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user_789",
    "traits": {
      "name": "Alice Smith",
      "email": "alice@example.com",
      "plan": "pro",
      "created_at": "2024-01-01T00:00:00Z"
    }
  }'

GET /v1/users/:id

Retrieve a user’s profile, including all traits set via identify() and their event history.
curl "https://api.saytics.com/v1/users/user_789" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
The response includes the following fields:
id
string
The user ID you provided when identifying the user.
traits
object
All user traits set via identify(), such as name, email, and plan.
created_at
string
ISO 8601 timestamp for when the user was first seen in Saytics.
last_seen
string
ISO 8601 timestamp of the most recent event associated with this user.

DELETE /v1/users/:id

Permanently delete a user and all of their associated data, including events and traits. This is useful for fulfilling GDPR or CCPA data erasure requests.
curl -X DELETE "https://api.saytics.com/v1/users/user_789" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"
Deleting a user removes all associated events and traits permanently. This action cannot be undone and cannot be reversed.