VT - Communication Platform

Welcome to the future of communication with VT CPaaS (Communication Platform as a Service). This powerful platform is revolutionizing how organizations interact and collaborate. Our integration documentation is your roadmap to leveraging VT CPaaS's cutting-edge features and benefits. Enhance customer engagement, streamline your internal communication, and propel your business towards unprecedented growth. With VT's global coverage, spanning numerous countries, you're equipped to handle a variety of communication needs – from transactional and promotional to International A2P traffic.

VT CPaaS offers a versatile set of communication APIs, including SMS API, WhatsApp API, and Voice API. These APIs empower businesses to incorporate SMS messaging, WhatsApp chat functionality and voice communication capabilities into their applications and services. With these tools, VT CPaaS enables organizations to enhance customer engagement, streamline communication processes, and provide diverse communication options for their users. This integration documentation will guide stakeholders on how to effectively implement and utilize these APIs to meet their specific communication needs and objectives.

The documentation provides a step-by-step guide for integrating VT CPaaS into existing systems, covering API setup, and customization. Detailed code samples and troubleshooting tips ensure a smooth integration experience, empowering stakeholders to unlock the potential of modern communication technologies for improved customer and employee interactions.

INTEGRATION API

                    SMS API TESTER 
                

APIs (Application Programming Interface) are software interfaces that allow developers to integrate messaging features into their systems or apps. It can be used for different purposes, such as to send alerts, OTPs/two factor authentication messages, informational messages, promotional messages, and other general transactional messages.

Developers can use SMS API to develop custom SMS applications or integrate it into the existing systems.

VT CPAAS Platform – Basics of SMS API

Veevo tech provides a two-way SMS API with a enterprise grade high-speed network for sending and receiving messages.

VT has coverage in a number of countries across Global, which supports multiple traffic volume including transactional, promotional or International A2P traffic.

The API is language independent, which means you can integrate in almost any language,where the system should have access to internet to exchange data with VT network.

The billing system within version 3.0 is on prepaid basis, where you can recharge your account in a number of currencies being offered, and an SMS is being charged from your available balance at the defined price point.

Generally, an SMS is considered as 160 characters as per technical standards in-case the characters used in SMS lies within the GSM SMS character set (GSM-7-character set), whereas if the SMS includes some special characters (not defined in GSM-7) then it is treated as Unicode character-set SMS and the per SMS characters are reduced to 70 characters.

However there is logic in characters calculations if there is a single message then it is considered 160 or 70 in-case of Unicode, however the characters are increased then per message characters limit is considered as 153 or 67 respectively, so for example you a have content in Unicode that is consuming around 85 characters, then you will be charged for two message, your characters would be 67+67, you have total of 134 characters available.

Billing Pulse/Events

Billing varies from service to services, in-case of SMS as explained in Basic of SMS API, the charging is done based on the number of SMS/pages submitted as per globally recognized standards of characters count within one single SMS.
The billing within SMS API is always done on successful submit basis - whenever the system accepts your SMS for onwards delivery, you are charged, irrespective of destination number availability/unsuccessful delivery in-case of network coverege issues.
The rate is charged as per the agreed tarrif.

In-case of Voice Call, our standard charging mechanism works on 30 seconds pulse, whenever a call is picked successfully by the end-user/destination number you are charged for initial 30 seconds pulse, and this goes on as long as the call is active.

SENDING NEW SMS REQUEST

To push a new SMS Message on the VT network, you need to pass below-mentioned required parameters on the end-point.

End-point URL
https://api.veevotech.com/v3/sendsms
The parameters defined are acceptable via GET, POST or JSON Body
                
GET Sample Request: You can use below mentioned URL to raise a new request, just put relevant
values in respective fields.
https://api.veevotech.com/v3/sendsms?hash=API_KEY_HERE&receivernum=
+923xxxxxxxxx&sendernum=Default&textmessage=HelloWorld
POST Request JSON Body: Here is JSON Body that can be sent on the above end-point in-case of
a POST request.
{ "apikey": " API_KEY_HERE ", "receivernum": "+923001234567", "sendernum": "Default", "textmessage": "Hello, this is test SMS" }

REQUEST PARAMETERS

The parameters & its description is as follows,

