Reserve Available Telephony Number
Info! This is Beta version, if you have any problem in using API, please mail us at support@sarv.com
https://manage.sarv.com/api/telephony/reserveTelephonyNumber
Reserved New Telephonic Number through Sarv
request.post({url:'https://manage.sarv.com/api/telephony/reserveTelephonyNumber', formData: {'user_id':'01234567','token':'abcXYZ','did_number':'9876543210'}}, function optionalCallback(err, httpResponse, body) {
if (err) {
return console.error('upload failed:', err);
}
console.log('Upload successful! Server responded with:', body);
console.log(body);
/*
{
"msg" : "success",
"msg_text" : "Successfully Reserved for 7 Days"
}
*/
});
{
"msg" : "success",
"msg_text" : "Successfully Reserved for 7 Days";
}
{
"msg": "error",
"msg_text": "Human Readable Message"
}
Parameters |
user_id* string |
a valid Sarv User Id |
token* string |
a valid token |
did_number* string |
a valid SarvTES APP DOMAIN |
smtp_user_name* string |
a valid Telephonic Number |
* compulsory field
Return Value: Success |
struct |
the results of Reserving Telephonic Number
msg string |
success |
msg_text string |
Successfully Reserved for 7 Days |
|
|
Return Value: Error |
struct |
the error results when attempt to Reserving Telephonic Number
msg string |
error |
msg_text string |
human readable message |
|
|
Error types |
ValidationError |
The parameters passed to the API call are invalid or not provided when required. |
GeneralError |
An unexpected errors occurred processing the request. Sarv Developers will be notified. |
AuthenticationError |
Provided owner_id and token was not matched. |