Users API

The Users API allows you to create, update, and manage user identities and profiles.


Identify / Set User Properties

Creates a new user profile or updates an existing one if the distinct_id already exists.

Endpoint

POST /public/identify

Authentication

Include your Public API Key in the JSON payload.

Parameters

ParameterTypeRequiredDescription
apiKeystringYesYour Public API Key.
distinct_idstringYesThe unique identifier of the user.
propertiesobjectNoA dictionary of properties to set on the user's profile.

Request Example

curl -X POST "https://api.empmix.com/public/identify" \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "YOUR_PUBLIC_API_KEY",
    "distinct_id": "user_123",
    "properties": {
      "$name": "John Doe",
      "$email": "test@test.com",
      "plan": "pro"
    }
  }'

Advanced Profile Operations (People API)

Increment numeric values (e.g., login count) or append to arrays (e.g., list of interests) safely without overwriting the entire profile.

Endpoint

POST /public/people/set

Authentication

⚠️
Privileged Endpoint
This endpoint requires your Secret Key.

Parameters

ParameterTypeRequiredDescription
apiKeystringYesYour Secret Key.
distinct_idstringYesThe unique identifier of the user.
operationsobjectYesAn object detailing the operations to perform ($set, $add, $append).

Request Example

{
  "apiKey": "YOUR_SECRET_KEY",
  "distinct_id": "user_123",
  "operations": {
    "$set": {
      "last_login": "2023-10-27"
    },
    "$add": {
      "login_count": 1
    }
  }
}

Alias Identity

Links an anonymous device ID to a newly created database user ID (typically used upon signup).

Endpoint

POST /public/alias

Authentication

Include your Secret Key in the JSON payload.

Parameters

ParameterTypeRequiredDescription
apiKeystringYesYour Secret Key.
alias_idstringYesThe permanent ID to link to.
original_idstringYesThe anonymous ID you are aliasing from.

Request Example

{
  "apiKey": "YOUR_SECRET_KEY",
  "alias_id": "user_123",
  "original_id": "anon_456"
}
Last updated on June 4, 2026