Parameter Status Description
apikey Required This is a unique up to 45 chars long hash key used for authenticating your API account.
It is provided by either VT team or you can avail it at self-service by creating account on VT OneID portal.
You can also pass this value in “hash” parameter as per old v2 platform.
receivernum Required Receivers mobile number in international format i.e, +923001234567
receivernetwork Optional Receivers mobile network. This is an optional parameter.
sendernum Optional Sender ID if multiple SIDs are allowed/configured against your account, otherwise you can leave it empty for default.
textmessage Required The text message body, that needs to be sent to end-user.
header Optional This is optional parameter in-case you need to send multiple Customers/brands messages on a shared short code, you need to pass the whitelisted header IDs.

Request Method

You can send a POST request or GET request, in-case of POST request you need to send above parameters in JSON Body Request, better for handling special characters in SMS body.

SENDING NEW VOICE OTP REQUEST

            
GET Request Sample URL You can use below mentioned URL to raise a new request, just put relevant
values in respective fields.
https://api.veevotech.com/v3/sendsms?hash=API_KEY_HERE&receivernum=
+923xxxxxxxxx&sendernum=VT-vOTP&textmessage=Your verification code 1234
Response Parameters You can expect below mentioned parameters in response from API
endpoint /sendsms, the response is always in JSON format and remains
the same in-case of SMS or Voice OTP. Here is a sample JSON response:
{ "STATUS":"SUCCESSFUL", "MESSAGE_ID":"4d6a6b31", "COUNTRY_SUPPORTED":"TRUE", "COUNTRY_CODE":92, "COUNTRY_ISO":"PK", "NETWORK_NAME":"Mobilink-PK", "RECEIVER_NUMBER":"+923001234567", "ERROR_FILTER":"", "ERROR_CODE":"", "ERROR_DESCRIPTION":"", "CHARGED_BALANCE":0 }

To push a new OTP (One-time password/Verification code) via voice call on the VT network, you just need to pass a different sender ID, the rest of process & data including endpoint, parameters etc. would remain the same as in case of SMS request, even keeping the SMS Body/Message content the same, VT Network will automatically analyze your content in real-time and will generate a voice call to pronounce your OTP/Verification code on a phone call to end user.

This supports pronouncing both Digits and Alphabets in your code

Voice OTP Sender ID

Your need to pass “VT-vOTP” in sender num parameter to auto convert your SMS request to Voice Call

Request Method

You can send a POST request or GET request, in-case of POST request you need to send above parameters in JSON Body Request.

Delivery Report & Charging Mechanism

If your call is answered, you will receive a successful delivery report on webhook/SMPP. If the call is not answered, then you will receive undelivered in delivery report.

This helps you ensure to take decision accordingly at your application end.

you submit a request using Voice OTP process, you are not instantly charged by the system but rather the system will wait to charge you once the call is answered successfully by the end user.

Parameter Description
STATUS This represents the request status, this can either be SUCCESSFUL or ERROR, the SUCCESSFUL status means request was processed successfully and SMS has been submitted.
Where in-case of ERROR you can check for ERROR_FILTER, ERROR_CODE & ERROR_DESCRIPTION for details.
MESSAGE_ID Alphanumeric unique Message ID used as a reference against submitted message.
COUNTRY_SUPPORTED It would either TRUE or FALSE, which means if the receiver number
COUNTRY_CODE Receiver number country dialing code ie 92
COUNTRY_ISO Receiver number country’s 2 characters ISO ie PK
NETWORK_NAME Receiver number cellular/carrier network name.
RECEIVER_NUMBER Receiver number, can be helpful incase of async requests.
ERROR_FILTER This carries unique error code alpha label, this remains constant and unique, you can use it in your app/code logics to respond on different error, these are explained in Section “Error Description”
ERROR_CODE This return an Alphanumeric error code, that can be used byVT teams in tracing different errors, this can vary and shouldn’t be used in your code/logics.
ERROR_DESCRIPTION This carries brief description about error for human understanding.
CHARGED_BALANCE This can carry the amount charged against the sent SMS, this feature would be activated in future.

SENDING NEW VOICE CALL REQUEST

You can initiate new voice call on any end mobile number using VT Network, the voice call can either be pre-configured IVR or a basic call that can play your pre-recorded voice or a pre-recorded voice proceeded by any dynamic alphanumeric announcement by our text-to-speech engine.

