post https://{domainname}/ca_apis/PhoneManageV2
This API is used to edit existing phone number details in CloudAgent. The user has to update the ‘action’ parameter with the 'edit' function. For example, if the action parameter = edit along with the following parameters, this API edits the edits phone number.
Note:
Make sure the admin setting 'API Authentication' is set to 'BASIC_AUTH', If you are using this API.
Header parameters
Parameter | Description |
---|---|
apiKey* | Your CloudAgent account API Key |
Content-Type | application/json |
Body Params
{
"userName":"xxxx",
"action":"edit",
"phoneNumber":"xxxxx",
"phoneName":"xxxx",
"phoneNumberNew":"xxxx",
"phoneNameNew":"xxxx"
"unAssignSkill":"kolm,lok,Python",
"assignSkill":"General,QA_Skill,kolm,lok,Python"}
Parameter | Description |
---|---|
userName* | CloudAgent user name |
action* | "edit" |
phoneNumber* | Existing phone number that is to be edited |
phoneName* | Existing phone name which is to be edited |
phoneNumberNew* | New number to be updated |
PhoneNameNew | New name to be updated |
unAssignSkill | To un assign skills while editing the phone Number |
assignSkill | To assign skills while editing the phone Number |
Note
- Parameters with ‘*’ are considered to be mandatory parameters.
- phoneNumber with special characters(+1, +91 etc.,) are to be encoded(add %2B instead of ‘+’) while passing in the request.
- The ‘phoneName’ parameter is not case-sensitive.
Possible responses
Success response | "status": "success" "message": "record inserted successfully" |
Invalid api_key | "status": "error" "message": "userName or apiKey not valid" |
Invalid action | "status": "error" "message": "action not valid" |
Invalid phoneNumber | "status": "error" "message": "phoneNumber must be numeric" |
Invalid username | "status": "error" "message": "userName or apiKey not valid" |
Empty phoneName | "status": "error" "message": "phoneName cannot be empty" |
Empty phoneNumber | "status": "error" "message": "phoneNumber cannot be empty" |
Number/Name exists | "status": "error" "message": "phone_name or phone_number already exist" |
If the phone number creation limit exceeded | "status": "error" "message":" Phone Number Limit Exceeded. Please refer to the 'Phone Number Creation Limit' option under 'Edit Profile' for reference. " |
Invalid Skill Key | "status": "success" "message": "record inserted successfully and failed to insert skills please pass the valid skills" |
Missing Skill Value | "status": "success" "message": "record inserted successfully and failed to insert skills please pass the valid skills" |