Using an HTTP Request
GET/Lookup/:tn
Gets switchData
object with the request telephone number (tn). Requires an authorization header or IP Auth setup through the portal
Request
Path Parameters
tn ^[\d]{10}required
10 digit telephone number
Responses
200: Successful response
- application/json
400: Bad request with invalid/missing tn
- application/json
401: Unauthorized request
- application/json
Request samples
curl -L 'https://switchdata.telnyx.com/v1/Lookup/:tn' \
-H 'Accept: application/json'
Response samples
{
"tn": "string",
"ocn": "string",
"carrier_name": "string",
"mapped_svtype": "string",
"lata_id": "string",
"lata": "string",
"locality": "string",
"localitystate": "string",
"ratecenter": "string"
}
{
"error": "string"
}
{
"error": "string"
}