Documentation and APIs

Learn how to use our serverless platform to create voice, video and messaging applications and services by reading our getting started guide. It's the best way to become familiar with the platform architecture and capabilities.

Number Management
SMS
Anonymize
Authenticate – Multi Factor Authentication
Authenticate – One Tap Authentication
Engage
WhatsApp
Programmable Voice(India)
Email

Programmable Voice(India)

Standard Programmable Voice APIs

Anonymize Call Flow

 

For the Anonymize or number masking use-case, an API is required from the user (1) (It will be called as “user’s API” (2).), which will provide the B party’s number in the API response for a given A party’s number in the API request body.

[1: “user” refers to the Enterprise who needs the Number Masking solution.]

[2: “user’s API” is the API implemented and provided by the user for determining the B party’s (destination) number for a given A party’s (caller) number.]

Request Body
copy

{
	"uuid": "$uuid",
	"call_id": "$call_id",
	"call_to_number": "$call_to_number",
	"caller_id_number": "$caller_id_number",
	"start_stamp": "$start_stamp"
}
Request Variables

The below data is sent to the user’s API.

Variable Name Description Data Type
$uuid The unique ID of the call. For example,7611. String
$call_to_number The dialled number (“masking number”).For example, +91-XXXXXXXXXX. String
$call_id The call ID available in call detail records.For example, 1642XXXX.XXX012. String
$call_to_number The dialled number (“masking number”).For example, +91-XXXXXXXXXX. String
$call_to_number The start time of the call. For example,YYYY-mm-dd HH: mm: ss. String
Response Variables

The call transfers based on B party’s number. The user’s API should return the 10-digit phone number of the B party in the API response to transfer the call to the B party’s number. The below example shows a sample API response to transfer the call based on B party’s number where “XXXXXXXXXX” is the 10-digit B party’s number.

 

Sample transfer objects

copy

[{
	"transfer": {
		"type": "number",
		"data": ["XXXXXXXXXX"]
	}
}]

Click to Call API

Sample Request (cURL)
copy

curl --request POST \ 
--url https://api.apigw.tatacommunications.com/app/cpaas/pv/v1/click_to_call \ 
--header 'Authorization: <AUTHORIZATION_VALUE>' \ 
--header 'accept: application/json' \ 
--header 'content-type: application/json' \ 
--data '{"agent_number":"90XXXXXXXX9","destination_number":"80XXXXXXXX9"}' 

 

Request variables (Body params)

The body params used for making calls are:

Variable Description Data Type
agent_number* The agent’s EID, intercom number, extension username, or DID. For example, 809XXXXXXXX. String
$call_to_number The number of the customer who will receive the call.
Note: Customer numbers must be between 10 and 15 digits long, with the prefixes +91 and 0 allowed. For example, 9973XXXXXX, +919873XXXXXX and 09873XXXXXX.
String
caller_id The caller ID that is shown to the called party.For example, 876XXXXXXX. Integer
async Make multiple calls simultaneously, that is, do not wait for agent to pick up the call before sending back the response. 1: asynchronous request, 0: synchronous request Integer
call_timeout The limit time of the call wherein it will auto-disconnect after provided seconds have reached the summit duration. For example, 32. Integer
get_call_id Setting this parameter to 1 will return call_id in response. Note: call_id will only be returned if the call has been answered by the agent. Integer
custom_identifier The custom parameter that can be sent while making a click to call request.
Note:
This parameter will be returned in webhook. This is a sample custom identifier, you can send your own custom parameters while making a request to Digo.
Digo supports custom variables that be send while make a click to call request and receive those variables back through webhooks. For instance you can put a special identifier in a string, numeric format which can be passed while making a request to Digo and in the webhook that identifier will be returned to help you track your click to calls.
String
Response variables

The response is as following:

Variable Description Data Type
success The possible values are:
True, if the call is originated successfully.
False, for any error encountered.
Boolean
message The message corresponding to success status. For example, in 200 Response, the message displayed is “Originate successfully queued”. String
Response Schema

A successful request returns the HTTP 200 OK status code and a JSON response body as detailed below:

JSON

copy

{
	"success": true,
	"message": "Originate successfully queued"
}

Generate Outbound Call API (OTP or Voice Announcement)

Announcement of Voice on an outbound call can be started by calling the below-mentioned two APIs one after the other, that is, first call the “Lead API”, then call the “Click to Call Support API”. The following examples are for the announcement of OTP (One Time Password) on an outbound call.

Similarly, other messages can also be announced using similar format of the APIs.

A) Lead API
Sample Request (cURL)
copy

curl --request POST \ 
--url 'https://api.apigw.tatacommunications.com/app/cpaas/pv/v1/broadcast/lead/<LEAD_ID>' \ 
--header 'Authorization: <AUTHORIZATION_VALUE>' 
--header 'accept: application/json' \ 
--header 'content-type: application/json' \ 
--data '{"field_0":"XXXXXXXXXX","field_5":"123456", "duplicate_option": "overwrite"}' 

