Thank you for filling out the form. One of our mobile experts will be in touch shortly to discuss your inquiry.
If you have any other questions please feel free to email us directly at info@mitto.ch
Thank you for filling out the form. One of our mobile experts will be in touch shortly to discuss your inquiry.
If you have any other questions please feel free to email us directly at info@mitto.ch
This page provides details about number masking use cases. Use the examples provided to build more complex applications. Number masking use cases include:
Create applications with the Number Masking API. For each application, assign phone numbers to create a pool of mask numbers. For example, imagine a ride sharing application. Whenever a ride is booked by a customer, you create a new context and add participants (driver and customer) to that context. Number Masking automatically selects the mask number from the pool and assigns it to participants. Whenever a participant calls a mask number, the other participant in the context receives a call from their assigned mask number, maintaining complete privacy.
curl -X POST \
'https://cpaas.mittoapi.com/numbermasking/applications' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{"enterpriseSid":"EN838bcdf35f9d421fad3ab516195b873b", \
"name" : "MyTestApplication"
}'
{
"code":200,
"message":"OK",
“data”:
{
“sid":"NMAb6eb071d21124dbab20b095c25f1274f",
“enterpriseSid”: “ EN838bcdf35f9d421fad3ab516195b873b”,
“name”:”MyTestApplication”,
“status”:”open”,
“ttl”:”0”,
“numberSelectionBehavior”:”avoid-sticky”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"uri":/numbermasking/applications/search/NMAb6eb071d21124dbab20b095c25f1274f "
}
}
{
"errorCode": "461",
"message": "Application name not unique",
"data": {
"name": "App4",
"enterpriseSid": "EN995ef31d1ae64ef48f45685cb67dca1f"
}
}
You can retrieve a complete list of applications you created. You can specify page and page length as part of your request.
curl -X GET \
'https://cpaas.mittoapi.com/numbermasking/applications/search?pageSize=2&page=0' \
--user '{your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"result": [
{
“sid":"NMAb6eb071d21124dbab20b095c25f1274f",
“name”:”MyTestApplication”,
“status”:”open”,
“ttl”:”0”,
“numberSelectionBehavior”:”avoid-sticky”,
“accountEmail”: "email@company.com”,
"dateCreated":“2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"uri":/numbermasking/applications/search/NMAb6eb071d21124dbab20b095c25f1274f "
},
{
“sid":"NMAb6eb071d21124dbab20b095c25f1274e",
“name”:”DeliveryApplication”,
“status”:”open”,
“ttl”:”0”,
“numberSelectionBehavior”:”avoid-sticky”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-23 09:53:51",
"dateUpdated":"2019-07-23 09:53:51",
"uri":/numbermasking/applications/search/NMAb6eb071d21124dbab20b095c25f1274e "
}
],
"pageSize": 2,
"total": 3,
"page": 0,
"numPages": 2,
"start": 0,
"end": 1,
"firstPageUri": "/messageexchange/enterprise/search/?pageSize=2&page=0",
"nextPageUri": "/messageexchange/enterprise/search/?pageSize=2&page=1",
"uri": "/messageexchange/enterprise/search/?pageSize=2&page=0"
},
"code": 200,
"message": "OK"
}
Retrieve a single application by its unique application ID.
curl -X GET \
'https://cpaas.mittoapi.com/numbermasking/applications/search?APP36eb071d21124dbab20b095c25f1274f' \
--user '{your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
“sid":"APPbceb071d21124dbab20b095c25f1274f",
“name”:”MyTestApplication”,
“status”:”open”,
“ttl”:”0”,
“numberSelectionBehavior”:”avoid-sticky”,
“accountEmail”: "email@mycompany.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"uri":/numbermasking/applications/search/APPbceb071d21124dbab20b095c25f1274f "
},
"code": 200,
"message": "OK"
}
You can update an application with a PUT request. You can use the request parameters detailed for creating an application.
curl -X PUT \
'https://cpaas.mittoapi.com/numbermasking/applications/APP36eb071d21124dbab20b095c25f1274f' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"ttl" : "600"
}
{
"data": {
“sid":"NMAb6eb071d21124dbab20b095c25f1274f",
“name”:”MyTestApplication”,
“status”:”open”,
“ttl”:”600”,
“numberSelectionBehavior”:”avoid-sticky”,
“accountEmail”:”email@mycompany.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"uri":/numbermasking/applications/search/NMAb6eb071d21124dbab20b095c25f1274f "
},
"code": 200,
"message": "OK"
}
If you no longer need an application, you can delete it. Be careful, deletion is permanent.
curl -X DELETE \
'https://cpaas.mittoapi.com/numbermasking/applications/NMAb6eb071d21124dbab20b095c25f1274f' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
“sid":"NMAb6eb071d21124dbab20b095c25f1274f",
“name”:”MyTestApplication”,
“status”:”deleted”,
“ttl”:”600”,
“numberSelectionBehavior”:”avoid-sticky”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-08-22 09:53:51",
"uri":/numbermasking/applications/search/NMAb6eb071d21124dbab20b095c25f1274f "
},
"code": 200,
"message": "OK"
}
{
"code":462,
"message":"Application status not open",
“data”:
{
“sid":"NMAb6eb071d21124dbab20b095c25f1274f",
“name”:”MyTestApplication”,
“status”:”deleted”,
“ttl”:”600”,
“numberSelectionBehavior”:”avoid-sticky”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-08-22 09:53:51",
"uri":/numbermasking/applications/search/NMAb6eb071d21124dbab20b095c25f1274f "
}
}
You can see the phone numbers reserved for your applications by retrieving a list of available phone numbers.
curl -X GET \
'https://cpaas.mittoapi.com/numbermasking/phonenumbers/search?pageSize=2&page=0' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"result": [
{
"sid":"PN0b4201c6c87749f29367e6cf000686cb",
"friendlyName":"Test Number",
"phoneNumber":"12013507693",
"capabilities": {
"voice_capable": true,
"sms_capable": false,
"mms_capable": false,
"fax_capable": false
},
“applicationSid”:”xxx”
"url":/numbermasking/phonenumbers/search/PN0b4201c6c87749f29367e6cf000686cb"
},
{
{
"sid":"PN0b4201c6c87749f29367e6cf000686ce",
"friendlyName":"Mask Number 2",
"phoneNumber":"12012444945",
"capabilities": {
"voice_capable": true,
"sms_capable": false,
"mms_capable": false,
"fax_capable": false
},
"url":/numbermasking/phonenumbers/search/PN0b4201c6c87749f29367e6cf000686ce"
}
}
],
"pageSize": 2,
"total": 3,
"page": 0,
"numPages": 2,
"start": 0,
"end": 1,
"firstPageUri": "/numbermasking/phonenumbers/search/?pageSize=2&page=0",
"nextPageUri": "/numbermasking/phonenumbers/search/?pageSize=2&page=1",
"uri": "/numbermasking/phonenumbers/search/?pageSize=2&page=0"
},
"code": 200,
"message": "OK"
}
You can retrieve an individual phone number that’s available for masking if you know the number’s ID.
curl -X GET \
https://cpaas.mittoapi.com/numbermasking/phonenumbers/search/PN0b4201c6c87749f29367e6cf000686cb \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"sid":"PN0b4201c6c87749f29367e6cf000686cb",
"friendlyName":"Test Number",
"phoneNumber":"12013507693",
"capabilities": {
"voice_capable": true,
"sms_capable": false,
"mms_capable": false,
"fax_capable": false
},
"url":/numbermasking/phonenumbers/search/PN0b4201c6c87749f29367e6cf000686cb"
},
"code": 200,
"message": "OK"
}
Your application needs a pool of phone numbers to use for masking. Assign individual numbers to your application with this request.
curl -X POST \
'https://cpaas.mittoapi.com/numbermasking/maskednumbers' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"sid" : "PN67b2dddf3636497ca3d62a7719c696ed"
}’
{
"code":200,
"message":"OK",
“data”:
{
"sid":"NMMb6eb071d21124dbab20b095c25f8944a",
“phoneNumberSid”:”PN67b2dddf3636497ca3d62a7719c696ed”,
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"friendlyName":"Mask Number",
"phoneNumber":"12013507693",
"capabilities": {
"voice_capable": true,
"sms_capable": false,
"mms_capable": false,
"fax_capable": false
},
"isReserved":"false",
“inUse”:”0”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/maskednumbers/search/NMMb6eb071d21124dbab20b095c25f8944a"
}
}
If creation fails, this response is returned with the corresponding HTTP Error Code.
{
"errorCode": "460",
"message": "Application not found",
"data": {
"sid": "APP8ef9180b42924d96a62178768901c677aa"
}
}
See what numbers are in the masking pool for all applications.
curl -X GET \
'https://cpaas.mittoapi.com/numbermasking/maskednumbers/search?pageSize=2&page=0' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"result": [
{
"sid": "PH1d0c934f9bed411484d36a63067e345d",
"dateUpdated": "2020-05-11T10:37:23+0000",
"dateCreated": "2020-05-05T06:09:11+0000",
"accountEmail": "entpuser2@testent2.com",
"uri": "/numbermasking/maskednumbers/search/PH1d0c934f9bed411484d36a63067e345d",
"applicationSid": "APP56dd5e389aa64e90846be68645288b6b",
"phoneNumberSid": "PNbaa25148dc0d469f8050847439ba77fb",
"phoneNumber": "19713316943",
"isReserved": false,
"inUse": true
},
{
"sid": "PHccf45a3855274b01acf8172d62630881",
"dateUpdated": "2020-05-11T07:39:42+0000",
"dateCreated": "2020-05-05T06:00:54+0000",
"accountEmail": "entpuser2@testent2.com",
"uri": "/numbermasking/maskednumbers/search/PHccf45a3855274b01acf8172d62630881",
"applicationSid": "APP56dd5e389aa64e90846be68645288b6b",
"phoneNumberSid": "PN197e742df4d54efea2e70d82cdd435cd",
"phoneNumber": "15713316943",
"isReserved": false,
"inUse": false
}
],
"pageSize": 2,
"total": 5,
"page": 0,
"numPages": 3,
"start": 0,
"end": 1,
"firstPageUri": "/numbermasking/maskednumbers/search/?enterpriseSid=ENf625475702d44d29a8d605f28aaf7d3e&pageSize=2&page=0",
"uri": "/numbermasking/maskednumbers/search/?enterpriseSid=ENf625475702d44d29a8d605f28aaf7d3e&pageSize=2&page=1"
},
"code": 200,
"message": "OK"
}
You can retrieve a single number used in a mask pool if you have the ID for the phone number.
curl -X GET \
https://cpaas.mittoapi.com/numbermasking/maskednumbers/search/NMMb6eb071d21124dbab20b095c25f8944a \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"sid":"NMMb6eb071d21124dbab20b095c25f8944a",
“phoneNumberSid”:”PN67b2dddf3636497ca3d62a7719c696ed”,
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"phoneNumber":"12013507693",
"isReserved":"false",
“inUse”:”true”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/maskednumbers/search/NMMb6eb071d21124dbab20b095c25f8944a"
},
"code": 200,
"message": "OK"
}
You can update a mask number to list it as reserved or not.
curl -X PUT \
'https://cpaas.mittoapi.com/numbermasking/maskednumbers/NMMb6eb071d21124dbab20b095c25f8944a' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"isReserved" : "true"
}'
{
"data": {
"sid":"NMMb6eb071d21124dbab20b095c25f8944a",
“phoneNumberSid”:”PN67b2dddf3636497ca3d62a7719c696ed”,
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"phoneNumber":"12013507693",
"isReserved":"true",
“inUse”:”true”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/maskednumbers/search/NMMb6eb071d21124dbab20b095c25f8944a"
},
"code": 200,
"message": "OK"
}
{
"errorCode": "471",
"message": "Phone Number not found",
"data": {
"sid":"NMMb6eb071d21124dbab20b095c25f8944a",
"isReserved" : "true"
}
}
You can remove a masked number from the masked number pool for an application. After you remove a number from a pool, it is available to be added in other applications’ pools.
curl -X DELETE \
'https://cpaas.mittoapi.com/numbermasking/maskednumbers/NMMb6eb071d21124dbab20b095c25f8944a' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"sid":"NMMb6eb071d21124dbab20b095c25f8944a",
“phoneNumberSid”:”PN67b2dddf3636497ca3d62a7719c696ed”,
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"phoneNumber":"12013507693",
"isReserved":"false",
“inUse”:”true”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/maskednumbers/search/NMMb6eb071d21124dbab20b095c25f8944a"
},
"code": 200,
"message": "OK"
}
{
"code":471,
"message":"Phone Number not found",
“data”:
{
“sid":"NMAb6eb071d21124dbab20b095c25f1274f"
}
}
A context is a single instance of two individuals communicating. It belongs to an application and maps two participants. An example context would be between a taxi driver and a customer. It can be active for a predefined period of time, or it can be deactivated upon request via API call.
curl -X POST \
'https://cpaas.mittoapi.com/numbermasking/contexts' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"name" : "TestSession1"
}'
{
"code":200,
"message":"OK",
“data”:
{
"sid":"NMCb6eb071d21124dbab20b095c25f8932x",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"name":"TestSession1",
"ttl":"600",
"mode":"voice-only",
"status":"open",
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/contexts/search/NMCb6eb071d21124dbab20b095c25f8932x"
}
}
{
"errorCode": "460",
"message": "Application not found",
"data": {
"sid": "APP0088803a42d24a64bba89669a02e991aaa"
}
}
Retrieve a list of contexts associated with an application.
curl -X GET \
'https://cpaas.mittoapi.com/numbermasking/contexts/search?pageSize=2&page=0' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"result": [
{
"sid":"NMCb6eb071d21124dbab20b095c25f8932x",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"name":"TestSession1",
"ttl":"600",
"mode":"voice-only",
"status":"open",
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/contexts/search/NMCb6eb071d21124dbab20b095c25f8932x"
},
{
"sid":"NMCb6eb071d21124dbab20b095c25f1234q",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"name":"TestSession2",
"ttl":"3600",
"mode":"voice-only",
"status":"open",
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"dateLastInteraction":"2019-07-22 10:53:51",
"url":/numbermasking/contexts/search/NMCb6eb071d21124dbab20b095c25f1234q"
}
],
"pageSize": 2,
"total": 3,
"page": 0,
"numPages": 2,
"start": 0,
"end": 1,
"firstPageUri": "/numbermasking/contexts/search/?pageSize=2&page=0",
"nextPageUri": "/numbermasking/contexts/search/?pageSize=2&page=1",
"uri": "/numbermasking/contexts/search/?pageSize=2&page=0"
},
"code": 200,
"message": "OK"
}
You can retrieve a specific context for an application if you have the context’s unique ID.
curl -X GET \
'https://cpaas.mittoapi.com/numbermasking/contexts/search/CTXb6eb071d21124dbab20b095c25f8932x' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"sid":"NMCb6eb071d21124dbab20b095c25f8932x",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"name":"TestSession1",
"ttl":"600",
"mode":"voice-only",
"status":"open",
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"uri":/numbermasking/contexts/search/NMCb6eb071d21124dbab20b095c25f8932x”
},
"code": 200,
"message": "OK"
}
Update a context’s time to live to be longer or shorter. You can also update the status of the context from closed to open, open to closed, or in_progress to closed.
curl -X PUT \
'https://cpaas.mittoapi.com/numbermasking/contexts/NMCb6eb071d21124dbab20b095c25f8932x' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"ttl" : "3600"
}'
{
"data": {
"sid":"NMCb6eb071d21124dbab20b095c25f8932x",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"name":"TestSession1",
"ttl":"3600",
"mode":"voice-only",
"status":"open",
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/contexts/search/NMCb6eb071d21124dbab20b095c25f8932x”
},
"code": 200,
"message": "OK"
}
{
"errorCode": "466",
"message": "Context name not unique",
"data": {
"name": "TestSession1"
}
}
When participants finish communicating, you can delete their context.
curl -X DELETE \
'https://cpaas.mittoapi.com/numbermasking/contexts/CTXb6eb071d21124dbab20b095c25f8932x' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"sid":"CTXb6eb071d21124dbab20b095c25f8932x",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
"name":"TestSession1",
"ttl":"600",
"mode":"voice-only",
"status":"closed",
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 11:53:51",
"url":/numbermasking/contexts/search/CTXb6eb071d21124dbab20b095c25f8932x"
},
"code": 200,
"message": "OK"
}
{
"code":467,
"message":"Context status closed",
“data”:
{
“sid":"NMAb6eb071d21124dbab20b095c25f1274f",
“name”:”MyTestApplication”,
“status”:”closed”,
“ttl”:”600”,
“numberSelectionBehavior”:”avoid-sticky”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-08-22 11:53:51",
"uri":/numbermasking/applications/search/NMAb6eb071d21124dbab20b095c25f1274f "
}
}
When two or more parties communicate with one another, they must be part of the same context within an application. You can add each participant with a POST request.
curl -X POST \
https://cpaas.mittoapi.com/numbermasking/participants \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
"participantPhoneNumber" : "15713316943"
}’
{
"code":200,
"message":"OK",
“data”:
{
"sid":"NMPb6eb071d21124dbab20b095c25f1111d",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
“participantPhoneNumber”:”15713316943”,
“friendlyName”:”Mobile”,
“maskPhoneNumber”:”12013507693”,
“maskPhoneNumberSid”:”NMMb6eb071d21124dbab20b095c25f8944a”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/participants/search/NMPb6eb071d21124dbab20b095c25f1111d"
}
}
{
"errorCode": "465",
"message": "Context not found",
"data": {
"sid": "CTXd6ecc4d93e804024a8c211b76391df97a"
}
}
You can get a list of participants for a specific context, or across multiple contexts. This example shows how to get a list of all participants across contexts.
curl -X GET \
https://cpaas.mittoapi.com/numbermasking/participants/search?pageSize=2&page=0 \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"result": [
{
"sid":"NMPb6eb071d21124dbab20b095c25f1111d",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
“participantPhoneNumber”:”15713316943”,
“friendlyName”:”Mobile”,
“maskPhoneNumber”:”12013507693”,
“maskPhoneNumberSid”:”NMMb6eb071d21124dbab20b095c25f8944a”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/participants/search/NMPb6eb071d21124dbab20b095c25f1111d"
},
{
"sid":"NMPb6eb071d21124dbab20b095c25f2222e",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
“participantPhoneNumber”:”15713316944”,
“friendlyName”:”Mobile2”,
“maskPhoneNumber”:”12012444945”,
“maskPhoneNumberSid”:”NMMb6eb071d21124dbab20b095c25f8955b”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/participants/search/NMPb6eb071d21124dbab20b095c25f2222e"
}
],
"pageSize": 2,
"total": 3,
"page": 0,
"numPages": 2,
"start": 0,
"end": 1,
"firstPageUri": "/numbermasking/participants/search/?pageSize=2&page=0",
"nextPageUri": "/numbermasking/participants/search/?pageSize=2&page=1",
"uri": "/numbermasking/contexts/participants/?pageSize=2&page=0"
},
"code": 200,
"message": "OK"
}
This example shows you how to retrieve a specific participant from a specific context.
curl -X GET \
'https://cpaas.mittoapi.com/numbermasking/participants/search/NMPb6eb071d21124dbab20b095c25f1111d' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"sid":"NMPb6eb071d21124dbab20b095c25f1111d",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
“participantPhoneNumber”:”15713316943”,
“friendlyName”:”Mobile”,
“maskPhoneNumber”:”12013507693”,
“maskPhoneNumberSid”:”NMMb6eb071d21124dbab20b095c25f8944a”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/participants/search/NMPb6eb071d21124dbab20b095c25f1111d"
},
"code": 200,
"message": "OK"
}
You can remove a participant from a context with this example. If there are ongoing calls, those will continue to completion, but no new calls can be made.
curl -X DELETE \
'https://cpaas.mittoapi.com/numbermasking/participants/NMPb6eb071d21124dbab20b095c25f1111d' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"sid":"NMPb6eb071d21124dbab20b095c25f1111d",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
“participantPhoneNumber”:”15713316943”,
“friendlyName”:”Mobile”,
“maskPhoneNumber”:”12013507693”,
“maskPhoneNumberSid”:”NMMb6eb071d21124dbab20b095c25f8944a”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/participants/search/NMPb6eb071d21124dbab20b095c25f1111d"
},
"code": 200,
"message": "OK"
}
{
"code":482,
"message":"Participant already removed",
“data”:
{
"sid":"NMPb6eb071d21124dbab20b095c25f1111d",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
“participantPhoneNumber”:”15713316943”,
“friendlyName”:”Mobile”,
“maskPhoneNumber”:”12013507693”,
“maskPhoneNumberSid”:”NMMb6eb071d21124dbab20b095c25f8944a”,
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
“dateRemoved”:”2019-07-22 11:53:51",
"url":/numbermasking/participants/search/NMPb6eb071d21124dbab20b095c25f1111d"
}
}
An interaction is a read-only call detail record for a given context. Each interaction represents a single communication caller and called participant.
curl -X GET \
'https://cpaas.mittoapi.com/numbermasking/interactions/search' \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"result": [
{
"sid":"NMIb6eb071d21124dbab20b095c25f0007k",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
“inboundParticipantSid”:"NMPb6eb071d21124dbab20b095c25f1111d",
“inboundTargetSid”:"ID308543a39dfd49b7a7231df9622763d8-CAf397453213fc43208e4d238e79809e99",
“inboundParticipantPhoneNumber”:"15713316943",
“inboundMaskPhoneNumber”:"12013507693",
“inboundChannelStatus”:”completed”,
“outboundParticipantSid”:"NMPb6eb071d21124dbab20b095c25f2222e",
“outboundTargetSid”:"ID1f2a2222772f4195948d040a2ccc648c-CA019d4b96e188484caec75b8b906ceb51",
“outboundParticipantPhoneNumber”:"15713316944",
“outboundMaskPhoneNumber”:"12012444945",
“outboundChannelStatus”:”completed”,
type:"voice",
"data": {
"duration": "28"
},
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/interactions/search/NMIb6eb071d21124dbab20b095c25f0007k"
},
{
"sid":"NMIb6eb071d21124dbab20b095c25f0008p",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
“inboundParticipantSid”:"NMPb6eb071d21124dbab20b095c25f1111d",
“inboundTargetSid”:"ID308543a39dfd49b7a7231df9622763d8-CAf397453213fc43208e4d238e79809e97",
“inboundParticipantPhoneNumber”:"15713316943",
“inboundMaskPhoneNumber”:"12013507693",
“inboundChannelStatus”:”completed”,
“outboundParticipantSid”:"NMPb6eb071d21124dbab20b095c25f2222e",
“outboundTargetSid”:"ID1f2a2222772f4195948d040a2ccc648c-CA019d4b96e188484caec75b8b906ceb52",
“outboundParticipantPhoneNumber”:"15713316944",
“outboundMaskPhoneNumber”:"12012444945",
“outboundChannelStatus”:”completed”,
type:"voice",
"data": {
"duration": "294"
},
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 11:53:51",
"dateUpdated":"2019-07-22 11:53:51",
"url":/numbermasking/interactions/search/NMIb6eb071d21124dbab20b095c25f0008p"
}
],
"pageSize": 2,
"total": 3,
"page": 0,
"numPages": 2,
"start": 0,
"end": 1,
"firstPageUri": "/numbermasking/interactions/search/?pageSize=2&page=0",
"nextPageUri": "/numbermasking/interactions/search/?pageSize=2&page=1",
"uri": "/numbermasking/interactions/participants/?pageSize=2&page=0"
},
"code": 200,
"message": "OK"
}
You can retrieve a single interaction if you have the unique ID for the interaction.
curl -X GET \
https://cpaas.mittoapi.com/numbermasking/interactions/search/NMIb6eb071d21124dbab20b095c25f0007k \
--user ' {your_account_SID}:{your_account_token}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
{
"data": {
"sid":"NMIb6eb071d21124dbab20b095c25f0007k",
"applicationSid":"NMAb6eb071d21124dbab20b095c25f1274f",
“contextSid”:”NMCb6eb071d21124dbab20b095c25f8932x”,
“inboundParticipantSid”:"NMPb6eb071d21124dbab20b095c25f1111d",
“inboundTargetSid”:"ID308543a39dfd49b7a7231df9622763d8-CAf397453213fc43208e4d238e79809e99",
“inboundParticipantPhoneNumber”:"15713316943",
“inboundMaskPhoneNumber”:"12013507693",
“inboundChannelStatus”:”completed”,
“outboundParticipantSid”:"NMPb6eb071d21124dbab20b095c25f2222e",
“outboundTargetSid”:"ID1f2a2222772f4195948d040a2ccc648c-CA019d4b96e188484caec75b8b906ceb51",
“outboundParticipantPhoneNumber”:"15713316944",
“outboundMaskPhoneNumber”:"12012444945",
“outboundChannelStatus”:”completed”,
type:"voice",
"data": {
"duration": "28"
},
“accountEmail”:”email@company.com”,
"dateCreated":"2019-07-22 09:53:51",
"dateUpdated":"2019-07-22 09:53:51",
"url":/numbermasking/interactions/search/NMIb6eb071d21124dbab20b095c25f0007k"
},
"code": 200,
"message": "OK"
}