Skip to main content
POST
/
api
/
v1
/
users
Create a new user
curl --request POST \
  --url https://api.clix.so/api/v1/users \
  --header 'Content-Type: application/json' \
  --header 'X-Clix-API-Key: <api-key>' \
  --header 'X-Clix-Project-ID: <api-key>' \
  --data '
{
  "project_user_id": "<string>",
  "properties": {}
}
'
{
  "properties": {}
}

Overview

Creates a new user with the specified project_user_id. This endpoint allows you to register users in your project and optionally set their properties.

Authentication

This endpoint requires authentication via the following HTTP headers:
  • X-Clix-Project-ID: Your project ID
  • X-Clix-API-Key: Your Clix Secret API Key

Request Body

FieldTypeRequiredDescription
project_user_idstringYesUnique identifier for the user in your project
propertiesobjectNoUser properties as key-value pairs where values can be string, number, boolean, or null

Example Request

{
  "project_user_id": "clix_user",
  "properties": {
    "email": "[email protected]",
    "age": 25,
    "premium": true,
    "subscription_tier": "gold"
  }
}

Response

Success Response (200 OK)

Returns the created user properties:
{
  "properties": {
    "email": "[email protected]",
    "age": 25,
    "premium": true,
    "subscription_tier": "gold"
  }
}

Error Responses

400 Bad Request

Returned when:
  • project_user_id is missing or invalid
  • Request body is malformed
Returns a plain text error message:
Project User Id must be provided

401 Unauthorized

Authentication failed or invalid API key.

Notes

  • The project_user_id must be unique within your project
  • If a user with the same project_user_id already exists, this endpoint will update the existing user’s properties
  • User properties are optional but recommended for personalization and segmentation
  • The response returns only the properties object, not the full user object

Authorizations

X-Clix-Project-ID
string
header
required

Project ID for authentication

X-Clix-API-Key
string
header
required

API Key for authentication

Body

application/json

User data to create

Request to create a new user

project_user_id
string
required

Unique identifier for the user in your project

properties
object

User properties as key-value pairs

Response

User created successfully

Response containing the created user properties

properties
object

User properties as key-value pairs