Update the Information of a YCM User
Update the user information of a specific YCM user.
Request URL
PUT {base_url}/dm/open_api/v1/users/{userId}
Request parameters
Path parameter| Parameter | Required | Type | Description |
|---|---|---|---|
| userId | Yes | Long | The ID of the YCM user. |
Headers
Body| Parameter | Required | Type | Description |
|---|---|---|---|
| Authorization | Yes | String | Pass the access token in the header. Format: Bearer {access_token}. |
| Parameter | Required | Type | Description |
|---|---|---|---|
| company | No | String | Company name. |
| firstName | No | String | First name. |
| lastName | No | String | Last name. |
| No | String | Email. | |
| phone | No | String | Phone number. |
| mobile | No | String | Mobile number. |
| address | No | String | Address. |
| remark | No | String | Remark. |
| twoFactorAuthenticationEnable | No | String | Whether to disable Two-factor Authentication feature for the
user account. Valid value:
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| status | String | Request result:
|
| time | Long | The response time. Note: The YCM API response returns a
timestamp, you can convert the timestamp to detailed
date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
|
Example
Request example
Update the company information of a YCM user (ID: 13329).PUT /dm/open_api/v1/user/13329 HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NzM0OSwidmVyc2lvbiI6MTYzODk1OTkwOSwicmVmcmVzaFZlcnNpb24iOjE2NjQ0Mzc2MjB9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjY0NDM5NDIwLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiI4Y2MyNTcwNS0yZjg1LTQ1NzctOWFmYy00NjllZGJmN2Y0ODUiLCJjbGllbnRfaWQiOiJrcDl5eW50bXVlc3VrNWpvV3ZNa1RiQ0J4cU82TEtSaCJ9.6V-WgKLIpGYY-nvmRCqUXmrKvN9ajk8nBBzzw7Jv82s
Content-Type: application/json
{
"company": "New Company Name"
}Response exampleHTTP/1.1 200 OK
{
"requestId": "bed793ceb96f19a58177b53a3097a1d8",
"status": "Success",
"time": 1664437503
}