Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM

On this page
Looking for more inspiration?Visit the

Marketplace Add-on Trestle Tutorial


This tutorial shows how to install and use the Trestle Reverse Phone Marketplace Add-on, which returns ownership, carrier, and address data for a phone number through the Twilio Lookup API. For more detailed instructions on installing and configuring an Add-on listing, see the Marketplace listings usage guide.


Install an add-on listing

install-an-add-on-listing page anchor

Install and enable Add-on listings through the Twilio Console. Once installed, they enhance specific Twilio APIs, such as Twilio Voice and Programmable Messaging. The Trestle Reverse Phone Add-on extracts information about a phone number's current owner.

To install the Trestle Reverse Phone Add-on, follow these steps:

  1. Go to the Marketplace Catalog in Twilio Console(link takes you to an external page).
  2. Select Trestle Reverse Phone from the catalog.
  3. Click Install.
  4. Under the Configure tab, check the Lookups box.
  5. View all installed Marketplace Add-ons by clicking on Marketplace > Installed.

Use the Trestle Reverse Phone Add-on listing

use-the-trestle-reverse-phone-add-on-listing page anchor

With the Trestle Reverse Phone Add-on enabled for Lookup, use the Twilio Lookup API to get data about a target phone number. Replace my_trestle_addon with the value from the UNIQUE NAME field on the Configure tab in the following code example:

Look up a phone number with the Trestle Reverse Phone Add-onLink to code sample: Look up a phone number with the Trestle Reverse Phone Add-on
1
curl -X GET "https://lookups.twilio.com/v1/PhoneNumbers/%2B14155551212?AddOns=my_trestle_addon" \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Example response:

Trestle Reverse Phone Add-on response

trestle-reverse-phone-add-on-response page anchor
1
{
2
"code": null,
3
"message": null,
4
"results": {
5
"trestle_caller_id": {
6
"code": null,
7
"message": null,
8
"request_sid": "XRc1479687aadf64c62e6ab2b6e0077a1a",
9
"result": {
10
"phone_number": "2069735100",
11
"is_valid": true,
12
"country_calling_code": "1",
13
"line_type": "NonFixedVOIP",
14
"carrier": "tw telecom",
15
"is_prepaid": false,
16
"is_commercial": true,
17
"belongs_to": [
18
{
19
"name": "Trestle Solutions Inc.",
20
"age_range": null,
21
"gender": null
22
}
23
],
24
"current_addresses": [
25
{
26
"street_line_1": "12819 SE 38TH ST # 263",
27
"street_line_2": "",
28
"city": "Bellevue",
29
"postal_code": "98006",
30
"zip4": "1326",
31
"state_code": "WA",
32
"country_code": "US",
33
"lat_long": {
34
"latitude": 47.608624,
35
"longitude": -122.334442,
36
"accuracy": "RoofTop"
37
},
38
"is_active": true,
39
"delivery_point": "MultiUnit"
40
}
41
],
42
"associated_people": [],
43
"alternate_phones": [
44
"8003361327"
45
],
46
"warnings": []
47
}
48
},
49
"status": "successful"
50
}
51
}

The JSON response provides basic information about the queried phone number. Depending on the type of phone number found, different subsets of information may be returned. These results are organized into a structured format. More information on all potential return values and keys can be found on the Documentation tab of the listing's details page.

For more information on using Marketplace Add-ons, refer to the How to use Add-on Listings Guide.