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.
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.
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.
Environment | URL |
---|---|
Base URL | https://api.tatacommunications.com/vcn/v1.0 |
API URL | https://api.tatacommunications.com/vcn/v1.0/contexts |
Method | Route |
---|---|
API Method | POST |
Below request body parameters are required in the API to create a successful masking session.
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
}'
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 |
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) |
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"
}
This section explains how to deactivate an active masking session between 2 parties. We had seen while creating the masking session, there is an “option” to add timestamp to automatically deactivate the session after a specific time (that is an optional parameter). In many cases it is not possible to know beforehand that till when the session would last. Hence this API is called to end the session when there is no calling action required between the two parties for which the session was created. A simple example is of cab Driver-Rider case. It is very difficult to conclude the exact time by when the driver will be able to drop the customer at the destination considering the traffic factor. Also, there is a probability that Driver/Rider can cancel the cab. Under these circumstances, session needs to be deactivated to free the mapping between the driver and rider.
Hence, once, the rider books the cab, “Create masking session” API is called. Once, the Driver drops the rider to the desired destination, “Deactivate masking session” API is called
Environment | URL |
---|---|
Base URL | https://api.tatacommunications.com/vcn/v1.0 |
API URL | https://api.tatacommunications.com/vcn/v1.0/contexts/{contextId}/deactivate |
Method | Route |
---|---|
API Method | PUT |
The context ID of the session which needs to be deactivated is passed in the API.
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
contextId | String | Required | TNeed to provide the context ID of the session that needs to be deactivated |
copy
curl --location --request PUT 'https://api.tatacommunications.com/vcn/v1.0/contexts/NMC-90000a10-c906-11eb-8c62-db00000A3400/deactivate' \
--header 'Authorization: Basic djgjgJGJFJJjjgjhg7686JBKJHLKH=='
A successful API response contains a success code and success message, i.e., the requested session has been successfully deactivated.
HTTP Status Code | Reason of Response |
---|---|
200 | Request was successful and, as a result, requested session was deactivated |
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 |
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
code | Number | Required | Success code |
message | String | Required | Additional data that was passed in to describe the context which is being deactivated. |
copy
{
"code": 200,
"message": "The context with contextId, NMC-a0aa00a0-a000-00aa-0a00-aa00000a0000, has been deactivated successfully."
}
In case a session is created with a timestamp but there is a need to extend that session, then this API is called. Updated time duration is sent with the specific context ID for which the masking session needs to be extended
Environment | URL |
---|---|
Base URL | https://api.tatacommunications.com/vcn/v1.0 |
API URL | https://api.tatacommunications.com/vcn/v1.0/contexts/{contextId}/extendSession |
Method | Route |
---|---|
API Method | PUT |
The unique context ID and the time duration in seconds need to be passed in the API request.
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
contextId | String | Required | The unique context ID of the masking session that needs to be extended is required |
timeInSec | Number | Required | Extra time added to extend the scheduled deactivation time |
copy
curl --location --request PUT 'https://api.tatacommunications.com/vcn/v1.0/contexts/NMC-90000a10-c906-11eb-8c62-db00000A3400/extendSession' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic djgjgJGJFJJjjgjhg7686JBKJHLKH==' \
--data-raw '{
"timeInSec": 200
}'
HTTP Status Code | Reason of Response |
---|---|
200 | Request was successful and, as a result, total scheduled time of the requested session was extended |
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 |
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
contextId | String | Required | Context ID of the session whose time scheduled in sec was extended successfully |
status | String | Required | It identifies the active/inactive status of the masking session. Status can be “active” or “inactive”. |
type | String | Required | Type of session can be “one-one” or “many-one”. |
aNumber | String | Required | A party number for the session in request |
bNumber | String | Required | B party number for the session in request |
bNumber List | Array of Strings | Optional | If Request Type is “many-one”. |
maskingNumber | String | Required | The number that is used as a masking number |
country | String | Required | Country of masking number (ISO3 Standard Format) |
timeScheduleInSec | String | Required | Total scheduled time in seconds for automatically deactivating the context. |
contextStart | String | Required | Activation time of the context that accepts ISO standard time format |
copy
{
"contextId": "NMC-120000aB0-feFo-11ea-a78d-7f4d5555985",
"status": "active",
"type": "one-one",
"aNumber": "1111111111",
"bNumber": "2222222222",
"maskingNumber": "12062700000",
"country": "USA",
"timeScheduleInSec": "500",
"contextStart": "2020-11-25T06:28:32.667Z"
}
This API is applicable only to “many-one” type of session. This API updates the B Party’s number if A Party wants to call another number of B Party. For example, there is a list of patients (B Party), b1, b2, b3, b4 and b5, whose phone numbers are listed in bNumber List and a doctor (A Party), a1, whose phone number is aNumber. So, any of the patients can call the doctor but a doctor can call only one of the patients at a time, say b1. If he wants to call another patient (say, b2), we use this API to update the bNumber.
Environment | URL |
---|---|
Base URL | https://api.tatacommunications.com/vcn/v1.0 |
API URL | https://api.tatacommunications.com/vcn/v1.0/contexts/{contextId}/bNumber |
Method | Route |
---|---|
API Method | PUT |
The unique context ID and the new B Party’s Number from the List of B Party’s Numbers (bNumber List) assigned to the session in consideration need to be passed in the API request
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
contextId | String | Required | The unique context ID of the masking session of type, “many-one”, for which B Party’s Number needs to be updated. |
newBNumber | String | Required | New B Party’s Number from the List of B Party’s Numbers assigned to the session in consideration |
copy
curl --location --request PUT 'https://api.tatacommunications.com/vcn/v1.0/contexts/NMC-90000a10-c006-11eb-8000-db00000/bNumber' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic djgjgJGJFJJjjgjhg7686JBKJHLKH==' \
--data-raw '{
"newBNumber": "4444444444"
}'
HTTP Status Code | Reason of Response |
---|---|
200 | Request was successful and, as a result, B Party’s Number was updated for the many-one session in consideration |
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 |
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
contextId | String | Required | Context ID of the “many-one” session in consideration |
status | String | Required | It identifies the active/inactive status of the masking session. Status can be “active” or “inactive”. |
type | String | Required | Type of session can be “one-one” or “many-one”. |
aNumber | String | Required | A party number for the session in request |
bNumber | String | Required | B party number for the session in request |
bNumber List | Array of Strings | Required | If Request Type is “many-one”. It is a list of B Party’s Numbers mapped to the A Party’s Number assigned to the “many-one” session in consideration. |
maskingNumber | String | Required | The number that is used as a masking number |
country | String | Required | Country of masking number (ISO3 Standard Format) |
timeScheduleInSec | String | Optional | Total scheduled time in seconds for automatically deactivating the context. |
contextStart | String | Required | Activation time of the context that accepts ISO standard time format |
contextEnd | String | Optional | Deactivation time of the context that accepts ISO standard time format |
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"
}
This API is used to see the information of a specific session. Use GET to initiate.
Environment | URL |
---|---|
Base URL | https://api.tatacommunications.com/vcn/v1.0 |
API URL | https://api.tatacommunications.com/vcn/v1.0/contexts/{contextId} |
Method | Route |
---|---|
API Method | GET |
To request the complete information of the session, the unique context ID of the session needs to be passed in the API.
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
contextId | String | Required | A unique Context ID is created for every masking session. It is a unique identifier for every session. Provide the ID for which information is needed. |
copy
curl --location --request GET 'https://api.tatacommunications.com/vcn/v1.0/contexts/NMC-90000a10-c906-11eb-8c62-db00000A3400' \
--header 'Authorization: Basic djgjgJGJFJJjjgjhg7686JBKJHLKH=='
HTTP Status Code | Reason of Response |
---|---|
200 | Request was successful and, as a result, a session detail is sent |
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 |
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
contextId | 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 | Type of session created as per request. It can be “one-one” or “many-one”. |
aNumber | String | Required | A party number |
bNumber | String | Required | B party number |
bNumberList | Array of Strings | Optional | If context Type is “many-one”. |
maskingNumber | String | Required | The number that is used as a masking number |
country | String | Required | Country of masking number (ISO3 Standard Format) |
timeScheduleInSec | String | Optional | Total scheduled time in seconds for automatically deactivating the context. This is also as per the request sent |
contextStart | String | Required | Activation time of the context that accepts ISO standard time format |
contextEnd | String | Optional | Deactivation time of the context that accepts ISO standard time format |
callRecords | Array of Objects | Required | List of call records showing inbound and outbound SIDs for each call |
INBOUND SIDs – It provides details of Inbound leg of the call in the context which is requested | |||
sid | String | Optional | Unique String Identifier created for the inbound leg of the call in request |
status | String | Optional | Status of the call in request |
start_time | String | Optional | Start time of the call in request |
end_time | String | Optional | End time of the call in request |
duration | Number | Optional | Duration of the call in request |
ring_duration | Number | Optional | Ring duration of the call in request |
to | String | Optional | Called number (It is the masking number used for the inbound call) |
from | String | Optional | The number from which call is initiated on masking number |
direction | String | Optional | Direction of the call specifying inbound or outbound (In this case, it is Inbound) |
OUTBOUND SIDs – It provides the details of the outbound leg of the call in context which is requested | |||
sid | String | Optional | Unique String Identifier created for the outbound leg of the call in request |
status | String | Optional | Status of the call in request |
start_time | String | Optional | Start time of the call in request |
end_time | String | Optional | End time of the call in request |
duration | Number | Optional | Duration of the call in request |
ring_duration | Number | Optional | Ring duration of the call in request |
to | String | Optional | The number on which the call was initiated from the masking number |
from | String | Optional | Calling number (the masking number used for the outbound call) |
direction | String | Optional | Direction of the call specifying inbound or outbound (In this case, it is Outbound) |
copy
{
"contextId": "NMC-120000aB0-feFo-11ea-a78d-7f4d5555985",
"status": "active",
"type": "one-one",
"aNumber": "1111111111",
"bNumber": "2222222222",
"bNumberList": [],
"maskingNumber": "12062700000",
"country": "USA",
"timeScheduleInSec": "500",
"contextStart": "2020-11-25T06:28:32.667Z",
"callRecords": [
{
"inbound": {
"sid": "ID000a2ae179aa000a9b5eb000af609ce8-CA5c40c000ae204f3b9e740950ce202705",
"status": "completed",
"start_time": "2020-11-25T06:28:52.000Z",
"end_time": "2020-11-25T06:29:26.000Z",
"duration": 25,
"ring_duration": 6,
"to": "12062700000",
"from": "1111111111",
"direction": "inbound"
},
"outbound": {
"sid": "ID000a2ae179aa000a9b5eb000af609ce8-CA5da000a000ba4d50a6a87b7a0000de00",
"status": "completed",
"start_time": "2020-11-25T06:28:52.000Z",
"end_time": "2020-11-25T06:29:26.000Z",
"duration": 25,
"ring_duration": 6,
"to": "2222222222",
"from": "12062700000",
"direction": "outbound-api"
}
}
]
}
This API is used to see the information of all sessions created by a user.
Environment | URL |
---|---|
Base URL | https://api.tatacommunications.com/vcn/v1.0 |
API URL | https://api.tatacommunications.com/vcn/v1.0/contexts |
Method | Route |
---|---|
API Method | GET |
The following query parameters can be passed in the API.
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
contextId | String | Optional | Context ID of session |
status | String | Optional | It identifies the active/inactive status of the masking session. Status can be “active” or “inactive”. |
type | String | Optional | Type of session can be “one-one” or “many-one”. |
aNumber | String | Optional | A party number for the session in request |
bNumber | String | Optional | B party number for the session in request |
maskingNumber | String | Optional | The number that is used as a masking number |
country | String | Optional | Country of masking number (ISO3 Standard Format) |
contextStartFrom | String | Optional | Time at or after which the session started (This field accepts time in format of YYYY-MM-DDTHH:MM:SS.sssZ which is the ISO Standard format of Date) |
contextStartTo | String | Optional | Time at or before which the session started (This field accepts time in format of YYYY-MM-DDTHH:MM:SS.sssZ which is the ISO Standard format of Date) |
pageNumber | String | Optional | Page number of the paginated response. Default value is ‘1’. |
pageSize | String | Optional | Number of contexts to be shown in one page would be less than or equal to the page size provided. Default value is ‘100’. |
copy
curl --location --request GET 'https://api.tatacommunications.com/vcn/v1.0/contexts?aNumber=65987XXXXX&country=SGP &pageNumber=1&pageSize=50' \
--header 'Authorization: Basic djgjgJGJFJJjjgjhg7686JBKJHLKH=='
HTTP Status Code | Reason of Response |
---|---|
200 | Request was successful and, as a result, session details are sent |
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 |
Parameter | Data Type | Required/ Optional | Description |
---|---|---|---|
totalCount | Number | Required | Total number of sessions found for the provided values of query filters |
resultCount | Number | Required | Number of sessions that can be seen on the current page of the paginated response |
noOfPages | Number | Required | Total number of pages of the paginated response |
pageSize | Number | Required | Page Size of the paginated response |
pageNumber | Number | Required | Page number of the current page of the paginated response |
contexts | Array of Objects | Required | List of sessions along with their details found for the provided values of query filters. |
contextId | String | Optional | A unique Context ID is created for every masking session. It is a unique identifier for every session |
status | String | Optional | It identifies the active/inactive status of the masking session. Status can be “active” or “inactive”. |
type | String | Optional | Type of session created as per request. It can be “one-one” or “many-one”. |
aNumber | String | Optional | A party number |
bNumber | String | Optional | B party number |
bNumberList | Array of Strings | Optional | If context Type is “many-one”. |
maskingNumber | String | Optional | The number that is used as a masking number |
country | String | Optional | Country of masking number (ISO3 Standard Format) |
timeScheduleInSec | String | Optional | Total scheduled time in seconds for automatically deactivating the context. |
contextStart | String | Optional | Activation time of the context that accepts ISO standard time format |
contextEnd | String | Optional | Deactivation time of the context that accepts ISO standard time format |
callRecords | Array of Objects | Optional | List of call records showing inbound and outbound SIDs for each call |
inboundSid | String | Optional | Unique String Identifier created for the inbound leg of the call |
outboundSid | String | Optional | Unique String Identifier created for the outbound leg of the call |
copy
{
"totalCount": 2,
"resultCount": 2,
"noOfPages": 1,
"pageSize": 50,
"pageNumber": 1,
"contexts": [
{
"contextId": "NMC-ab0000-a000-11ab-7000-st00003400",
"status": "active",
"type": "one-one",
"aNumber": "65987XXXXX",
"bNumber": "65954XXXXX",
"bNumberList": [],
"maskingNumber": "653XXXXXXX",
"country": "SGP",
"timeScheduleInSec": "3600",
"contextStart": "2021-06-09T09:20:55.854Z",
"callRecords": [
{
"inboundSid": "ID24220000010-CA8a00000b5f24a",
"outboundSid": "ID24220000010-CA5a37d0c756080"
},
{
"inboundSid": "ID266e10-CA41ad193c65cb",
"outboundSid": "ID266e10-CA2b3e4a963a71"
}
]
},
{
"contextId": "NMC-e00000-b000-1000-9000-io000000",
"status": "inactive",
"type": "one-one",
"aNumber": "65987XXXXX",
"bNumber": "65787XXXXX",
"bNumberList": [],
"maskingNumber": "653XXXXXXX",
"country": "SGP",
"timeScheduleInSec": "86400",
"contextStart": "2021-05-21T08:38:28.467Z",
"contextEnd": "2021-05-22T08:38:28.979Z",
"callRecords": [
{
"inboundSid": "ID248e8-CAc7bbc",
"outboundSid": "ID248e8-CAe7ed"
}
]
}
]
}
Anonymize, Authenticate, Programmable SMS
Please fill in your details below and we will get in touch with you shortly
One of our team members will be in contact soon.
Please fill in your details below and we will get in touch with you shortly
One of our team members will be in contact soon.
Please fill in your details below
One of our team members will be in contact soon.
You will need auth token to access our APIs. Please fill in your details below and we will get in touch with you.
One of our team members will be in contact soon.