Users - Update
With the update Users endpoint, Cogniac users may update their own User object data. Currently, users can only update name fields. For additional user account changes, please contact Cogniac support.
Field | Example | Definition |
---|---|---|
user_id string | "2ke2daisdflkj" | The ID of the user to be updated. Users can only change their own user data. |
POST /1/users/{user_id}
Host: https://api.cogniac.io
Example: Update a User with the 'current' Identifier
curl -X POST https://api.cogniac.io/1/users/current \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz" \
-H "Content-Type: application/json" \
-d \
'{
"surname":"Doe",
}'
import requests
my_headers = {"Authorization": "Bearer abcdefg.hijklmnop.qrstuvwxyz"}
user_data = {
"surname":"Doe"
}
res = requests.post("https://api.cogniac.io/1/users/current",
data=user_data,
headers=my_headers)
{
"user_id": "2ke2daisdflkj",
"given_name":"Jane",
"surname":"Doe",
"status":"enabled",
"email":"[email protected]",
}
Updated over 6 years ago