Creating a Number

When creating a Source or Session Tracker, you are given the opportunity to describe what kind of phone number(s) you would like to use for the tracker.

At least one parameter must be provided to obtain number(s).

The options you can provide are as follows:

Name Type Description
area_code string The phone number should be located in the provided area code.
Example: “303”
local string The phone number should be “local” to another phone number (for example, your main business number).
_Example: “+13035554789”
toll_free boolean If true, the phone number should be toll free.

Examples:

Request a phone number local to a given business phone number.

This is the most common use case for local numbers. CallRail will attempt to obtain a phone number in the same area code as the provided number. If no inventory is available in that area code, the search will fall back to other local area codes when available.

{
  "local": "+14045558769"
}

Request a phone number local to a given business phone number, but require in the 404 area code.

A number in the same area code is required in this example. If no inventory is available in 404, the Tracker will not be created and an error will be returned.

{
  "area_code": "404",
  "local":     "+14045558769"
}

Request any phone number in the 303 area code.

{
  "area_code": "303"
}

Request a toll free number in any area code.

This is the most common use case for toll free numbers. This may be an 888, 877, 866, or 855 number. CallRail will prefer area codes in that order.

{
  "toll_free": true
}

Request a toll free number in the 888 area code.

A number in the 888 area code is required in this example. If no 888 numbers are available, the Tracker will not be created and an error will be returned.

{
  "area_code": "888",
  "toll_free": true
}