get https://{domainname}/ca_apis/PhoneManageV2
Get Phone Number Details API is used to get the existing phone number details in CloudAgent. The user MUST pass the ‘action’ parameter with the ‘get’ function.
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
Pass the body parameters in the format:
{
"userName":"xxxxx",
"action":"get",
"phoneName":"xxxxxxx"
"phoneNumber":"918xxxxxxx51"
}
Parameter | Description |
---|---|
userName* | CloudAgent user name |
action* | The action MUST be ‘get’. (case sensitive) |
phoneNumber* | Phone number for which the details are required |
phoneName* | Phone name of which the details are required |
Note
- The action parameter, ‘get’ is case sensitive.
- You need to pass either phoneName or phoneNumber to get the other one.
Possible responses
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 phoneNumber | "status": "error" "message": "phoneNumber cannot be empty" |
phoneNumber details | "phoneNumber": "94XXXXXX" "phoneName": "PaXXXXX" |