Update an existing user
curl --request PATCH \
--url https://api.clix.so/api/v1/users/{project_user_id} \
--header 'Content-Type: application/json' \
--header 'X-Clix-API-Key: <api-key>' \
--header 'X-Clix-Project-ID: <api-key>' \
--data '
{
"properties": {}
}
'import requests
url = "https://api.clix.so/api/v1/users/{project_user_id}"
payload = { "properties": {} }
headers = {
"X-Clix-Project-ID": "<api-key>",
"X-Clix-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Clix-Project-ID': '<api-key>',
'X-Clix-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({properties: {}})
};
fetch('https://api.clix.so/api/v1/users/{project_user_id}', 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/{project_user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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/{project_user_id}"
payload := strings.NewReader("{\n \"properties\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.clix.so/api/v1/users/{project_user_id}")
.header("X-Clix-Project-ID", "<api-key>")
.header("X-Clix-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clix.so/api/v1/users/{project_user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Clix-Project-ID"] = '<api-key>'
request["X-Clix-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"properties": {}
}"Project User Id must be provided"Users
Update User
Updates user properties
PATCH
/
api
/
v1
/
users
/
{project_user_id}
Update an existing user
curl --request PATCH \
--url https://api.clix.so/api/v1/users/{project_user_id} \
--header 'Content-Type: application/json' \
--header 'X-Clix-API-Key: <api-key>' \
--header 'X-Clix-Project-ID: <api-key>' \
--data '
{
"properties": {}
}
'import requests
url = "https://api.clix.so/api/v1/users/{project_user_id}"
payload = { "properties": {} }
headers = {
"X-Clix-Project-ID": "<api-key>",
"X-Clix-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Clix-Project-ID': '<api-key>',
'X-Clix-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({properties: {}})
};
fetch('https://api.clix.so/api/v1/users/{project_user_id}', 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/{project_user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'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/{project_user_id}"
payload := strings.NewReader("{\n \"properties\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.clix.so/api/v1/users/{project_user_id}")
.header("X-Clix-Project-ID", "<api-key>")
.header("X-Clix-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clix.so/api/v1/users/{project_user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Clix-Project-ID"] = '<api-key>'
request["X-Clix-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"properties": {}
}"Project User Id must be provided"Overview
Updates an existing user identified by theirproject_user_id. This endpoint allows you to modify user properties. Only the fields provided in the request will be updated.
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
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project_user_id | string | Yes | The unique identifier of the user to update |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
properties | object | No | User properties to update as key-value pairs where values can be string, number, boolean, or null |
Example Request
PATCH /api/v1/users/clix_user
{
"properties": {
"email": "[email protected]",
"subscription_tier": "premium",
"last_login": "2025-01-10T12:00:00Z",
"login_count": 42
}
}
Response
Success Response (200 OK)
Returns the updated user properties:{
"properties": {
"email": "[email protected]",
"subscription_tier": "premium",
"last_login": "2025-01-10T12:00:00Z",
"login_count": 42
}
}
Error Responses
400 Bad Request
Returned when:project_user_idis missing or invalid- Request body is malformed
Project User Id must be provided
404 Not Found
The user with the specifiedproject_user_id does not exist.
Returns an empty response body with 404 status code.
401 Unauthorized
Authentication failed or invalid API key.Notes
- Only the properties provided in the request body will be updated
- Existing properties not included in the request will remain unchanged
- If the user does not exist, a 404 error will be returned
- Properties with the same key will be overwritten with the new values
- The response returns only the properties object, not the full user object
Authorizations
Project ID for authentication
API Key for authentication
Path Parameters
The unique identifier of the user to update
Body
application/json
User data to update
Request to update a user
User properties to update as key-value pairs
Response
User updated successfully
Response containing the updated user properties
User properties as key-value pairs
Was this page helpful?