loading...
API Manuals

API

API KEY

About the API

The UVox API provides a simple but powerful interface that allows you to integrate your own applications with the UVox services. An extensive set of actions can be performed using this API, such as sending SMS, Checking Balance, Checking call rates, Supplying QR Codes for Softphone, Vtiger CRM Integration and other operational data. As such, this interface is the ideal tool for creating alternative dashboards, developing mobile applications and automating front-end and back-end applications.

The UVox API is a fully compatible implementation of the JSON API specification, which defines how an application should request that resources be retrieved or modified, and how a server should respond to those requests. This REST (Representational State Transfer) interface provides an easy-to-use set of HTTP endpoints that allow you to access our services using the GET, PUT, POST methods.

THIS DOCUMENT ASSUMES THAT IT IS FAMILIAR WITH THE CONCEPTS OF WEB PROGRAMMING, THE FORMATS OF WEB DATA AND WITH THE SPECIFICATION OF THE JSON API. ADDITIONAL INFORMATION ABOUT JSON IS AVAILABLE ON YOUR OFFICIAL WEBSITE.

API Keys

To use the UVox API in the production environment, you must register and receive an API key that will be used by your application.

To generate your API key, log in to your UVox account at https://my.unityvox.com/sign_in and access the section in the "API" sidebar. If you do not have an account with UVox, register for free at https://my.unityvox.com/sign_up.

Click on "Create new KEY API", place a description for your new KEY API.

You have the possibility to create up to 3 KEY APIs and use them in different applications.

You must include this key after the apikey prefix next to the accountnumber in your API requests as shown in the following example:

curl -H 'Accept: application/vnd.api+json' \
-H 'Api-Key: 4D41E00J6KMXABS' \
'https://my.unityvox.com/api/get-api/v1/

Endpoints

The endpoints for requests via API are as follows:

https://my.unityvox.com/api/get-api/v1/

SMS

HTML API


SMS messages are sent by making HTTPS calls to the API.

This command allows you to send one or more SMS messages making HTTPS calls directly to the API. To send several messages to your mobile number database, you can call this command in a loop.

Getting started is fast and easy - all you need to do is copy and paste the URL directly into your web browser to send a message! The server will respond with a unique identifier for each message (called API message ID). This API message ID can be used to track and monitor the status of your message.

For large volume messages, we recommend the use of persistent HTTPS connections (keep-alive). Multiple simultaneous HTTPS connections can also be used for additional performance.

https://my.unityvox.com/api/get-api/v1/sms-api?accountnumber={account-number}&apikey={apikey}&from=13779999999&to=13058888888&text=This%2is%2a%2test%2message

This command allows you to send one or more SMS messages. The server will respond with a unique identifier for each message. You can also send several phones in a single HTTPS request (up to 200 messages). This is useful if you are sending the same message text to multiple phones.

 <form action="https://my.unityvox.com/api/get-api/v1/sms-api" method="POST" name="form-send-sms">
     <input name="accountnumber" type="hidden" value="{account-number}" />
     <input name="apikey" type="hidden" value="{apikey}" />
      <input name="from" type="text" size="35" placeholder="From (ej: Cod country + Cod Area + phone)"/>
     <input name="to" type="text" size="35" placeholder="to (ej: Cod country + Cod Area + phone)"/>
     <textarea name="text" cols="50" rows="4" id="text" placeholder="Message" maxlength="160">
     </textarea>
     <input name="Submit" type="submit" value="Submit">
 </form>

JavaScript API


var xhr = new XMLHttpRequest();
var url = https://my.unityvox.com/api/get-api/v1/sms-api
xhr.open("POST", url+"?accountnumber={account-number}&apikey={apikey}&from=13779999999&to=13058888888&text=This%2is%2a%2test%2message", true);
xhr.onreadystatechange = function(){
  if (xhr.readyState == 4 && xhr.status == 200) {
    console.log(’success’);
  }
};
xhr.send();

