Telnyx CNAM Endpoint
Telnyx Sales avatar
Written by Telnyx Sales
Updated over a week ago

This article is for API V1, please use the Developer Center for API V2 guides.

Telnyx CNAM Endpoint

See API Docs (Data API: caller-information endpoint)

http(s)://data.telnyx.com/cnam/v1/caller-information?tn=[tn]

tn: 10-11 digit phone number in NPANXXXXXX format with or without a leading “1”.

Example JSON call with CNAM:

Example cURL:

curl -X GET -H "Content-Type: application/json" -H "Authorization: Token [your_token_here]" "https://data.telnyx.com/cnam/v1/caller-information?tn=17736977338"

Headers

Content-Type: application/json

Accept: application/json

Sample Response

{
 "callerInformation":"TOLL FREE CALL",
 }

Authentication

Currently, the CNAM API supports two modes of authentication:

  1. IP Authentication (whitelisting)

  2. API Token

IP Authentication

When an endpoint is configured in the Telephone Data Endpoints section - https://portal.telnyx.com/#/app/telephone-data with IP Authentication that IP becomes whitelisted for access to the CNAM endpoint and the call can be made as-is

API Token Authentication

This authentication method requires adding an ‘Authorization’ header to your request of the following format:

‘Authorization’: ‘Token [token]’ where [token] is the API Token chosen in the Telephone Data Endpoint definition.

Exceptional responses

Number not found

Request:

Response:

404 - Not Found

{"reason":"No information for that number could be found"}

Invalid Number

Request:

Response:

406 - Not Acceptable

{"reason":"Telephone number not formatted to E.164 format"}

Unauthorized Access

Request:

Response:

401 - Unauthorized

Setup Telephone Data Profile in Mission Control

Go to Telephone Data page (see navigation menu on left)

Click "Add Data Profile" (see button on right side of screen)

Input the information and click "ADD"

Note: There are two authentication methods available - IP & API Token. If you are using IP authentication, make sure you create a connection beforehand and add the appropriate IP(s). If you are using API Token, you will need to create an API Token first.

 Connections can be created on the Connections page and API Tokens can be generated via the API Tokens page.

You should be all set.

Here is a video tutorial showing how to use CNAM endpoint

Can't find what you're looking for? Click the chat bubble at your lower right-hand corner and start a chat!

Did this answer your question?