Follow the below process to initiate a new voice call.


        
End-point URL
https://api.veevotech.com/v3/sendcall
The parameters defined are acceptable via GET, POST or JSON Body
GET Request Sample URL You can use below mentioned URL to raise a new request, just put relevant
values in respective fields.
http://api.veevotech.com/v3/sendcall?apikey=API_KEY_HERE&receivernum=
+923XXXXXXXXX&callerid=Default&recording=10000&max_voice_repeat=
2&max_call_attempts=3&call_template=2&call_parameters={"var1":"1234"}
POST JSON Request Sample Body Here is JSON Body that can be sent on the above end-point in-case of
a POST request.
{ "apikey": " API_KEY_HERE ", "receivernum": "+923001234567", "callerid": "Default", "recording": 10001, "max_voice_repeat": 2, "max_call_attempts": 3, "call_template": 2, "call_parameters": { "var1":"1234" } }
Parameters Status Description
apikey Required This is a unique up to 45 chars long hash key used for authenticating your API account.
It is provided by either VT team or you can avail it at self-service by creating account on VT OneID portal.
You can also pass this value in “hash” parameter as per old v2 platform.
receivernum Required Receivers mobile number in international format i.e, +923001234567
callerid Optional Caller ID is a number that would appear on user handset while receiving your call, you can pass it as Default, if you are not asked for any specific value.
recording Required The recording/voice reference that you want to be played when a user picks the call.
The recordings are pre-approved by the VT team when you upload it on the portal, every approved voice gets a reference number that can be passed here, something like 11384
max_voice_repeat Optional Int value, which defines how many times the voice should be repeated on call before the call is terminated by the system.
For example you have a voice recording of 10 seconds, when you set this value to 2, the recording is play twice making the overall call duration of 20 seconds.
By default it is set to 1.
max_call_attempts Optional Int value, this defines how many call attempts should be made before it is answered by the user, for example if you set it to 2, then the system will try to make a call two times if the user don’t answer it in the first attempt.
By default it is set to 2.
call_template Required This carries the call flow template ID, in-case you have set a specialized call flow and want to initiate it then you need to pass respective template ID here, otherwise you need to set it to 2 for basic call, which play a pre-recorded voice.
call_parameters Optional This takes a json array of parameters required as per call template. The parameters names should always be var1, var2, var3 etc
For example:
{“var1”: “12345”,” var2”: ”9876”}

Response Parameters

Response parameters are the same as per Section 1.3 of /sendsms end-point however the only difference is below parameters:

CALL_ID instead MESSAGE_ID which carries placed Call ID.

Callback Webhook – Delivery/Message Tracking Events

                
    
            
{ "ACCOUNT_ID": Customer API/Account ID, "BILLING_ID": Customer Billing ID, "RECEIPENT": Message/Call Receiver number, "SENDER_ID": Message/Call SenderCaller ID, "MESSAGE_ID": Message Reference ID (returned by the system at the
      time of submission). It carries SMS, call, or WhatsApp earlier submitted
      request ID as per the medium. In case the medium is SMS, then the message ID
      would be the ID of the SMS, and so on., "MEDIUM": Medium on which the message is sent [SMS, VOICE, WHATSAPP], "TIME": DDMMYYHHMMSS, “CALL_ID”: 83922. It would be the id which our send call api has returned
      to user for easier tracking, so the user is able to align/connect the
      received webhook info with the call he has placed earlier in his own app., "CALL_STATUS": In-case of voice call following statuses can be
expected: [RINGING, ANSWERED, BUSY, REJECTED, UNANSWERED, ENDED, DISCONNECTED, FAILED,
KEY_PRESSED], "CALL_DTMF": The webhook event is activated when a user receives a call and presses a key,
      providing information on the key pressed and enabling customers to create
      interactive applications, such as surveys, based on user responses.
When the CALL_STATUS key is pressed, value will then be recieved in CALL_DTMF "DELIVERY_STATUS": As per SMPP Standards, SMS DLR status is issued
accordingly as per following: [ENROUTE, DELIVRD, EXPIRED, DELETED, UNDELIV, ACCEPTD, UNKNOWN,
REJECTD], "DLR_SMS": As per SMPP Standards, DLR SMS body is passed here,
incase you want to process the DLR SMS body. }
This structured JSON data enables seamless extraction and,
interpretation of critical information regarding message delivery. Implementing the Callback webhook ensures timely
updates and insights into the status of your messages/voice calls. You can set your webhook URL within your self-service portal or can
contact VT Support Here is a sample webhook URL & the data that is sent for more deeper
understanding. Sample Webhook URL
https://data.mydomain.com/get_dlr_status
Sample Data:
{ "ACCOUNT_ID": 7463, "BILLING_ID": 1079483, "RECEIPENT": "+923001234567", "SENDER_ID": "8333", "MESSAGE_ID": "4e7a45354e7a6735", "MEDIUM": "SMS", "TIME": "281123041233", "CALL_ID": 38473, "CALL_STATUS": “ANSWERED”, "DELIVERY_STATUS": “DELIVRD”, "DLR_SMS": " id:103708458 sub:001 dlvrd:001 submit date:
2811230412 done date: 2811230412 stat:DELIVRD err:000 text: ” }