CURL API


  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, "https://my.unityvox.com/api/get-api/v1/sms-api?accountnumber={account-number}&apikey={apikey}&from=13779999999&to=13779999999&text=This%2is%2a%2test%2message");
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_exec($ch);
  curl_close($ch);

Variables for sending sms

  • Variable
    Concept
  • apikey
    Private key generated in your account https: /my.unityvox.com.
  • accountnumber
    Account number, you can find it in your administration panel in the API Key section.
  • text
    Content of the text message to be sent.
  • from
    Phone number that sends the SMS, some operators and mobile teams accept text as recipient, you can place your name, Ej from = "UVox", if you place a text and the operator does not accept it the recipient will be a generic number. Some countries do not support labels so the sender will be a generic number.
  • to
    Destination telephone number.

System Responses in Shipping

  //Error response//
    {
      "version":"1.00",
      "code":"003",
      "status":"error",
      "resultstring":"Failure",
      "statusmessage":"Invalid or empty text"
    }

  //Response Success
    {
      "version":"1",
      "code":"005",
      "resultstring":"Success",
      "status":"success",
      "to":"+345735375",
      "id":"48",
       "statusmessage":"Message sent successfully"
    }

    {
      "version":"1",
      "code":"009",
      "resultstring":"Success",
      "status":"no_plan",
      "to":"+345735375",
      "id":{id_message},
       "statusmessage":"No Plan or Balance in account (SMS queued)"
    }

Variables for SMS verification

  • Variable
    Concept
  • apikey
    Private key generated in your account https: /my.unityvox.com.
  • accountnumber
    Account number, you can find it in your administration panel in the API Key section.
  • messageId
    Unique ID number of each message, at the time of sending an SMS the system will deliver said variable in your response.

System Responses in Status Verification

  //Error response//
    {
      "version":"1.00",
      "code":"010",
      "status":"error",
      "resultstring":"Failure",
       "statusmessage":"Error validating SMS, please verify ID"
     }

  //Response Success
     {
       "version":"1",
      "code":"011",
      "status":"success",
       "resultstring":"Success",
       "statusmessage":"To send"
     }

    {
      "version":"1",
      "code":"012",
      "status":"success",
       "resultstring":"Success",
       "statusmessage":"No plan available to send or Credit"
     }

     {
      "version":"1",
      "code":"013",
      "status":"success",
      "resultstring":"Success",
      "statusmessage":"SMS Sent"
     }

SMS OTP (2factor)

OTP Authentication Solution


The one-time authentication system gives security to its clients, only the user or email must be placed you use to log in to your portal and the rest will be a unique use key generated by our system.

The first request that is made is to request the unique code and the sending of the SMS with said code.

https://my.unityvox.com/api/get-api/v1/OTP-api?accountnumber={account-number}&apikey={apikey}&ref_id={ref_id}&phone_number=1305xxxxxxxx

This request generates a 6-digit random code which can be validated 1 time only and lasts for 10 minutes. If the code expires or is validated, a new one must be requested by executing the same request.

 <form action="https://my.unityvox.com/api/get-api/v1/OTP-api" method="POST" name="request_otp">
     <input name="accountnumber" type="hidden" value="{account-number}" />
     <input name="apikey" type="hidden" value="{apikey}" />
      <input name="ref_id" type="hidden" size="35" value={ref_id}"/>
     <input name="phone_number" type="text" size="35" placeholder="to (ej: Cod country + Cod Area + phone)"/>
     <input name="Submit" type="submit" value="Submit">
 </form>

JavaScript API


var xhr = new XMLHttpRequest();
var url = https://my.unityvox.com/api/get-api/v1/OTP-api
xhr.open("POST", url+"?accountnumber={account-number}&apikey={apikey}&ref_id={ref_id}&phone_number=1305xxxxxxxx", true);
xhr.onreadystatechange = function(){
  if (xhr.readyState == 4 && xhr.status == 200) {
    console.log(’success’);
  }
};
xhr.send();

