Update a User - Cognigy Documentation
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Update a User
PATCH /management/v2.0/users/{userId}
Try it
cURL
curl --request PATCH \
--url https://api-trial.cognigy.ai/new/management/v2.0/users/{userId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '\n{\n "id": "<string>",\n "name": "<string>",\n "acceptedTOS": true,\n "disabled": true,\n "cxoneEmail": "<string>",\n "cxoneId": "<string>",\n "newPassword": "<string>"\n}\n'
Python
import requests
url = "https://api-trial.cognigy.ai/new/management/v2.0/users/{userId}"
payload = {
"id": "<string>",
"name": "<string>",
"acceptedTOS": True,
"disabled": True,
"cxoneEmail": "<string>",
"cxoneId": "<string>",
"newPassword": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)
JavaScript (Fetch API)
const options = {
method: 'PATCH',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
acceptedTOS: true,
disabled: true,
cxoneEmail: '<string>',
cxoneId: '<string>',
newPassword: '<string>'
})
};
fetch('https://api-trial.cognigy.ai/new/management/v2.0/users/{userId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, [\
CURLOPT_URL => "https://api-trial.cognigy.ai/new/management/v2.0/users/{userId}",\
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([\
'id' => '<string>',\
'name' => '<string>',\
'acceptedTOS' => true,\
'disabled' => true,\
'cxoneEmail' => '<string>',\
'cxoneId' => '<string>',\
'newPassword' => '<string>'\
]),\
CURLOPT_HTTPHEADER => [\
"Authorization: Basic <encoded-value>",\
"Content-Type: application/json"\
],\
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-trial.cognigy.ai/new/management/v2.0/users/{userId}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"acceptedTOS\": true,\n \"disabled\": true,\n \"cxoneEmail\": \"<string>\",\n \"cxoneId\": \"<string>\",\n \"newPassword\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}
Error Responses
Error responses may include:
{
"type": "Bad Request",
"title": "Bad Request Error",
"status": 400,
"detail": "Validation failed. Missing payload.",
"instance": "/v2.0/flows/5ce7c2d833ea1e04d7e6c432",
"code": 1000,
"traceId": "api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f",
"details": {}
}
Successful Update: 204
The user is updated successfully.
Authorizations
Authorization: Basic Authentication - required for Management-UI.
Headers
- Accept: Specifies the media type expected in the response. Default is
application/json.
Path Parameters
- userId: String (24 characters) - Id of the User, must match the pattern
^[a-z0-9]{24}$.
Body Parameters
- id: String
- name: String
- acceptedTOS: Boolean
- disabled: Boolean
- cxoneEmail: String
- cxoneId: String
- newPassword: String
Response
- Status Code: 204 - User updated successfully.
Last modified on July 8, 2026.