Want to provide feedback?

Write to docs@telesign.com.

List Your Leased Numbers

After you lease numbers from TeleSign, you may want to review all their details. Use this method to retrieve a list containing all the phone numbers you have leased.

Reference Page

GET /leases

Request
application/x-www-form-urlencoded
GET /v1/phone_numbers/leases?page=1&page_size=2 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Authorization: Basic pPF9MAXw9ssP0rkk8sbWf18Fny5Vgqi4F1owcHADr8LXk8PMWIvWqeg419NNXmBtMkaTJi3U5IOhOrNOY1ZXdBv3pLZxn08Rah8mMTGv623wYqmmNRcI5adDVnYbm1ejt2E4JCiMmOFahwcNcy844cpz8dTEWMVo1XthlYf=
Host: rest-ww.telesign.com
Response
application/json
{
  "pagination": {
    "page": 1,
    "total_pages": 1,
    "page_size": 2
  },
  "data": [
    {
      "phone_number": "12133202170",
      "recurring_price": 0.8,
      "number_type": "local",
      "setup_price": 0.8,
      "price_currency": "USD",
      "country_iso2": "US",
      "lease": {
        "lease_id": 3914,
        "created_on_utc": "2019-10-21T17:37:01.260000Z",
        "expires_on_utc": null
      },
      "capabilities": {
        "sms": true,
        "voice": true
      },
      "recurrence_period": 1
    },
    {
      "phone_number": "18006481111",
      "recurring_price": 0.7,
      "number_type": "toll-free",
      "setup_price": 0.7,
      "price_currency": "USD",
      "country_iso2": "US",
      "lease": {
        "lease_id": 3915,
        "created_on_utc": "2019-10-21T17:37:01.260000Z",
        "expires_on_utc": null
      },
      "capabilities": {
        "sms": true,
        "voice": true
      },
      "recurrence_period": 1
    }
  ]
}

Try It

If you have been granted access and credentials for the Phone Numbers API, you can try a test request in the API Explorer below to see how retrieving a list of leased numbers works. You can also get a code snippet for the request.

  1. Click the Auth tab and for Username add your customer ID. For Password add your API key.
  2. Click Send.
  3. Click the Code Generation tab and use the Language and Library menus to choose the language you want your code snippet in.
NOTE:

Create at least one lease before trying out this feature, otherwise nothing is returned!

Phone Numbers API Explorer
NOTE: The response time shown is not indicative of regular transmission rates, and only applies to the Phone Numbers API Explorer.
Send requests directly from the browser (CORS must be enabled)
$$.env
No $$.env variables are being used in this request.

Next Steps

Check out some other related pages:

  • Create a Lease - Learn how to use the Phone Numbers API to lease a specified phone number.
  • Cancel a Lease - Learn how to use the Phone Numbers API to cancel the lease of a specified phone number.