CURL API


  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, "https://my.unityvox.com/api/get-api/v1/OTP-api?accountnumber={account-number}&apikey={apikey}&ref_id={ref_id}&phone_number=1305xxxxxxxx");
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_exec($ch);
  curl_close($ch);

Variables for OTP code request

  • Variable
    Concept
  • apikey
    Private key generated in your account https: /my.unityvox.com.
  • accountnumber
    Account number, you can find it in your administration panel in the API Key section.
  • ref_id
    Unique value generated when I created the Témplate in https://my.unityvox.com
  • phone_number
    Destination telephone number.

System Responses in Shipping

  //Error response//
    {
      "version":"1.00",
      "code":"020",
      "status":"error",
      "resultstring":"Failure",
      "statusmessage":"Invalid or empty Message ref_id"
    }

    {
      "version":"1.00",
      "code":"021",
      "status":"error",
      "resultstring":"Failure",
      "sessionID":"{sessionID}",
      "statusmessage":"No Plan or Balance in account"
    }

  //Response Success
    {
      "version":"1.00",
      "code":"022",
      "status":"success",
      "resultstring":"Success",
      "phone_number":{phone_number},
      "sessionID":{sessionID},
       "statusmessage":"Message sent successfully"
    }

Validation of OTP code received by your client.

In order to perform the verification of the code, you must send in your request 2 new variable that is sessionID which you received in the code request response and the code that your client received by SMS on your Mobil.

https://my.unityvox.com/api/get-api/v1/OTP-api/verify?accountnumber={account-number}&apikey={apikey}&sessionid={sessionID}&otp_code={otp_code}]

This request generates a 6-digit random code which can be validated 1 time only and lasts for 10 minutes. If the code expires or is validated, a new one must be requested by executing the same request.

 <form action="https://my.unityvox.com/api/get-api/v1/OTP-api/verify" method="POST" name="request_otp">
     <input name="accountnumber" type="hidden" value="{account-number}" />
     <input name="apikey" type="hidden" value="{apikey}" />
      <input name="sessionid" type="hidden" size="35" value={sessionid}"/>
     <input name="otp_code" type="text" size="35" value="{otp_code}"/>
     <input name="Submit" type="submit" value="Submit">
 </form>

JavaScript API


var xhr = new XMLHttpRequest();
var url = https://my.unityvox.com/api/get-api/v1/OTP-api/verify
xhr.open("POST", url+"?accountnumber={account-number}&apikey={apikey}&sessionid={sessionid}&otp_code={otp_code}", true);
xhr.onreadystatechange = function(){
  if (xhr.readyState == 4 && xhr.status == 200) {
    console.log(’success’);
  }
};
xhr.send();

CURL API


  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, "https://my.unityvox.com/api/get-api/v1/OTP-api/verify?accountnumber={account-number}&apikey={apikey}&sessionid={sessionid}&otp_code={otp_code}");
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_exec($ch);
  curl_close($ch);

Variables for OTP code validation

  • Variable
    Concept
  • apikey
    Private key generated in your account https: /my.unityvox.com.
  • accountnumber
    Account number, you can find it in your administration panel in the API Key section.
  • sessionid
    Variable sent in the response when requesting the OTP code, is a unique variable and is valid only with its OTP code.
  • otp_code
    Code sent by SMS to your client, is a unique code and has a validity of 10 minutes and can only be used once. This OTP code is validated together with the sessionid variable.