The Callback webhook feature allows you to integrate your system with ours, enhancing the delivery process for SMS, voice calls, and WhatsApp messages. When you submit a message, and its report is generated (indicating delivery status as per SMPP such as ENROUTE, DELIVRD, EXPIRED, DELETED, UNDELIV, ACCEPTD, UNKNOWN, & REJECTD), our system triggers a webhook URL, initiating an event. The data associated with this event is transmitted in JSON format containing the following parameters.

Error Description

Errors are highlighted with three attributes,

  1. Error Filter: It is the key to error code.
  2. Error Code: This is a unique value prescribed to each error filter.
  3. Description: It is the suggestion for how to resolve the error.

Note for Developers

While facing an error, in response, the error filter and the error code will show up. In code, the decisions in response from the API will always be taken based on the error filter and not error code. As error code can be changed and it is for our internal tracing purposes. When a customer will reach out for support, they will be asked to provide us with the error code and not error filter. Error Filter will be used for the purpose of integration, and is a reference for developer, and will never be changed.
The errors of SMS API version 3.0 are listed as follows.

ERROR_FILTER DESCRIPTION
ACCOUNT_BLOCKED The mobile number is not in valid international format, please provide it as +923001234567. If the issues still exist, please contact Veevo Tech support team.
ACCOUNT_DISABLED This filter will show up when the API Account has been disabled, it is suggested to contact Veevo Tech support team for further assistance.
ACCOUNT_MISSING Account ID is required.
ACCOUNT_UNVERIFIED The API account is unverified & has breached testing limits, to verify it, please contact Veevo Tech support team.
BILLING_ERROR This can occur in-case of any issue at billing level/misconfigured billing or any other issue, low balance error is different than this.
CARRIER_ROUTING Failed to route traffic on the designated network, carrier not found. It is suggested to contact Veevo Tech support team.
CONTENT_TOO_LONG The SMS content length is too long, the maximum supported length is 800 characters.
HEADER_ID_DISABLED The Header ID is disabled, please contact Veevo Tech support team.
HEADER_ID_NOT_FOUND Header ID is invalid or not found.
HEADER_ID_MISSING Header ID is required.
INVALID_API_KEY Invalid API key, please provide a valid API Key.
INSERTION_FAILED SMS logs insertion failed. It is suggested to try again and if the issue still exists, please contact Veevo Tech support team.
INVALID_NUMBER The mobile number is not in valid international format, please provide it as +923001234567.
INSUFFICIENT_BALANCE Insufficient balance in customer account for this service type. Please recharge customer account and try again.
INVALID_ISO_CODE The country ISO code is invalid or missing. Please provide a valid ISO code.
INVALID_VOICE_CALLER_ID The provided caller ID is invalid, please provide the correct or contact support
IP_NOT_ALLOWED This can occur in-case API account is restricted to only certain IPs, and the requesting IP is not whitelisted into that list.
LOW_BALANCE Account balance is insufficient, please recharge or contact Veevo Tech support team for assistance.
NOT_FOUND No Sender ID/Header ID found for this user.
PARAMETERS_MISSING Username information is missing.
REF_ID_MISSING Package reference ID is missing.
RECEIVER_NUMBER_MISSING Please provide valid receiver number.
SENDER_ID_DISABLED The sender ID is disabled, it is suggested to contact Veevo Tech support team.
SENDER_ID_NOT_FOUND Sender ID is invalid or not found.
SMS_TEXT_MISSING Please provide the text that needs to be sent.
SENDERID_ROUTING_FAILED Sender ID or carrier not defined. It is suggested to try again and if the issue still exists, contact Veevo Tech support team.
SENDER_ID_MISSING Sender ID is required.
TECHNICAL_ISSUE We are facing some technical difficulties to process your request at the moment, please try again. This message will show up whenever you will face any technical issues. Sometimes this is on temporary basis, so it is suggested that you retry and if the issue still exist, contact Veevo Tech support team.
TRAFFIC_NOT_ALLOWED Traffic is not allowed for this user on this rule. It is suggested to try again and if the issue still exists, contact Veevo Tech support team.
UNSUPPORTED_COUNTRY The destination country is not supported.
VOICE_FILE_NOT_FOUND Voice file invalid OR not found.
VOICE_FILE_NOT_APPROVED The voice is not yet approved, contact support