Path Parameters

The body params used for making calls are:

Variable Name Description Data Type
<LEAD_ID> Unique ID of the List to which lead will correspond String
Request Variables

The response is as following:

Variable Name Description Data Type
field_0 10-digit destination phone number String
field_5 One Time Password (OTP) Digits, e.g., 123456 String
duplicate_option Set this to “overwrite” String
Response Variables
Variable Name Description Data Type
success Request success status Boolean
message Message corresponding to success status String
B) Click to Call Support API
Sample Request (cURL)
copy

curl --request POST \ 
--url 'https://api.apigw.tatacommunications.com/app/cpaas/pv/v1/c2c_api' \ 
--header 'Authorization: <AUTHORIZATION_VALUE>' 
--header 'accept: application/json' \ 
--header 'content-type: application/json' \ 
--data '{"customer_number":"XXXXXXXXXX","api_key":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}' 

Request Variables
Variable Name Description Data Type
customer_number 10-digit destination phone number String
api_key API Key for authentication and to determine the destination for the call. String
Response Variables
Variable Name Description Data Type
success Request success status Boolean
message Message corresponding to success status String

Fetch Call Detail Records

Sample Request
copy

curl --request GET \ 
--url https://api.apigw.tatacommunications.com/app/cpaas/pv/v1/call/records \ 
--header 'Accept: application/json' \ 
--header 'Authorization: <AUTHORIZATION_VALUE>' 

Request Variables (Query Params)
Variable Description Data Type
from_date The starting date from which the records need to be fetched. For example, the format is YYYY-MM- DD hh:mm:ss, (2021-03-10 17:16:18). String
to_date The date till which the records need to be fetched. For Example, the format is: YYYY-MM-DD hh:mm:ss (2021-04-10 17:16:18). String
page The page number of the record. For example, the parameter passed is 1, if the client requires the information that exists on the first page. String
call_id The unique ID of the call that allows customers to fetch call related details. For example,1627373566.350603. Integer
limit The number of records to be fetched. For example, 10. String
agents The ID of the agent. For example, 345623. String
department The unique ID of departments. For example, sales department. Array
ivr The unique ID of IVRs. For example, sales IVR, finance IVR. Array
call_type The type of the call. For example, c denotes answered, whereas m denotes missed. String
callerid The caller ID of the client. For example,12345678. Note : Fetch the caller_id from the live calls API , which retrieves the live call details. String
destination Destination wherein the incoming call is directed. For example, sales department. String
direction The direction of the call. The possible values are:
Inbound
Outbound
String
duration The total duration of the call in seconds. For example, 30. String
operator The mathematical operator to be used for the duration filter.Allowed operators are:[>, <, >=, <=, !=] String
services The type of call services. For example, Click to Call.
Note: These are separated by commas.
String
Response Variables

It takes a JSON body with the following notable parameters:

Variable Description Data Type
limit The number of records to be fetched. For example, 10. String
count The number of the records. For example,32. String
page The page number of the record. For example, the parameter passed is 1, if the client requires the information that exists on the first page. String
size The size of the records. For example, 20 String
id The ID of the record. For example, 1. String
call_id The unique ID of the call that allows customers to fetch call related details. For example,1627373566.350603. Integer
uuid The call ID of the number that helps to track the different triggers for a particular call.For example, 61111f5e708c5. Integer
date The date on which the call was made. For example, the format is YYYY-MM-DD (2021- 03-10). String
time The time on which the call was made. For example, the format is hh:mm:ss,(17:16:18). String
end_stamp The time_stamp on which the call was made. For example, the format is YYYY-MM-DD hh:mm:ss, (2021-03-10 17:16:18). String
missed_agents The details of the agents who missed the call. Object
missed_agents{}.name The name of the agents. For example, sales agent, marketing agent. String
missed_agents{}.number The number of the agents. For example, 98XXXXXXX. String
status The status of the call response. For example, missed Object
department The unique ID of departments. For example, sales department. Array
destination Destination wherein the incoming call is directed. For example, sales department. String
direction The direction of the call. The possible values are:
Inbound
Outbound
String
call_duration The total duration of the call. For example,30. String
answered_seconds The total duration of the call in seconds after getting answered. For example, 90. String
minutes_consumed The time in minutes consumed in the call. For example, 2. String
operator The mathematical operator to be used for the duration filter.Allowed operators are:[>, <, >=, <=, !=] String
services The type of call services. For example, Click to Call.
Note: These are separated by commas.
String
broadcast_id The ID of the broadcast call. For example,3432 String
dtmf_input The number pressed by the customer on hearing the IVR. For example,3432 String
client_number The contact number of the client. For example, Normal Clearing. String
hangup_cause The reason behind ending the call. For example, voice not clear. String
did_number The DID from which the agent makes or receives the call. For example, 9180XXXXXXXX. String
notes The notes associated with the client. For example, missed the last call. String
contact details The contact number and name of the client. For example, 91XXXXXXXXX. String
recording_url The URL of the recorded call String

What’s New