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)

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
EnvironmentURL
Base URLhttps://api.tatacommunications.com/vcn/v1.0
API URLhttps://api.tatacommunications.com/vcn/v1.0/contexts
API Route Index
MethodRoute
API MethodPOST

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

Request Parameters
ParameterData TypeRequired/ OptionalDescription
typeStringRequiredType of session created. It can be “one-one” or “many-one”
aNumberStringRequiredA party number (with country-code, e.g., +91987XXXXXXX, where ‘+91’ is a country-code)
bNumberStringRequiredB party number (with country-code, e.g., +91987XXXXXXX, where ‘+91’ is a country-code)
bNumberListArray of StringsOptionalTo be used ONLY if request Type is “many-one”. List of numbers of the ‘B’ Party
countryStringOptionalThis is an optional field. Country of masking number in ISO3 standard format
timeScheduleInSecNumberOptionalTotal 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 CodeReason of Response
201Request was successful and, as a result, a Masking Session was created
400Bad Request
401Invalid Authorization or Authorization value not passed in the string
404The server has not found anything matching the request – URI
500The server encountered an unexpected condition which prevented it from fulfilling the request
Response Parameters
ParameterData TypeRequired/ OptionalDescription
contextIdStringRequiredA unique Context ID is created for every masking session. It is a unique identifier for every session
statusStringRequiredIt identifies the active/inactive status of the masking session. Status can be “active” or “inactive”.
typeStringRequiredBType of session created as per request. It can be “one-one” or “many-one”
aNumberStringRequiredTA party number as provided in the Request
bNumberStringRequiredTB party number as provided in the Request
bNumberListArray of StringsOptionalIf request Type is “many-one”. List of numbers of the ‘B’ Party
maskingNumberStringRequiredThe number that is used as a masking number
countryStringRequiredCountry of masking number (ISO3 Standard Format)
timeScheduleInSecStringOptionalTotal scheduled time in seconds for automatically deactivating the context. This is also as per the request sent
contextStartStringRequiredTime 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