Introduction
This API allows you to manage your number inventory, set call and sms routing, and send and receive SMS.
You can view code examples in the dark area to the right, and you can cycle between the programming language of the examples with the tabs in the top right.
If you are testing using cli curl, we recommend you use jq to make the responses easier to read. If your system supports apt, you can install jq with
$ apt-get install jq
to use jq, pipe the response like this:
curl -u username:password carrierapi.voycetel.com/v1 | jq
'.'
The response will be much easier to read. Lynk Telecom has no affiliation with jq
Authentication
To test authentication, use this code:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -u user:password \
-H "Content-Type: application/json" \
https://carrierapi.voycetel.com/v1
If the authentication is accepted, you will see:
{
"AUTHENTICATION" : "SUCCESS"
}
The API uses a Secret ID and Authorization Key for authentication, following HTTP Basic Authorization standards.
In short, you can use your SID as your username and Auth Key as the password when making requests, e.g.
curl -u username:password https://carrierapi.voycetel.com/v1
If you don’t have authorization credentials, you can sign up here
Trunks
Get All Trunks
Get all your trunks:
# Get a list of your trunks
curl -u user:password \
-H "Content-Type: application/json" \
https://carrierapi.voycetel.com/v1/trunks
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
The above command returns JSON structured like this:
[
{
"ID": "28",
"TRUNK_NAME": "LA Office",
"ENABLED": "1",
"CPS": "10",
"SESSIONS": "10",
"GATEWAYS": [
{
"IP": "44.55.66.77",
"CPS": "10",
"SESSIONS": "10"
},
{
"IP": "44.55.66.78",
"CPS": "10",
"SESSIONS": "10"
}
]
},
{
"ID": "29",
"TRUNK_NAME": "NY Office",
"ENABLED": "1",
"CPS": "10",
"SESSIONS": "10",
"GATEWAYS": [
{
"IP": "22.33.44.55",
"CPS": "10",
"SESSIONS": "10"
},
{
"IP": "22.33.44.56",
"CPS": "10",
"SESSIONS": "10"
}
]
}
]
A trunk is the connection between your phone numbers and the IP addresses where you want calls to route. A trunk can have many routing destinations, also called gateways, and many numbers can be assigned to a trunk.
This endpoint retrieves all trunks possessed by your company.
HTTP Request
GET https://carrierapi.voycetel.com/v1/trunks
Get a Specific Trunk
Get a specific trunk:
curl -u user:password \
-H "Content-Type: application/json" \
https://carrierapi.voycetel.com/v1/trunks/<ID>
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
The above command returns JSON structured like this:
{
"ID": "28",
"TRUNK_NAME": "LA Office",
"CPS": "10",
"SESSIONS": "10",
"NUMBERS": [],
"GATEWAYS": [
{
"ID": "33",
"IP": "22.33.44.55",
"PREFIX": "",
"CPS": "10",
"SESSIONS": "10"
},
{
"ID": "34",
"IP": "22.33.44.56",
"PREFIX": "",
"CPS": "10",
"SESSIONS": "10"
}
]
}
This endpoint retrieves a specific trunk based on its ID.
HTTP Request
GET https://carrierapi.voycetel.com/v1/trunks/<id>
URL Parameters
Parameter | Description |
---|---|
id | The ID of the trunk you are trying to retrieve |
Create a New Trunk
Create a new trunk
curl -X POST \
-u user:password \
-H "Content-Type: application/json" \
-d '{"name" : "Berlin Office", "cps" : "<cps>", "sessions" : "<sessions>"}' \
https://carrierapi.voycetel.com/v1/trunks/create
The above command returns JSON structured like this:
{
"ID": "29",
"TRUNK_NAME": "Berlin Office",
"CPS": "2",
"SESSIONS": "30",
"NUMBERS": [],
"GATEWAYS": []
}
This endpoint creates a new trunk.
HTTP Request
POST https://carrierapi.voycetel.com/v1/trunks/create
Query Parameters
Parameter | Default | Description |
---|---|---|
name | Required | Trunk name |
cps | 0 | Limit the number of CPS we will send you on this trunk |
sessions | 10 | Limit the number of Sessions we will send you on this trunk |
Deactivate a Trunk
Deactivate a trunk
curl -X DELETE \
# Confirm your authentication using the base route
-u user:password \
-H "Content-Type: application/json" \
https://carrierapi.voycetel.com/v1/trunks/<id>
Yields a response like:
{
"STATUS" : "SUCCESS"
}
This endpoint deactivates a trunk.
HTTP Request
DELETE https://carrierapi.voycetel.com/v1/trunks/<id>
URL Parameters
Parameter | Description |
---|---|
id | ID of the trunk to deactivate |
Gateways
Create and assign a Gateway to a Trunk
To create and assign a gatway:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X POST \
-u user:password \
-H "Content-Type: application/json" \
-d '{"ip": "<ip>", "prefix" : "<prefix>", "cps" : "<cps>", "sessions" : "<sessions>"}'
https://carrierapi.voycetel.com/v1/trunks/<id>/gateway
Yields a response like:
{
"STATUS" : "SUCCESS"
}
This endpoint creates and adds a gateway to a trunk
HTTP Request
POST https://carrierapi.voycetel.com/v1/trunks/{id}/gateway
URL Parameters
Parameter | Description |
---|---|
id | The id of the trunk you want to assign the gateway to |
Query Parameters
Parameter | Default | Description |
---|---|---|
ip | Required | The id of the gateway you are trying to add |
prefix | N/A | Prepend digits to the number. Great for prefix-based call routing |
cps | 0 | Limit the number of CPS we will send you on this gateway |
sessions | 10 | Limit the number of Sessions we will send you on this gateway |
Delete a Gateway
To create and assign a gatway:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X DELETE \
-u user:password \
https://carrierapi.voycetel.com/v1/gateway/<id>
Yields a response like:
{
"STATUS" : "SUCCESS"
}
This endpoint removes a gateway
HTTP Request
DELETE https://carrierapi.voycetel.com/v1/gateway/{id}
URL Parameters
Parameter | Description |
---|---|
id | ID of the gateway to delete |
Numbers
Get My Numbers
Get all your numbers:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -u user:password \
-H "Content-Type: application/json" \
https://carrierapi.voycetel.com/v1/dids/current
Yields a response like:
[
{
"DID": "5555633774",
"NOTES": "",
"ASSIGNED_NAME": "",
"STATE": "TN",
"TRUNK_ID": "28",
"SMS_ORIG_URL": "",
"SMS_ENABLED": "0",
"E911_ENABLED": "0"
},
{
"DID": "5555633775",
"NOTES": "",
"ASSIGNED_NAME": "",
"STATE": "TN",
"TRUNK_ID": "28",
"SMS_ORIG_URL": "",
"SMS_ENABLED": "0",
"E911_ENABLED": "0"
}
]
Direct Inward Dialing (DID) is often used interchangeably with number, that’s why the routes and descriptions sometimes say “did”. This endpoint retrieves all DIDs that your company is subscribed to.
HTTP Request
GET https://carrierapi.voycetel.com/v1/dids/current
Search for a Number
Search for a number:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X POST
-u user:password \
-H "Content-Type: application/json" \
-d '{"state" : "OH", "prefix" : "", "rateCenter" : "", "smsEnabled" : "0", "tollFree" : "0"}' \
https://carrierapi.voycetel.com/v1/dids/search
Yields a response like:
[
{
"number": "15552088613",
"state": "OH",
"ratecenter": "City Place",
"nrc": "0.0015",
"mrc": "0.0015",
"rate": "0.00150",
"BATCH_ID": "NJ1Q",
"sms_enabled": ""
},
{
"number": "15552088612",
"state": "OH",
"ratecenter": "City Place",
"nrc": "0.0015",
"mrc": "0.0015",
"rate": "0.00150",
"BATCH_ID": "QJ==",
"sms_enabled": ""
}
]
This route allows you to pick some parameters and returns a list of numbers you can subscribe to that fit your needs
HTTP Request
POST https://carrierapi.voycetel.com/v1/dids/search
Query Parameters
Parameter | Type | Description |
---|---|---|
state | ISO 3166-2 | State |
prefix | int | First digits of the number. Accepts 1-9 digits |
rateCenter | string | Rate Center where number is located |
smsEnabled | bool 0 or 1 | If the number has SMS capability |
tollFree | bool 0 or 1 | If the number is Toll Free |
Order Number
Order a number:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X POST
-u user:password \
-H "Content-Type: application/json" \
-d '{"number" : "5555633772", "cname" : "Joes Muffler", "notes" : "Afterhours number", "trunkId": "24", "smsEnabled" : "0"}' \
https://carrierapi.voycetel.com/v1/dids/order
Yields a response like:
{
"STATUS" : "SUCCESS"
}
This endpoint requisitions a DID for your company, assuming that it is available. Use the results of the “search” route above
HTTP Request
POST https://carrierapi.voycetel.com/v1/dids/order
Query Parameters
Parameter | Default | Description |
---|---|---|
number | Required | The number you want to order |
cname | The CNAME value for the number. Must comply with AUP | |
notes | Notes for your record | |
trunkId | Trunk for the number | |
smsEnabled | 0 | Choose to activate SMS capability on SMS-enabled numbers |
Order Bulk Numbers
Order bulk numbers:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X POST
-u user:password \
-H "Content-Type: application/json" \
-d '{"numbers":[{"number":"5555633772","cname":"Joes Muffler","notes":"Afterhours number","trunkId":"2","smsEnabled":"0","ASSIGNED_NAME":"Joes Muffler","BATCH_ID":"NJ1Q"},{"number":"5555633773","cname":"Joes Muffler","notes":"Afterhours number","trunkId":"2","smsEnabled":"0","ASSIGNED_NAME":"Joes Muffler","BATCH_ID":"NJ1Q"}]}' \
https://carrierapi.voycetel.com/v1/dids/bulk_order
Yields a response like:
{
"STATUS" : "SUCCESS",
"FAILED_NUMBERS" : "",
"DUPLICATE_NUMBERS" : ""
}
This endpoint requisitions a DID's for your company, assuming that it is available. Use the results of the “search” route above. Request will contain array of multiple DID's.
HTTP Request
POST https://carrierapi.voycetel.com/v1/dids/bulk_order
Query Parameters
Parameter | Default | Description |
---|---|---|
number | Required | The number you want to order |
cname | The CNAME value for the number. Must comply with AUP | |
notes | Notes for your record | |
trunkId | Trunk for the number | |
smsEnabled | 0 | Choose to activate SMS capability on SMS-enabled numbers |
ASSIGNED_NAME | The assigned name for the numbers. etc company name | |
BATCH_ID | Required | Temporary Batch ID of the number to handle bulk order. You will get it in search results. |
Change Number Settings
update a number:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X POST
-u user:password \
-H "Content-Type: application/json" \
-d '{"number" : "5553457865", cname" : "", "notes" : "", "smsOrigUrl" : "", "trunkId" : ""}' \
https://carrierapi.voycetel.com/v1/dids/update
Yields a response like:
{
"STATUS" : "SUCCESS"
}
This route is for changing any setting for a number.
HTTP Request
POST https://carrierapi.voycetel.com/v1/dids/update
Query Parameters
Parameter | Description |
---|---|
number | The number you want to change |
cname | The CNAME value for the number. Must comply with AUP |
notes | Notes for your record |
smsOrigUrl | URL where you want inbound SMS to post |
trunkId | Trunk you want the number to route voice orig |
Unsubscribe from a Number
Unsubscribe from a number:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X DELETE
-u user:password \
https://carrierapi.voycetel.com/v1/dids/<did>
Yields a response like:
{
"STATUS" : "SUCCESS"
}
This route removes ownership of a DID from your account. This action is irreversable so make sure you really want to delete the number
HTTP Request
DELETE https://carrierapi.voycetel.com/v1/dids/<did>
URL Parameters
Parameter | Description |
---|---|
did | The did you are deleting from your account. |
Delete Bulk DID's
Delete Bulk DID's:
# Confirm your authentication using the base route
curl -X POST
-u user:password \
-H "Content-Type: application/json" \
-d '{"numbers":"5555633772,5555633773,5555633774", "type": "did"}' \
https://carrierapi.voycetel.com/v1/dids/bulk_delete_dids
Yields a response like:
{
"STATUS" : "SUCCESS"
}
This route removes ownership of a DID from your account. This action is irreversable so make sure you really want to delete the number. Request will contain array of multiple DID's. You can send a request of 2000 DID's at a time.
HTTP Request
POST https://carrierapi.voycetel.com/v1/dids/bulk_delete_dids
URL Parameters
Parameter | Default | Description |
---|---|---|
numbers | Required | The did's you are deleting from your account. Must be a comma separated string as per request on right side. |
type | Required | Type should be "did". |
Get Search Filters
Get Search Filters:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X POST
-u user:password \
-H "Content-Type: application/json" \
-d '{"prefix":"","suffix":"","state":"CA","ratecenter":"","lata":"","location":""}' \
https://carrierapi.voycetel.com/v1/dids/search_filters
Yields a response like:
{
"status": "200",
"response": {
"states": {
"state": "NY"
},
"latas": {
"lata": [
"328"
]
},
"locations": {
"location": [
"MONROE"
]
},
"rateCenters": {
"rateCenter": [
"WILLIAMSBG"
]
},
"npas": {
"npa": "513"
},
"nxxs": {
"nxx": [
"790"
]
},
"quantity": "0",
"consecutive": "1",
"categories": {
"category": "1"
},
"tnCount": "0"
}
}
With this operation users can request a list of all possible additional filter options for a given filter.
HTTP Request
POST https://carrierapi.voycetel.com/v1/dids/search_filters
Query Parameters
Parameter | Type | Description |
---|---|---|
state | ISO 3166-2 | State |
prefix | int | First digits of the number. Accepts 1-9 digits |
suffix | int | 3 Digit number |
rateCenter | string | Rate Center where number is located |
lata | LATA code like 538 | To search the inventory by LATA(s) |
location | string | Location name |
Hierarchy view of available coverage
Get all your numbers:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -u user:password \
-H "Content-Type: application/json" \
https://carrierapi.voycetel.com/v1/dids/hierarchical_view
Yields a response like:
{
"response": {
"states": {
"state": [
{
"name": "AL",
"latas": {
"lata": [
{
"name": "476",
"rateCenters": [
{
"name": "ALABASTER",
"npasVo": [
{
"name": "205",
"nxxVo": {
"nxxs": [
"894",
"728",
"729"
]
}
},
{
"name": "659",
"nxxVo": {
"nxxs": "209"
}
}
]
}
]
}
]
}
}
]
}
},
"status": "200"
}
Enables a user to identify the full coverage area in entire inventory by State, LATA, Rate Center, prefix and suffix.
Number Reputation
Search for Reputation score of a number:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X POST
-u user:password \
-H "Content-Type: application/json" \
-d '{"number": "1111111111"}' \
https://carrierapi.voycetel.com/v1/dids/phone_reputation
Yields a response like:
{
"did": "1111111111",
"CALL_TREATMENT": "ALLOW",
"CALLING_NAME": "NOGALES AZ",
"PROPENSITY": "--",
"FRAUD_SCORE": "--",
"Alternately": "+11111111111",
"Reported_Name": "",
"Reported_Category": "",
"Last_call": "Never",
"Total_Calls": "0",
"User_Reports": "0",
"Block_Status": "None",
"User_Repotation": "Neutral"
}
This route allows you to pick some parameters and returns reputation score of the number
HTTP Request
POST https://carrierapi.voycetel.com/v1/dids/phone_reputation
Query Parameters
Parameter | Type | Description |
---|---|---|
number | Required | The number you want get the reputation score. |
Bulk Number Reputation
Bulk reputation score of numbers :
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X POST
-u user:password \
-H "Content-Type: application/json" \
-d '{"numbers":["1111111111","2222222222","3333333333","4444444444"]}' \
https://carrierapi.voycetel.com/v1/dids/phone_reputation_bulk
Yields a response like:
[
{
"did": "1111111111",
"CALL_TREATMENT": "ALLOW",
"CALLING_NAME": "MOKELUMNE HL CA",
"PROPENSITY": "--",
"FRAUD_SCORE": "--",
"Alternately": "+11111111111",
"Reported_Name": "",
"Reported_Category": "",
"Last_call": "Never",
"Total_Calls": "0",
"User_Reports": "0",
"Block_Status": "None",
"User_Repotation": "Neutral"
},
{
"did": "2222222222",
"CALL_TREATMENT": "ALLOW",
"CALLING_NAME": "TURLOCK CA",
"PROPENSITY": "--",
"FRAUD_SCORE": "--",
"Alternately": "+12222222222",
"Reported_Name": "",
"Reported_Category": "",
"Last_call": "Never",
"Total_Calls": "0",
"User_Reports": "0",
"Block_Status": "None",
"User_Repotation": "Neutral"
},
{
"did": "3333333333",
"CALL_TREATMENT": "ALLOW",
"CALLING_NAME": "TRUMBULL CT",
"PROPENSITY": "--",
"FRAUD_SCORE": "--",
"Alternately": "+13333333333",
"Reported_Name": "",
"Reported_Category": "",
"Last_call": "Never",
"Total_Calls": "0",
"User_Reports": "0",
"Block_Status": "None",
"User_Repotation": "Neutral"
},
{
"did": "4444444444",
"CALL_TREATMENT": "ALLOW",
"CALLING_NAME": "NOGALES AZ",
"PROPENSITY": "--",
"FRAUD_SCORE": "--",
"Alternately": "+14444444444",
"Reported_Name": "",
"Reported_Category": "",
"Last_call": "Never",
"Total_Calls": "0",
"User_Reports": "0",
"Block_Status": "None",
"User_Repotation": "Neutral"
}
]
This route allows you to pick some parameters and returns reputation score for the given list of numbers
HTTP Request
POST https://carrierapi.voycetel.com/v1/dids/phone_reputation_bulk
Query Parameters
Parameter | Type | Description |
---|---|---|
numbers | Required | The array of numbers you want get the reputation score.(maximum 10 numbers are allowed) |
E911
Provision E911
provision e911:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X POST
-u user:password \
-H "Content-Type: application/json" \
-d '{"streetNum" : "2915", "streetName" : "W. Adams Way", "city" : "Akron", "state" : "OH", "zip" : "23126"}' \
https://carrierapi.voycetel.com/v1/e911/provision/<did>
Yields a response like:
{
"STATUS" : "SUCCESS"
}
This route is for enabling E911 on a number.
HTTP Request
POST
https://carrierapi.voycetel.com/v1/e911/provision/<did>
URL Parameters
Parameter | Description |
---|---|
did | The did you are provisioning E911 to. |
Query Parameters
Parameter | Default | Description | Example |
---|---|---|---|
streetNum | Required | The number part of the E911 street address | 2915 |
streetName | Required | The name part of the E911 street address | W. Adams Way |
city | Required | The city of the E911 street address | Akron |
state | Required | The state of the E911 street address | OH |
zip | Required | The zip of the E911 street address | 23126 |
additionalStreetInfo | “ | Any additional info for the E911 street address | Suite 302 |
zipExt | ” | Zip+4 for the E911 street address | 5436 |
Get E911 Information
get E911 information
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X GET
-u user:password \
-H "Content-Type: application/json" \
https://carrierapi.voycetel.com/v1/e911/<did>
Yields a response like:
{
"STREET_NUMBER": "2915",
"STREET_NAME": "W. Adams Way",
"ADDITIONAL_INFO": "Suite 302",
"CITY": "Akron",
"STATE": "OH",
"ZIP": "23126",
"ZIP_EXT": "5436"
}
This route is for getting E911 info for a number.
HTTP Request
GET https://carrierapi.voycetel.com/v1/e911/<did>
URL Parameters
Parameter | Description |
---|---|
did | The did you are getting E911 for. |
Remove E911 From a Number
remove E911 from a number
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
# Confirm your authentication using the base route
curl -X DELETE
-u user:password \
-H "Content-Type: application/json" \
https://carrierapi.voycetel.com/v1/e911/<did>
Yields a response like:
{
"STATUS": "SUCCESS"
}
This route is for removing E911 from a number.
HTTP Request
DELETE https://carrierapi.voycetel.com/v1/e911/<did>
URL Parameters
Parameter | Description |
---|---|
did | The did you are removing E911 for. |
CNAM
CNAM Data Only
CNAM API will only return known CNAM data. Additional details such as Rate Center and Wireless Caller will be suppressed. If data does not exist, API will return a 404. This is intended to be used for users who expect to failover between different CNAM vendors and can support receiving a HTTP 404 response.
Get CNAM:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
curl -X POST
-H "Content-Type: application/json"
-d '{"tn": "1201000000","account_id":"211e65b23c16ce413227v", "account_secret": "111be13cfb6b9226596fa55d2d7d"}'
https://cnam.tcpaas.com/getCnam
Yields a response like:
{
"status":"200",
"statusDescription":"OK",
"data":"KINGSTON ON"
}
HTTP Request
GET https://cnam.tcpaas.com/getCnam
Query Parameters
Parameter | Description |
---|---|
tn | The number. |
account_id | This is the user id get from the Login Protal |
account_secret | This is the account secret get from the Login Protal |
CNAM & Wireless Information
Get CNAM or Wireless Caller
curl -X POST
-H "Content-Type: application/json"
-d '{"tn": "1201000000","account_id":"211e65b23c16ce413227v", "account_secret": "111be13cfb6b9226596fa55d2d7d"}'
https://cnam.tcpaas.com/getCnamWireless
Yields a response like:
{
"status":"200",
"statusDescription":"OK",
"data":"KINGSTON ON"
}
CNAM API will return 'Wireless Caller' in cases where no CNAM record exists, and the source number is wireless. If the number is not wireless, API will return 404.
HTTP Request
GET https://cnam.tcpaas.com/getCnamWireless
POST Parameters
Parameter | Description |
---|---|
tn | The number. |
account_id | This is the user id get from the Login Protal |
account_secret | This is the account secret get from the Login Protal |
CNAM & Rate Center Information
Get CNAM or RateCenter
curl -X POST
-H "Content-Type: application/json"
-d '{"tn": "1201000000","account_id":"211e65b23c16ce413227v", "account_secret": "111be13cfb6b9226596fa55d2d7d"}'
https://cnam.tcpaas.com/getCnamRateCenter
Yields a response like:
{
"status":"200",
"statusDescription":"OK",
"data":"AL"
}
CNAM API will return Rate Center information in all cases where no CNAM record exists. No 404 is returned.
HTTP Request
GET https://cnam.tcpaas.com/getCnamRateCenter
POST Parameters
Parameter | Description |
---|---|
tn | The number. |
account_id | This is the user id get from the Login Protal |
account_secret | This is the account secret get from the Login Protal |
CNAM, Rate Center and Wireless Information
Get CNAM or Wireless or Rate Center
curl -X POST
-H "Content-Type: application/json"
-d '{"tn": "1201000000","account_id":"211e65b23c16ce413227v", "account_secret": "111be13cfb6b9226596fa55d2d7d"}'
https://cnam.tcpaas.com/getCnamWirelessRateCenter
Yields a response like:
{
"status":"200",
"statusDescription":"OK",
"data":"JAMES L HILL"
}
CNAM API will return Rate Center information in cases where no CNAM record exists. In cases where the source is a wireless number, and no CNAM data exists, API will return “Wireless Caller”. No 404 is returned
HTTP Request
GET https://cnam.tcpaas.com/getCnamWirelessRateCenter
POST Parameters
Parameter | Description |
---|---|
tn | The number. |
account_id | This is the user id get from the Login Protal |
account_secret | This is the account secret get from the Login Protal |
CNAM, Rate Center, Wireless Information and Third Party Data
Get CNAM or Wireless or Rate Center Or Third Party
curl -X POST
-H "Content-Type: application/json"
-d '{"tn": "1201000000","account_id":"211e65b23c16ce413227v", "account_secret": "111be13cfb6b9226596fa55d2d7d"}'
https://cnam.tcpaas.com/getCnamWirelessRateCenterThirdParty
Yields a response like:
{
"status":"200",
"statusDescription":"OK",
"data":"WIRELESS CALLER"
}
CNAM API will use third party data to source CNAM information in cases where no CNAM data exists. If no result is returned, API will return Rate Center/Wireless Caller information like rcw
HTTP Request
GET https://cnam.tcpaas.com/getCnamWirelessRateCenterThirdParty
POST Parameters
Parameter | Description |
---|---|
tn | The number. |
account_id | This is the user id get from the Login Protal |
account_secret | This is the account secret get from the Login Protal |
CNAM, Rate Center, Wireless Information and Spam Likely Data
Get CNAM or Wireless or Rate Center Or Spam Likely
curl -X POST
-H "Content-Type: application/json"
-d '{"tn": "1201000000","account_id":"211e65b23c16ce413227v", "account_secret": "111be13cfb6b9226596fa55d2d7d"}'
https://cnam.tcpaas.com/getCnamWirelessRateCenterSpamLikely
Yields a response like:
{
"status":"200",
"statusDescription":"OK",
"data":"SPAM LIKELY"
}
CNAM API will return SPAM LIKELY when number has a high spam score, otherwise it will return a CNAM record. If no result is returned, API will return Rate Center/Wireless Caller information like rcw
HTTP Request
GET https://cnam.tcpaas.com/getCnamWirelessRateCenterSpamLikely
POST Parameters
Parameter | Description |
---|---|
tn | The number. |
account_id | This is the user id get from the Login Protal |
account_secret | This is the account secret get from the Login Protal |
SMS
These routes allow you to send SMS and describe methods that inbound SMS and DLR are delivered to you. SMS is a different API and platform; for authentication use your Authorization Key as the password.
Sending an SMS
You can only send SMS from a number that is SMS enabled. Use the routes above to order numbers that are SMS enabled.
Send an SMS:
// Coming Soon. Feel free to email [email protected] if you need help deploying on node.js
curl -X POST
-H "Content-Type: application/json"
-d '{"from": "15556663333","to":"15557724300", "text": "Hello!", "dlrCallback": ""}'
https://smsapi.voycetel.com/sms/send?sessionId=<password>
Yields a response like:
{
"msgId":"7372256a-92a1-4f99-9d34-e40ab1d32eed",
"status":"ACCEPTED",
"error":"0"
}
Query Parameters
Parameter | Description |
---|---|
from | The source number to send the message with. This number must belong to your account or you will get an rejection response |
to | The destination number you wish to send messages to |
text | The text body of the message |
dlrCallback | URL where you want DLR confirmation to post |
DLR Capture
The dlrCallback URL you specify will receive a POST in a format like:
{
"msgId": "68c6b9a5-916a-4aae-b468-d79bf072b97f",
"from": "14045551212",
"to": "16305551454",
"dlrStatus": "Delivered",
"dlrError": "0"
}
The dlrCallback you set above will receive a POST request describing the final disposition of an outbound text.
A Node.js implementation of a service to capture these DLRs can be found here
POST Parameters
Parameter | Description |
---|---|
msgId | Message ID |
from | Your phone number that sent the message |
to | The destination number that you sent the text to |
dlrStatus | Indicates if the messages was successfully delivered or was rejected by the public messaging network. Values are Delivered and Undelivered |
dlrError |
The 3 digit network error code to identify the reason for the
message not being delivered. 110 – Destination unreachable or invalid destination 112 – Blocked due to Spam filtering 100 – Destination Network Rejection |
Receiving an SMS
The SMS Orig URL you configure for the number will receive a POST in a format like:
{
"msgId":"78d6b9a5-916a-4aae-b468-d79bf072b9f1",
"from": "14045551212",
"to": "16305551454",
"text": "Hello there!"
}
You can only send SMS from a number that is SMS enabled. Use the routes above to order numbers that are SMS enabled.
A Node.js implementation of a service to capture these DLRs can be found here
POST Parameters
Parameter | Description |
---|---|
msgId | Message ID |
from | The source number that sent the message to your number in NANPA format |
to | Your phone number that received the message |
text | The text body of the message |
Errors
The CNAM API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request – Your request is malformed |
401 | Unauthorized – Your authentication failed. |
403 | Forbidden – Your company doesn’t have access to requested resources. |
404 | Not Found – The specified route doesn’t exist. |
405 | Method Not Allowed – You tried to access a route with an invalid method |
406 | Not Acceptable – You requested a format that isn’t json |
410 | Gone – The resource requested was removed from our servers |
429 | Too Many Requests – You’re requesting way too much, or way too fast. Are you trying to DDoS us? |
500 | Internal Server Error – Problem’s on our end. We’re working on it! |
503 | Service Unavailable – We’re temporarily offline for maintenance. Please try again later. |