Update User Preferences Setting

Updates the preferences of the current user, including the presence settings and the call forwarding rules.

Request URL

PUT {base_url}/uc-cconfig/api/v1/users/preferences

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code Yes String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.
Body parameters
Parameter Required Type Description
firstName No String The first name of the user.
lastName No String The last name of the user.
email No String The email address of the user.
mobile No String The mobile number of the user.
presences No Array<Presence_Config_Input> The presence configuration list of the user.
Presence_Config_Input
Parameter Required Type Description
presence No String

The presence status:

Valid value:

  • AVAILABLE
  • AWAY
  • DND
  • LUNCH
  • BUSINESS_TRIP
  • OFF_WORK
config No Object<Presence_Setting> The configuration that takes effect when the presence status is active.
Presence_Setting
Parameter Required Type Description
callForwarding No Object<Call_Forwarding> The call forwarding configuration.
ringStrategy No Object<Ring_Strategy> The ring strategy configuration.
ringTimeout No Integer The ring timeout, in seconds.
information No String The additional presence information.
Call_Forwarding
Parameter Required Type Description
internal No Object<Forward_Rules> The call forwarding rules for internal calls.
external No Object<Forward_Rules> The call forwarding rules for external calls.
Forward_Rules
Parameter Required Type Description
always No Object<Forward_Rule> The rule for forwarding all calls.
noAnswer No Object<Forward_Rule> The rule for forwarding calls when there is no answer.
whenBusy No Object<Forward_Rule> The rule for forwarding calls when the line is busy.
Forward_Rule
Parameter Required Type Description
enabled No Boolean Whether the forwarding rule is enabled.
destinationType No String The type of the forwarding destination, such as USER_VOICEMAIL and USER.
destinationValue No String The value of the forwarding destination.
repeatCount No Integer The repeat count for the forwarding.
Ring_Strategy
Parameter Required Type Description
firstPriority No Array<String> The list of client types that ring first, such as SIP, MOBILE, DESKTOP, and WEB.
secondPriority No Array<String> The list of client types that ring second.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<User_Brief> The updated user information.
User_Brief
Parameter Type Description
id String The ID of the user.
extension String The extension number of the user.
firstName String The first name of the user.
lastName String The last name of the user.
email String The email address of the user.
mobile String The mobile number of the user.
userRole String

The role of the user:

  • ROLE_USER
  • ROLE_ADMIN
currentPresence String

The current presence status of the user:

  • AVAILABLE
  • AWAY
  • DND
  • LUNCH
  • BUSINESS_TRIP
  • OFF_WORK
createdAt String The time when the user was created, in Unix timestamp format (milliseconds).
updatedAt String The time when the user was last updated, in Unix timestamp format (milliseconds).
avatarUrl String The avatar URL of the user.

Example

Request example

PUT /uc-cconfig/api/v1/users/preferences HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxMDAwQGNvbG9ydGVzdDIiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJ1c2VyX25hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiY2xpZW50X2V4dCI6eyJkZXNjcmlwdGlvbiI6IueuoeeQhuWQjuWPsFdlYuW6lOeUqCIsInBsYXRmb3JtIjoid2ViIn0sImV4cCI6MTc5MzYyMTI4NiwiaWF0IjoxNzkzNTk5Njg2LCJqdGkiOiI3ZmM2ZmZiMC02NTBlLTQyZjYtOGJmOC0wZmE3ZWFmYjY3YjgiLCJjbGllbnRfaWQiOiJub3ZvLWFkbWluLXdlYiIsInNpZCI6ImE0NDVkYjRhLTNkMjEtNGRlMi1hYmI2LWEwZmY5NjNmZjY3OCIsInVzZXJfZXh0Ijp7InJvbGVJZHMiOlsxMDJdLCJwdWlkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJ0ZW5hbnRJZCI6MjA3OTUwNDIwNTMwOTE5NDI0MSwicGFyZW50VWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5NiwidGVuYW50Q29kZSI6ImNvbG9ydGVzdDIiLCJ0eXBlIjoiVF9VU0VSIiwidXNlcklkIjoyMDc5NzQ2OTE1Mzg4MDc2MDMzLCJlbWFpbCI6Imxlb0BzYW1wbGUuY29tIiwidXNlcm5hbWUiOiIxMDAwQGNvbG9ydGVzdDIiLCJ1Y0lkIjozMDc2OTEzNjQ0ODkwODMyODk2fX0.Fetld7VQ6Vu5239kNE05a_-VVdNIHOHwZ3v-GTUmh47xxyKXPtbihGCEMR8-PDS2w1RzMGQKD-3ehpmojGyyh5GaaWl4yBnWg7zZlxrYciXtqsuCAcKre4fr_UViOQAVNkj3huuKEtUUjQtbbsb8WOv6w2rhfKJthJma4XRwoA3iDR8Snr5wT5cUa3kVEomSf1VQtAIMyEWrPXlt5kSPX11ZK3lB-JZtstKa84MIpgrHMlthJDiyYbOlRKDcq570kDQI4BrYCX1sIjACnUHiyvd_7qxK9rNcihnXgbTOC2sEvEJJDwdudoNBENZgH-tKV7wR_8jpaKxa6Djkf_x1sA
x-tenant-code: jint
Content-Type: application/json
{
  "firstName": "Leo",
  "lastName": "Ball",
  "email": "leo@sample.com"
}

Response example

HTTP/1.1 200 OK
{
  "requestId": "ff623b942c7e355566f4c694a2e47724",
  "code": "200",
  "message": "SUCCESS",
  "detailMessage": "",
  "result": {
    "id": "338136731335409664",
    "extension": "1000",
    "firstName": "Leo",
    "lastName": "Ball",
    "email": "leo@sample.com",
    "mobile": "+8615880123456",
    "userRole": "ROLE_ADMIN",
    "currentPresence": "AVAILABLE",
    "createdAt": "1784685279030",
    "updatedAt": "1793599723884",
    "avatarUrl": "https://novo-one-tst-self-operated-business.s3.ap-east-1.amazonaws.com/public/platform/jint/user_avatar/1786586611608/1.png"
  }
}