Supported Formats

json

Examples

curl -H "Content-Type: application/json" -X POST -d '{provider_configuration_id: 150, offer_id: 100, toll_free: true, country: 'US'}' https://[your-subdomain].trackdrive.net/api/v1/phone_numbers.json?auth_token=[your-auth-token]

Response Example

{
  "status" : 200,
  "errors" : {},
  "number" : {
    "id" : 14812358,
    "created_at" : "2019-01-31T15:27:24.127+00:00",
    "updated_at" : "2019-01-31T15:27:24.127+00:00",
    "user_updated_at" : "2019-01-31T15:27:24.128+00:00",
    "name" : "+18443109569",
    "number" : "+18443109569",
    "offer_id" : 10007440,
    "traffic_source_id" : null,
    "provider_configuration_id" : 3686,
    "ring_pool_id" : 10002031,
    "provider_auth_key" : null,
    "last_call_at" : "2019-08-11T20:58:00.000+00:00",
    "token_values" : [],
    "country" : "US",
    "area_code_id" : null,
    "optimizer_displayed_at" : null,
    "optimizer_tokens_changed_at" : "292f281e3750a27a79816f94adf9de41",
    "plain_number" : "+18443109569",
    "extension" : null,
    "checksum" : "94af29dd77247e821229bad84f05504b",
    "human_number" : "(844) 310-9569"
  },
  "metadata" : {
    "root" : "number"
  }
}

Params

Param name
Description
auth_token
optional

Authorize requests using your token. Get it from your profile: trackdrive.net/profile/edit

  • Must be String

provider_configuration_id
required

Refer to the provider api for details

offer_id
required

Refer to the offer api for details

toll_free
required

Purchase a toll-free or local number? true for toll-free, false for local number.

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

country
required

The country where the number will be purchased.

  • Must be one of: AR, AT, AU, BE, BG, BH, BR, CA, CH, CL, CN, CO, CY, CZ, DE, DK, DO, EE, ES, FI, FR, GB, GE, GR, HK, HR, HU, ID, IE, IL, IT, JP, KR, LT, LU, LV, MT, MX, MY, NL, NO, NZ, PA, PE, PH, PK, PL, PR, PT, RO, RU, SE, SG, SI, SK, SV, TR, US, ZA.

traffic_source_id
optional , nil allowed

Refer to the traffic source api for details

ring_pool_id
optional , nil allowed

Refer to the Number Pool api for details

token_values
optional , nil allowed

Inbound calls will be tagged with these Extra Tokens.

  • Must be a valid list of filters. Example filters:
    ["interest:auto", "loan_amount:>=10000", "loan_amount:<=50000", "geo:!=800", "caller_id:!=anonymous"]