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": {}
}
'import requests
url = "https://api.clix.so/api/v1/users"
payload = {
"project_user_id": "<string>",
"properties": {}
}
headers = {
"X-Clix-Project-ID": "<api-key>",
"X-Clix-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Clix-Project-ID': '<api-key>',
'X-Clix-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({project_user_id: '<string>', properties: {}})
};
fetch('https://api.clix.so/api/v1/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clix.so/api/v1/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project_user_id' => '<string>',
'properties' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Clix-API-Key: <api-key>",
"X-Clix-Project-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clix.so/api/v1/users"
payload := strings.NewReader("{\n \"project_user_id\": \"<string>\",\n \"properties\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Clix-Project-ID", "<api-key>")
req.Header.Add("X-Clix-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.clix.so/api/v1/users")
.header("X-Clix-Project-ID", "<api-key>")
.header("X-Clix-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"project_user_id\": \"<string>\",\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clix.so/api/v1/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Clix-Project-ID"] = '<api-key>'
request["X-Clix-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_user_id\": \"<string>\",\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"properties": {}
}"Project User Id must be provided"Users
Create User
Creates a new user with the specified project_user_id
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": {}
}
'import requests
url = "https://api.clix.so/api/v1/users"
payload = {
"project_user_id": "<string>",
"properties": {}
}
headers = {
"X-Clix-Project-ID": "<api-key>",
"X-Clix-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Clix-Project-ID': '<api-key>',
'X-Clix-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({project_user_id: '<string>', properties: {}})
};
fetch('https://api.clix.so/api/v1/users', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.clix.so/api/v1/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project_user_id' => '<string>',
'properties' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Clix-API-Key: <api-key>",
"X-Clix-Project-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.clix.so/api/v1/users"
payload := strings.NewReader("{\n \"project_user_id\": \"<string>\",\n \"properties\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Clix-Project-ID", "<api-key>")
req.Header.Add("X-Clix-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.clix.so/api/v1/users")
.header("X-Clix-Project-ID", "<api-key>")
.header("X-Clix-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"project_user_id\": \"<string>\",\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clix.so/api/v1/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Clix-Project-ID"] = '<api-key>'
request["X-Clix-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_user_id\": \"<string>\",\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"properties": {}
}"Project User Id must be provided"Overview
Creates a new user with the specifiedproject_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 IDX-Clix-API-Key: Your Clix Secret API Key
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
project_user_id | string | Yes | Unique identifier for the user in your project |
properties | object | No | User 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_idis missing or invalid- Request body is malformed
Project User Id must be provided
401 Unauthorized
Authentication failed or invalid API key.Notes
- The
project_user_idmust be unique within your project - If a user with the same
project_user_idalready 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
Project ID for authentication
API Key for authentication
Body
application/json
User data to create
Response
User created successfully
Response containing the created user properties
User properties as key-value pairs
Was this page helpful?