This API is used to delete existing phone number details in CloudAgent. The user has to update the ‘action’ parameter with the delete function. For example, if the action parameter = delete along with the following parameters, this API creates a new 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":"delete",
"phoneNumber":"xxxx",
"phoneName":"xxxxx"}
Parameter | Description |
---|---|
userName* | CloudAgent user name |
action* | "delete" to delete an existing phone number |
phoneNumber* | The phone number that is to be deleted. |
phoneName* | Optional name to the Phone number or lead. |
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" |
Invalid api_key | "status": "error" |
Invalid action | "status": "error" |
Invalid phoneNumber | "status": "error" |
Invalid username | "status": "error" |
Empty phoneName | "status": "error" |
Empty phoneNumber | "status": "error" |