Update a user
curl --request PATCH \
--url https://app.rookoo.ai/platform/api/v1/users/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "Daniel",
"display_name": "Dan",
"email": "[email protected]",
"password": "Password2!",
"custom_attributes": {}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Daniel',
display_name: 'Dan',
email: '[email protected]',
password: 'Password2!',
custom_attributes: {}
})
};
fetch('https://app.rookoo.ai/platform/api/v1/users/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/platform/api/v1/users/{id}"
payload = {
"name": "Daniel",
"display_name": "Dan",
"email": "[email protected]",
"password": "Password2!",
"custom_attributes": {}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"access_token": "<string>",
"account_id": 123,
"available_name": "<string>",
"avatar_url": "<string>",
"confirmed": true,
"display_name": "<string>",
"message_signature": "<string>",
"email": "<string>",
"hmac_identifier": "<string>",
"inviter_id": 123,
"name": "<string>",
"provider": "<string>",
"pubsub_token": "<string>",
"role": "agent",
"ui_settings": {},
"uid": "<string>",
"type": "<string>",
"custom_attributes": {},
"accounts": [
{
"id": 123,
"name": "<string>",
"status": "<string>",
"active_at": "2023-11-07T05:31:56Z",
"role": "administrator",
"permissions": [
"<string>"
],
"availability": "<string>",
"availability_status": "<string>",
"auto_offline": true
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Users
Update a user
Update a user’s attributes
PATCH
/
platform
/
api
/
v1
/
users
/
{id}
Update a user
curl --request PATCH \
--url https://app.rookoo.ai/platform/api/v1/users/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"name": "Daniel",
"display_name": "Dan",
"email": "[email protected]",
"password": "Password2!",
"custom_attributes": {}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Daniel',
display_name: 'Dan',
email: '[email protected]',
password: 'Password2!',
custom_attributes: {}
})
};
fetch('https://app.rookoo.ai/platform/api/v1/users/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.rookoo.ai/platform/api/v1/users/{id}"
payload = {
"name": "Daniel",
"display_name": "Dan",
"email": "[email protected]",
"password": "Password2!",
"custom_attributes": {}
}
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"access_token": "<string>",
"account_id": 123,
"available_name": "<string>",
"avatar_url": "<string>",
"confirmed": true,
"display_name": "<string>",
"message_signature": "<string>",
"email": "<string>",
"hmac_identifier": "<string>",
"inviter_id": 123,
"name": "<string>",
"provider": "<string>",
"pubsub_token": "<string>",
"role": "agent",
"ui_settings": {},
"uid": "<string>",
"type": "<string>",
"custom_attributes": {},
"accounts": [
{
"id": 123,
"name": "<string>",
"status": "<string>",
"active_at": "2023-11-07T05:31:56Z",
"role": "administrator",
"permissions": [
"<string>"
],
"availability": "<string>",
"availability_status": "<string>",
"auto_offline": true
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
This token can be obtained by the system admin after creating a platformApp. This token should be used to provision agent bots, accounts, users and their roles.
Path Parameters
The numeric ID of the user on the platform
Body
application/json
Name of the user
Example:
"Daniel"
Display name of the user
Example:
"Dan"
Email of the user
Example:
Password must contain uppercase, lowercase letters, number and a special character
Example:
"Password2!"
Custom attributes you want to associate with the user
Example:
{}
Response
Success
Available options:
agent, administrator Available for users who are created through platform APIs and has custom attributes associated.
Show child attributes
Show child attributes