System responses in OTP code validation

  //Error response//
    {
      "version":"1.00",
      "code":"023",
      "status":"error",
      "resultstring":"Failure",
      "sessionID":"{sessionid}",
       "statusmessage":"OTP Expired"
     }

    {
       "version":"1.00",
       "code":"024",
      "status":"error",
      "resultstring":"Failure",
      "sessionID":"{sessionid}",
       "statusmessage":"Invalid API / SessionId Combination - No Entry Exists"
    }

    {
       "version":"1.00",
       "code":"025",
      "status":"error",
      "resultstring":"Failure",
      "sessionID":"{sessionid}",
       "statusmessage":"OTP Mismatch"
    }

    {
       "version":"1.00",
       "code":"026",
      "status":"error",
      "resultstring":"Failure",
      "sessionID":"{sessionid}",
       "statusmessage":"OTP already used"
    }
  //Response Success
     {
       "version":"1.00",
      "code":"027",
      "status":"success",
       "resultstring":"Success",
      "sessionID":"{sessionid}",
       "statusmessage":"OTP Matched"
     }

CRM Vtiger

This feature gives you the flexibility to send text messages to your customers. You can send text messages to multiple records in one shot. In addition to manually sending messages, you can also send automatic notifications activated by workflows in Vtiger CRM.

First you must download our library and save the content via FTP in /path CRM Vtiger/modules/SMSNotifier/providers


- Click on the SMS Notifier tab. You can find it in All the drop-down menus in the menu bar.
- Click on the wrench icon> Server configuration
- Click on New configuration and configure the following details in the pop-up window that appears.

Complete all the information requested in the form.

Vtiger
  • Variable
    Concept
  • Provider
    We select UVox from the drop-down list.
  • Active
    We set the activation of the service to yes.
  • User Name
    Your registered email in our systems when creating your account in UVox.
  • Password
    Password for your account at my.unityvox.com.
  • Accountnumber
    Account number, you can find it in your administration panel in the API Key section.
  • Apikey
    Private key generated in your account https: /my.unityvox.com.
  • From
    Phone number that sends the SMS, some operators and mobile teams accept text as recipient, you can place your name, Ej from = "UVox", if you place a text and the operator does not accept it the recipient will be a generic number. Some countries do not support labels so the sender will be a generic number.


We save the form, we have already configured our Gateway to send SMS

Vtiger

SMS sending


To send SMS to records in the list view.

- Click on the desired module. For example, contacts, contacts or organizations.
- Select the desired records to which you want to send SMS. You can select records by clicking on the corresponding boxes that precede the records.

Vtiger

- Now click on the Actions> Send SMS' drop-down menu

Vtiger

-Select the field where the mobile numbers of your contacts are stored.

Vtiger Vtiger

Zoiper

In UVox we want to facilitate the registration in your Softphone Zoiper, in its administration panel has a section called "Softphone", where you can create all the records you want and thus be able to use their services from various devices.

After downloading the Zoiper Softphone, and generating the QR in its administration panel, you can scan it.

From the same Softphone you can see your current balance, and price list according to the destination of calls.

My Balance

Returns the prepaid balance as well as the available credit on your account.

HTML API


https://my.unityvox.com/api/get-api/v1/balance?accountnumber={account-number}&apikey={apikey}

JavaScript API


var xhr = new XMLHttpRequest();
var url = https://my.unityvox.com/api/get-api/v1/balance
xhr.open("POST", url+"?accountnumber={account-number}&apikey={apikey}", true);
xhr.onreadystatechange = function(){
  if (xhr.readyState == 4 && xhr.status == 200) {
    console.log(’success’);
  }
};
xhr.send();

CURL API


  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, "https://my.unityvox.com/api/get-api/v1/balance?accountnumber={account-number}&apikey={apikey}");
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_exec($ch);
  curl_close($ch);

Variables for request

  • Variable
    Concept
  • apikey
    Private key generated in your account https: /my.unityvox.com.
  • accountnumber
    Account number, you can find it in your administration panel in the API Key section.

System responses

  //Response Success
    {
      "version":"1",
      "code":"015",
      "status":"success",
      "resultstring":"Success",
      "accountnumber":"xxxxxx",
      "currency":"US$",
      "balance":"100.00",
    }

Rates

Returns the price list of each destination that we have available in your Plan.

