We use cookies to give you the best possible experience while you browse through our site. By continuing to use our website you implicitly agree to the usage of cookies on this site.

Read More

MCL API

This document provides in-depth instructions retrieving carrier information with Tychron's Messaging Carrier Lookup (MCL) API. Manage your messaging traffic more effectively and with precision. Build a better messaging strategy today with MCL.

Authorization

Please use your API Key's HTTP Token for authorization.

Restrictions

Please note that dips for Canadian numbers are restricted and require additional permissions. Please contact (support@tychron.com) for additional information.

Supported Output Types

The MCL API only supports JSON as an output type. Please see the examples below.

Request Endpoint

GET /api/v1/messaging_carrier/:number HTTP/1.1
Host: api.atlas.tychron.online

Request Path Parameters

Parameters marked with * are mandatory in all requests.

ParameterTypeDefaultDescription
number *String An 11 digit, valid North American Numbering Plan (NANP) number.

Request Headers

Parameters marked with * are mandatory in all requests.

HeaderDefaultDescriptionExample
Acceptapplication/jsonDetermines what output format should be returned on the response. Currently only application/json is supported.
Accept: application/json
Authorization * Authorization: Bearer KEYPlease use your API Key's HTTP Token for authorization.
Authorization: Bearer Rb2VRMSsm0VxHOIcniw6hCJhUqRExQk2

Request Format

GET /api/messaging_carrier/:number?output=text|json HTTP/1.1
Host: api.atlas.tychron.online
Accept: application/json
Authorization: Bearer YOUR_API_KEY_HERE

Response Codes

CodeDescriptionSolutions
200 OKThe request was successful and should contain the requested data. 
400 Bad RequestThe payload body of the request is malformed or the request contains invalid parameters.Check your JSON payload for invalid or missing parameters, or run it through a JSON linter.
401 UnauthorizedThe request may be deemed unauthorized due to a number of factors.
  • The Authorization header is not set.
  • The provided API HTTP token is invalid, expired, or not active.
  • The requesting account may be unauthorized from making requests.
This error typically results from using an incorrect API token in requests. Check your API token for typos.

If the error persists, please contact support. (support@tychron.com)
402 Payment Required Your account has either an insufficient balance or you have exceeded your credit limit in the request.
Please contact (support@tychron.com) to purchase more credits.
403 ForbiddenThe user is not permitted to make the specified request(s). This error currently only applies to Canadian dips, as additional permissions are required for Canadian numbers.
If you require Canadian dips, please contact (support@tychron.com) for additional details.
415 Unsupported Media TypeThe content-type used to make the request is not supported.This endpoint only requires a GET request with query parameters. Please remove the Content-Type header from your request.
422 Unprocessable EntityThe parameters of the request body failed validation or contain invalid values.The response body will contain specific details for the request failure. Correct the request parameters based on these details.
500 Internal Server ErrorThe request has not been fulfilled due to a server error.
Please report this error and contact support for further assistance. (support@tychron.com)

Response Headers

NameDescriptionExample
X-Request-ID An ID used to identify the HTTP request.
X-Request-ID: wGvPFqerkrPGm3T0
X-CDR-IDAn ID used to identify the CDR (Call Detail Record) generated by the request. Please provide this ID for any billing questions when contacting support.
X-CDR-ID: 01EYVS5A5G7MAJVM25VWZCYKVY

Response Format

JSON

HTTP/1.1 200 OK
Content-Type: application/json
X-CDR-ID: AN_ID
{
  "data": {
    "number": "12003004000",
    "messaging": {
      "enabled": true,
      "provider": "Provider Name",
      "country": "Country",
      "country_code": "ISO-code",
      "reference_id": "us_acme"
    }
  }
}

Text

HTTP/1.1 200 OK
Content-Type: text/plain
true ACME Corp

Response Parameters

Parameters marked with * are mandatory in all queries.

ParameterTypeDescription
Root
data * Data A top-level map containing dip data.
errors * List<Error>A top-level map containing any request errors.
Data
number * StringThe number used in the request.
messaging *MessagingThe messaging data which contains carrier information.
Messaging
enabled *BooleanDenotes whether the queried number is capable of Messaging.
provider *StringThe name of the messaging provider of the queried number if Messaging enabled, or the just the voice provider if the number is not messaging enabled.
country *StringThe origin country of the queried number's provider.
country_code *StringThe ISO country code of the queried number's provider.
reference_idStringTychron issued internal ID that groups the Service Provider.

cURL Examples

JSON

curl \
  -H "Authorization: Bearer KEY" \
  https://api.atlas.tychron.online/api/v1/messaging_carrier/12003004000
{"data":{"messaging":{"country":"Country","country_code":"ISO","enabled":true,"provider":"ACME Corp","reference_id":"us_acme"},"number":"12003004000"},"errors":[]}

Text

curl \
  -H "Authorization: Bearer KEY" \
  https://api.atlas.tychron.online/api/v1/messaging_carrier/12003004000?output=text
true ACME Corp