WhatsApp API

WhatsApp Business API is an important component of the current communication environment, allowing businesses to interact with their clients via the popular WhatsApp messaging network. WhatsApp API provides a strong tool for providing rich and engaging consumer conversations when incorporated into a CPaaS platform (Communication Platform as a Service). With over 2 billion monthly active users, WhatsApp has a vast worldwide user base. By incorporating WhatsApp into your CPaaS platform, you have access to a large audience and may contact clients all over the world.

VT CPAAS Platform – Basics of WhatsApp API

At Veevo Tech, we are proud to provide a robust CPaaS solution including the integration of WhatsApp API, giving businesses a powerful way to engage with their consumers on the world's biggest messaging platform. With VT's CPaaS platform, you can use WhatsApp's worldwide reach, rich media support, and real-time communication capabilities to improve customer engagements.Our WhatsApp API offers safe, trustworthy, and customized communication, whether you're wanting to expedite customer service, deliver vital alerts, or promote two-way discussions. Simply connect the API, build message templates, gain user approval, and confirm compliance with WhatsApp's standards to get started.

Sending New WhatsApp API Request

To push a new WhatsApp OTP on the VT network, you need to pass below mentioned required parameters on the endpoint.

End-point URL
https://wa-api.veevotech.com/wa/v1/send_message

REQUEST PARAMETERS

Parameter Status Description Example Value
hash Required This is a unique key used for authentication. It is provided by either VT team, or you can avail it at self-service “92xxxxxxxxxx”
to Required This is the number to which the message will go “92xxxxxxxxxx”
type Required The type of message (template, text, image, audio,document) “template”
message_ref Optional Additional information for hooks. “”
template_id Required (for template) Template ID (required if type is template) 42
mediaUrl Required(for template) Array of media Urls (required if type is template) []
templateVariables Required (for template) Array of template variables (required if type is template) []
priority Optional Priority of the message (optional) 1
image/audio/video/text Required (based on type) Required (based on type) {“id/body”: “”}

Request Method

You can send a POST request, in-case of POST request you need to send above parameters in JSON Body Request.

Body Parameters


{ "STATUS": "SUCCESSFUL", "ERROR_CODE": "", "OTP_CODE": 1234, "MESSAGE": "Your call has been scheduled and soon will be processed!" }
{ "to": "reciever_number", "type": "template", "message_ref": "", "template_id": 00, "mediaUrl": ["https://example.com/media/image.jpg"], "templateVariables": ["variable1", "variable2"], "priority": 1 }
{ "to": "reciever_number", "type": "document", "document": { "id": "media_id", "caption" : "example caption", "filename" : "example.extension" } }
{ "to": "reciever_number", "type": "image", "image": { "id": "media_id", "link": "link", "caption" : "example caption" } }
{ "to": "reciever_number", "type": "audio", "audio": { "id": "media_id", "link": "link", "caption" : "example caption" } }
{ "to": "reciever_number", "type": "video", "video": { "id": "media_id", "link": "link", "caption" : "example caption" } }
Type Method
Text POST
Template POST
Document POST
Image POST
Audio POST
Video POST

Media End-point URL

The parameters and its description are as follows




Request Parameters
https://wa-api.veevotech.com/wa/media
“https://elephant.veevotech.com/files/4f4451334e 673d3d/10_f2b0d8c9e287c21.jpg"
Template Sync Endpoint
https://wa-api.veevotech.com/wa/sync
Parameters Description Status Example Value
url Public url of media Required
mimeType mimeType Required “image/jpeg”

Template Sync

Template sync is used to pull the pre-approved templates.

Function Method
Template Sync GET

Error Description

Errors are highlighted with three attributes,

  • Error Filter: It is the key to error code.
  • Error Code: This is a unique value prescribed to each error filter.
  • Description: It is the suggestion for how to resolve the error.

Note for Developers

While facing an error, in response, the error filter and the error code will show up. In code, the decisions in response from the API will always be taken based on the error filter and not error code. As error code can be changed and it is for our internal tracing purposes. When a customer will reach out for support, they will be asked to provide us with the error code and not error filter. Error filter will be used for the purpose of integration, and is a reference for developer, and will never be changed.
The errors of WhatsApp API are listed as follows,

ERROR FILTER DESCRIPTION
User End Violation The request body is not properly filled
Technical Error An error occurred in API verification