[{"dialprefix":"56","destination":"Chile","rateinitial":"0.02850"},
{"dialprefix":"5611","destination":"Chile Audiotext","rateinitial":"3.15000"},
{"dialprefix":"5615","destination":"Chile Audiotext","rateinitial":"3.15000"},
{"dialprefix":"51","destination":"Peru","rateinitial":"0.00750"},
{"dialprefix":"514129","destination":"Peru High Cost","rateinitial":"0.00750"},
{"dialprefix":"514229","destination":"Peru High Cost","rateinitial":"0.00750"},
{"dialprefix":"58","destination":"Venezuela","rateinitial":"0.02025"},
{"dialprefix":"58212","destination":"Venezuela Caracas","rateinitial":"0.02025"},
{"dialprefix":"5841","destination":"Venezuela Mobile","rateinitial":"0.04410"},
{"dialprefix":"58412","destination":"Venezuela Mobile Digitel","rateinitial":"0.11820"}]

HTML API


https://my.unityvox.com/api/get-api/v1/rates?accountnumber={account-number}&apikey={apikey}

JavaScript API


var xhr = new XMLHttpRequest();
var url = https://my.unityvox.com/api/get-api/v1/rates
xhr.open("POST", url+"?accountnumber={account-number}&apikey={apikey}", true);
xhr.onreadystatechange = function(){
  if (xhr.readyState == 4 && xhr.status == 200) {
    console.log(’success’);
  }
};
xhr.send();

CURL API


  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, "https://my.unityvox.com/api/get-api/v1/rates?accountnumber={account-number}&apikey={apikey}");
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_exec($ch);
  curl_close($ch);

Variables for request

  • Variable
    Concept
  • apikey
    Private key generated in your account https: /my.unityvox.com.
  • accountnumber
    Account number, you can find it in your administration panel in the API Key section.

General Responses

  //Error response//
    {
      "version":"1.00",
      "code":"001",
      "status":"error",
      "resultstring":"Failure",
      "statusmessage":"API Key Invalid or Not Available"
    }

    {
      "version":"1.00",
      "code":"002",
      "status":"error",
      "resultstring":"Failure",
      "to":"13055454xx",
      "statusmessage":"Invalid format in the destination number"
    }

    {
      "version":"1.00",
      "code":"004",
      "status":"error",
      "resultstring":"Failure",
      "statusmessage":"405, Method Not Allowed"
     }

    {
       "version":"1",
       "code":"016",
       "status":"error",
      "resultstring":"Failure",
       "statusmessage":"Missing variables in your request"
    }

    {
       "version":"1",
       "code":"500",
       "status":"error",
      "resultstring":"Failure",
       "statusmessage":"Internal problem, please tray again"
    }

Response Code

  • Código
    Description
  • 001
    API Key Invalid or Not Available.
  • 002
    Invalid format in the destination number.
  • 003
    Invalid or empty text.
  • 004
    405, Method Not Allowed.
  • 005
    Message sent successfully.
  • 009
    No Plan or Balance in account (SMS queued).
  • 010
    Error validating SMS, please verify ID.
  • 011
    To send.
  • 012
    No plan available to send or Credit.
  • 013
    SMS Sent.
  • 014
    Invalid destination number.
  • 015
    Get Balance.
  • 016
    Missing variables in your request
  • 017
    404, HTTP 404 Not Found
  • 020
    Invalid or empty Message ref_id
  • 021
    No Plan or Balance in account
  • 022
    Message sent successfully
  • 023
    OTP Expired
  • 024
    Invalid API / SessionId Combination - No Entry Exists
  • 025
    OTP Mismatch
  • 026
    OTP already used
  • 027
    OTP Matched
  • 500
    Internal problem, please tray again

Be a Global Entrepreneur



We believe that globalization and entrepreneurship are the key drivers for making this planet a better place.
By empowering entrepreneurs in the most remote corners of the world, with a telephone service that removes distance, we hope to contribute to this progress.

Sign UP

X