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 – OTP
Authenticate – One Tap Authentication
Engage
WhatsApp
Programmable Voice(India)
Email
Programmable Voice (USA)

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 NameDescriptionData Type
$uuidThe unique ID of the call. For example,7611.String
$call_to_numberThe dialled number (“masking number”).For example, +91-XXXXXXXXXX.String
$call_idThe call ID available in call detail records.For example, 1642XXXX.XXX012.String
$call_to_numberThe dialled number (“masking number”).For example, +91-XXXXXXXXXX.String
$call_to_numberThe 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:

VariableDescriptionData Type
agent_number*The agent’s EID, intercom number, extension username, or DID. For example, 809XXXXXXXX.String
$call_to_numberThe 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_idThe caller ID that is shown to the called party.For example, 876XXXXXXX.Integer
asyncMake 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 requestInteger
call_timeoutThe limit time of the call wherein it will auto-disconnect after provided seconds have reached the summit duration. For example, 32.Integer
get_call_idSetting 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_identifierThe 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:

VariableDescriptionData Type
successThe possible values are:
True, if the call is originated successfully.
False, for any error encountered.
Boolean
messageThe 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 NameDescriptionData Type
<LEAD_ID>Unique ID of the List to which lead will correspondString
Request Variables

The response is as following:

Variable NameDescriptionData Type
field_010-digit destination phone numberString
field_5One Time Password (OTP) Digits, e.g., 123456String
duplicate_optionSet this to “overwrite”String
Response Variables
Variable NameDescriptionData Type
successRequest success statusBoolean
messageMessage corresponding to success statusString
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 NameDescriptionData Type
customer_number10-digit destination phone numberString
api_keyAPI Key for authentication and to determine the destination for the call.String
Response Variables
Variable NameDescriptionData Type
successRequest success statusBoolean
messageMessage corresponding to success statusString

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)
VariableDescriptionData Type
from_dateThe 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_dateThe 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
pageThe 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_idThe unique ID of the call that allows customers to fetch call related details. For example,1627373566.350603.Integer
limitThe number of records to be fetched. For example, 10.String
agentsThe ID of the agent. For example, 345623.String
departmentThe unique ID of departments. For example, sales department.Array
ivrThe unique ID of IVRs. For example, sales IVR, finance IVR.Array
call_typeThe type of the call. For example, c denotes answered, whereas m denotes missed.String
calleridThe 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
destinationDestination wherein the incoming call is directed. For example, sales department.String
directionThe direction of the call. The possible values are:
Inbound
Outbound
String
durationThe total duration of the call in seconds. For example, 30.String
operatorThe mathematical operator to be used for the duration filter.Allowed operators are:[>, <, >=, <=, !=]String
servicesThe 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:

VariableDescriptionData Type
limitThe number of records to be fetched. For example, 10.String
countThe number of the records. For example,32.String
pageThe 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
sizeThe size of the records. For example, 20String
idThe ID of the record. For example, 1.String
call_idThe unique ID of the call that allows customers to fetch call related details. For example,1627373566.350603.Integer
uuidThe call ID of the number that helps to track the different triggers for a particular call.For example, 61111f5e708c5.Integer
dateThe date on which the call was made. For example, the format is YYYY-MM-DD (2021- 03-10).String
timeThe time on which the call was made. For example, the format is hh:mm:ss,(17:16:18).String
end_stampThe 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_agentsThe details of the agents who missed the call.Object
missed_agents{}.nameThe name of the agents. For example, sales agent, marketing agent.String
missed_agents{}.numberThe number of the agents. For example, 98XXXXXXX.String
statusThe status of the call response. For example, missedObject
departmentThe unique ID of departments. For example, sales department.Array
destinationDestination wherein the incoming call is directed. For example, sales department.String
directionThe direction of the call. The possible values are:
Inbound
Outbound
String
call_durationThe total duration of the call. For example,30.String
answered_secondsThe total duration of the call in seconds after getting answered. For example, 90.String
minutes_consumedThe time in minutes consumed in the call. For example, 2.String
operatorThe mathematical operator to be used for the duration filter.Allowed operators are:[>, <, >=, <=, !=]String
servicesThe type of call services. For example, Click to Call.
Note: These are separated by commas.
String
broadcast_idThe ID of the broadcast call. For example,3432String
dtmf_inputThe number pressed by the customer on hearing the IVR. For example,3432String
client_numberThe contact number of the client. For example, Normal Clearing.String
hangup_causeThe reason behind ending the call. For example, voice not clear.String
did_numberThe DID from which the agent makes or receives the call. For example, 9180XXXXXXXX.String
notesThe notes associated with the client. For example, missed the last call.String
contact detailsThe contact number and name of the client. For example, 91XXXXXXXXX.String
recording_urlThe URL of the recorded callString

What’s New