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 (USA)

Anonymize

Anonymize is used for Anonymization or more commonly known as Number masking service. It boosts the privacy between two calling parties. Enterprises may use this solution to conceal both parties’ original number during a call with the use of an Anonymize number. The Anonymize number, in essence, is a number to make and receive calls. The calling party and the receiving party will be able to talk to each other without divulging their personal numbers. This allows communications for short-lived relationship that arises due to an activity such as delivery, ride sharing or digital marketplace. It removes the risk for unwanted and unsupervised communication after the activity.

Create Masking Session

This section explains how to set up a masking session between two parties using Anonymize API. During a masking session, a temporary number is allocated between two parties and their number is masked with a temporary number when they dial or receive call from one another.

Use POST to initiate.

Base URL
Environment URL
Base URL https://api.tatacommunications.com/vcn/v1.0
API URL https://api.tatacommunications.com/vcn/v1.0/contexts
API Route Index
Method Route
API Method POST

Below request body parameters are required in the API to create a successful masking session.

Request Parameters
Parameter Data Type Required/ Optional Description
type String Required Type of session created. It can be “one-one” or “many-one”
aNumber String Required A party number (with country-code, e.g., +91987XXXXXXX, where ‘+91’ is a country-code)
bNumber String Required B party number (with country-code, e.g., +91987XXXXXXX, where ‘+91’ is a country-code)
bNumberList Array of Strings Optional To be used ONLY if request Type is “many-one”. List of numbers of the ‘B’ Party
country String Optional This is an optional field. Country of masking number in ISO3 standard format
timeScheduleInSec Number Optional Total scheduled time in seconds for automatically deactivating the context. For example, if timeScheduleInSec=30, then, the context will automatically deactivate after 30 sec of context creation.

cURL command for Session Type as “one-one”

copy 

curl --location --request POST 'https://api.tatacommunications.com/vcn/v1.0/contexts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic djgjgJGJFJJjjgjhg7686JBKJHLKH==' \
--data-raw '{
"aNumber": "1111111111",
"bNumber": "2222222222",
"type": "one-one",
"country": "USA",
"timeScheduleInSec": 300
}'

cURL command for Session Type as “many-one”

copy
 
curl --location --request POST 'https://api.tatacommunications.com/vcn/v1.0/contexts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic djgjgJGJFJJjjgjhg7686JBKJHLKH==' \
--data-raw '{
"aNumber": "9999999999",
"bNumber": "3333333333",
"bNumberList": [
"3333333333",
"4444444444",
"5555555555",
"6666666666",
],
"type": "many-one",
"country": "USA",
"timeScheduleInSec": 300
}'

Response Messages
HTTP Status Code Reason of Response
201 Request was successful and, as a result, a Masking Session was created
400 Bad Request
401 Invalid Authorization or Authorization value not passed in the string
404 The server has not found anything matching the request – URI
500 The server encountered an unexpected condition which prevented it from fulfilling the request
Response Parameters
Parameter Data Type Required/ Optional Description
context Id String Required A unique Context ID is created for every masking session. It is a unique identifier for every session
status String Required It identifies the active/inactive status of the masking session. Status can be “active” or “inactive”.
type String Required B Type of session created as per request. It can be “one-one” or “many-one”
aNumber String Required TA party number as provided in the Request
bNumber String Required TB party number as provided in the Request
bNumber List Array of Strings Optional If request Type is “many-one”. List of numbers of the ‘B’ Party
masking Number String Required The number that is used as a masking number
country String Required Country of masking number (ISO3 Standard Format)
time Schedule In Sec String Optional Total scheduled time in seconds for automatically deactivating the context. This is also as per the request sent
context Start String Required Time at which the session starts YYYY-MM-DDTHH:MM:SS.sssZ (ISO Standard format of Date)
Example Response

For Session Type as “one-one”

copy
 
{
"contextId": "NMC-120000aB0-feFo-11ea-a78d-7f4d5555985",
"status": "active",
"type": "one-one",
"aNumber": "1111111111",
"bNumber": "2222222222",
"maskingNumber": "12062700000",
"country": "USA",
"timeScheduleInSec": "300",
"contextStart": "2020-11-25T06:28:32.667Z"
}

For Session Type as “many-one”

 
copy

{
"contextId": " NMC-90000a10-c006-11eb-8000-db00000",
"status": "active",
"type": "many-one",
"aNumber": "9999999999",
"bNumber": "4444444444",
"bNumberList": [
"3333333333",
"4444444444",
"5555555555",
"6666666666",
],
"maskingNumber": "12062700000",
"country": "USA",
"timeScheduleInSec": "300",
"contextStart": "2020-11-25T06:28:32.667Z"
}

What’s New