Phone Numbers
The tracking phone numbers in your Trackdrive account.
GET /phone_numbers
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/phone_numbers
List your phone numbers
List the phone numbers rented in your account, with filters, or request the CSV format for bulk export. Administrators can pass all_companies to list numbers across every company.
Supported Formats
json, csvParams
| Param name | Description | ||||||
|---|---|---|---|---|---|---|---|
|
serializer Optional Blank value allowed |
This endpoint supports multiple response formats. Pass
|
||||||
|
number Optional |
The phone number.
|
||||||
|
offer_id Optional |
Refer to the offer api for details
|
||||||
|
traffic_source_id Optional |
Refer to the traffic source api for details
|
||||||
|
provider_configuration_id Optional |
Refer to the provider api for details
|
||||||
|
ring_pool_id Optional |
Refer to the Number Pool api for details
|
||||||
|
last_call_at_to Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
||||||
|
last_call_at_from Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
||||||
|
page Optional |
Return the next page of results.
|
||||||
|
per_page Optional |
How many results to return per page. The default is 25.
|
||||||
|
created_at_to Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
||||||
|
created_at_from Optional |
Date formatted like 2016-01-01 12:25:15 -0500
|
||||||
|
fulltext Optional |
Search for any record that matches this text
|
||||||
|
time_zone Optional |
Date ranges will be parsed using this time zone.
|
||||||
|
columns Optional |
Specify the columns you would like returned by the API for a given resource.
Limiting the columns can significantly increase API response time since only the requested data will be processed.
columns=uuid,number,created_at
Must be any combination of:
|
||||||
|
root Optional |
Pass
|
POST /phone_numbers
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/phone_numbers
Purchase a phone number
Purchase a new phone number using one of your existing provider configurations.
Params
| Param name | Description | ||||||
|---|---|---|---|---|---|---|---|
|
serializer Optional Blank value allowed |
This endpoint supports multiple response formats. Pass
|
||||||
|
forward_type Optional Blank value allowed |
Forward Type - Should the number forward to an Offer or a Buyer
|
||||||
|
buyer_id Optional Blank value allowed |
The buyer calls forward to when
|
||||||
|
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.
|
||||||
|
country Required |
The country where the number will be purchased.
|
||||||
|
requested_number Optional Blank value allowed |
The phone number you wish to purchase from /api/v1/phone_numbers/search
|
||||||
|
traffic_source_id Optional Blank value allowed |
Refer to the traffic source api for details
|
||||||
|
ring_pool_id Optional Blank value allowed |
Refer to the Number Pool api for details
|
||||||
|
traffic_source_override_lead_traffic_source Optional Blank value allowed |
Force Calls to Credit This Traffic Source and Extra Tokens, even if Lead Traffic Source or Data is Different
|
||||||
|
record_token_additional_list Optional Blank value allowed |
Assign additional tokens that will be applied to leads and calls by passing a comma separated string of key:value pairs.
|
GET /phone_numbers/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/phone_numbers/:id
Show the details of phone number
Get the full configuration details of a single phone number. The id can be either the internal Trackdrive id or the full phone number prefixed with '+'.
Params
| Param name | Description | ||||||
|---|---|---|---|---|---|---|---|
|
serializer Optional Blank value allowed |
This endpoint supports multiple response formats. Pass
|
||||||
|
id Optional |
This can be either the internal trackdrive id or the full phone number beginning with ‘+’
|
PUT /phone_numbers/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/phone_numbers/:id
Update a phone number's source or pool
Update a phone number's assigned traffic source, offer, buyer, or number pool, and other routing settings. Trackdrive Clean Phone Numbers (TDPN) cannot be edited through this endpoint.
Params
| Param name | Description | ||||||
|---|---|---|---|---|---|---|---|
|
serializer Optional Blank value allowed |
This endpoint supports multiple response formats. Pass
|
||||||
|
id Optional |
This can be either the internal trackdrive id or the full phone number beginning with ‘+’
|
||||||
|
description Optional Blank value allowed |
A note that identifies the number in your account.
|
||||||
|
forward_type Optional Blank value allowed |
Forward Type - Should the number forward to an Offer or a Buyer
|
||||||
|
buyer_id Optional Blank value allowed |
The buyer calls forward to when
|
||||||
|
offer_id Optional Blank value allowed |
Refer to the offer api for details
|
||||||
|
traffic_source_id Optional Blank value allowed |
Refer to the traffic source api for details
|
||||||
|
ring_pool_id Optional Blank value allowed |
Refer to the Number Pool api for details
|
||||||
|
traffic_source_override_lead_traffic_source Optional Blank value allowed |
Force Calls to Credit This Traffic Source and Extra Tokens, even if Lead Traffic Source or Data is Different
|
||||||
|
record_token_additional_list Optional Blank value allowed |
Assign additional tokens that will be applied to leads and calls by passing a comma separated string of key:value pairs.
|
||||||
|
paused Optional |
Pause or unpause.
|
||||||
|
use_with_key_press_flows Optional Blank value allowed |
Apply a key press flow group to calls on this number.
|
||||||
|
key_press_flow_group_id Optional Blank value allowed |
The key press flow group applied when
|
||||||
|
lead_match_sort_order Optional Blank value allowed |
Which leads to search first when matching an inbound caller to an existing lead.
|
||||||
|
delete_prevention Optional Blank value allowed |
When true, the number cannot be deleted until deletion prevention is turned off.
|
DELETE /phone_numbers/:id
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/phone_numbers/:id
Unrent a phone number.
Release (unrent) a phone number from your account, stopping any further billing for it. This fails if the number is still in use somewhere that prevents deletion.
Params
| Param name | Description | ||||||
|---|---|---|---|---|---|---|---|
|
serializer Optional Blank value allowed |
This endpoint supports multiple response formats. Pass
|
||||||
|
id Optional |
This can be either the internal trackdrive id or the full phone number beginning with ‘+’
|
GET /phone_numbers/search
Authorization Requiredhttps://[your-subdomain].trackdrive.com/api/v1/phone_numbers/search
Search available phone numbers for purchase
Returns a list of available phone numbers for sale. Can be used with POST /api/v1/phone_numbers?requested_number= to purchase a number.
Params
| Param name | Description |
|---|---|
|
country Optional |
Two-letter country code (default: US)
|
|
toll_free Optional |
Whether to search toll-free numbers
|
|
prefix Optional |
Restrict by area code (NPA). Example: 415, 209, 719
|
|
query Optional |
Full or partial phone number to match
|