import plivo

client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.numbers.list(
    limit=5,
    offset=0,
    type='fixed', )
print(response)
HTTP Status Code: 200
{
  {
  "api_id": "114de006-1c95-11e4-8a4a-123140008edf",
  "meta": {
    "limit": 2,
    "next": "/v1/Account/MA2025RK4E639VJFZAGV/Number/?limit=3&offset=3",
    "offset": 0,
    "previous": null,
    "total_count": 20
  },
  "objects": [{
      "number": "18135401302",
      "alias": null,
      "sub_account": null,
      "added_on": "2022-08-05",
      "application": "/v1/Account/MA2025RK4E639VJFZAGV/Application/29986316244302815/",
      "carrier": "Plivo",
      "region": "Florida, UNITED STATES",
      "number_type": "local",
      "monthly_rental_rate": "0.80000",
      "renewal_date": "2023-05-10",
      "sms_enabled": true,
      "sms_rate": "0.00000",
      "voice_enabled": true,
      "voice_rate": "0.00850",
      "resource_uri": "/v1/Account/MA2025RK4E639VJFZAGV/Number/18135401302/",
      "tendlc_campaign_Id":"2FA_campaign",
      "tendlc_registration_status":"COMPLETED"
      "toll_free_sms_verification":null
    },
    {
      "number": "14153661106",
      "alias": "",
      "sub_account": null,
      "added_on": "2023-01-01",
      "application": "/v1/Account/MA2025RK4E639VJFZAGV/Application/16632559604105954/",
      "carrier": "Plivo",
      "region": "BELVEDERE, UNITED STATES",
      "number_type": "local",
      "monthly_rental_rate": "0.80000",
      "renewal_date": "2023-05-10",
      "sms_enabled": true,
      "sms_rate": "0.00000",
      "voice_enabled": true,
      "voice_rate": "0.00850",
      "resource_uri": "/v1/Account/MA2025RK4E639VJFZAGV/Number/14153661106/",
      "tendlc_campaign_Id":"Product_Marketing",
      "tendlc_registration_status":"COMPLETED",
      "toll_free_sms_verification":null
    }
  ]
}

Returns a list of phone numbers that you’ve rented from Plivo or or added from your carrier.

API Endpoint

GET
https://api.plivo.com/v1/Account/{auth_id}/Number/

Arguments

type
string

The type of number. You can filter by local, mobile, fixed, national, or tollfree numbers.

number_startswith
string

Only show phone numbers that begin with this pattern.

subaccount
string

Returns phone numbers associated with this subaccount.

alias
string

Returns phone numbers that exactly match this alias.

services
string

Filters phone numbers that provide the selected services. Possible values are:

  • voice: Indicates that phone numbers that can receive calls are to be returned.
  • sms: Indicates that phone numbers that can receive SMS messages are to be returned.
  • mms: Indicates that phone numbers that can receive MMS messages are to be returned.
  • voice,sms: Indicates that phone numbers that can receive both calls and SMS messages are to be returned.
  • voice,sms,mms: Indicates that phone numbers that can receive calls and SMS and MMS messages are to be returned.
cnam_lookup
string

Filters US phone numbers by their CNAM lookup configuration status. Valid values are enabled and disabled.

renewal_date
string

Filters phone numbers by their renewal date. Format: YYYY-MM-DD. The filter can be used in these five forms:

  • renewal_date: To get all numbers renewed on 2023-05-10, use renewal_date=2023-05-10.
  • renewal_date__gt: gt stands for greater than. To get all numbers renewed after 2023-05-10, use renewal_date__gt=2023-05-10.
  • renewal_date__gte: gte stands for greater than or equal to. To get all numbers renewed on or after 2023-05-10, use renewal_date__gte=2023-05-10.
  • renewal_date__lt: lt stands for less than. To get all numbers renewed before 2023-05-10, use renewal_date__lt=2023-05-10.
  • renewal_date__lte: lte stands for less than or equal to. To get all numbers renewed on or before 2023-05-10, use renewal_date__lte=2023-05-10.​​​

Note:

  • You can combine these filters to get numbers that are renewed in a particular date range.
tendlc_registration_status
string

The 10DLC registration status of US local numbers. Valid values:

  • unregistered: returns a list of numbers that are not linked to a campaign.
  • in_progress: returns a list of numbers that are in the process of being linked to campaigns.
  • registered: returns a list of numbers that are linked to campaigns.
tendlc_campaign_id
string

10DLC campaign ID that the phone number is linked to. You can filter US local numbers that are linked to a specific campaign.

toll_free_sms_verification
string

SMS verification status for SMS-enabled US/Canada toll-free numbers. Valid values:

  • unverified: returns a list of SMS-enabled US/CA toll-free numbers that are not verified.
  • pending_verification: returns a list of SMS-enabled US/CA toll-free numbers that are pending verification.
  • verified: returns a list of SMS-enabled US/CA toll-free numbers that are verified for enhanced outbound SMS limits.
limit
integer

Denotes the number of results to display per page. The maximum number of results that can be fetched is 20. Defaults to 20.

offset
integer

Denotes the number of value items by which the results should be offset. Defaults to 0. Read more about offset-based pagination.

import plivo

client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.numbers.list(
    limit=5,
    offset=0,
    type='fixed', )
print(response)
HTTP Status Code: 200
{
  {
  "api_id": "114de006-1c95-11e4-8a4a-123140008edf",
  "meta": {
    "limit": 2,
    "next": "/v1/Account/MA2025RK4E639VJFZAGV/Number/?limit=3&offset=3",
    "offset": 0,
    "previous": null,
    "total_count": 20
  },
  "objects": [{
      "number": "18135401302",
      "alias": null,
      "sub_account": null,
      "added_on": "2022-08-05",
      "application": "/v1/Account/MA2025RK4E639VJFZAGV/Application/29986316244302815/",
      "carrier": "Plivo",
      "region": "Florida, UNITED STATES",
      "number_type": "local",
      "monthly_rental_rate": "0.80000",
      "renewal_date": "2023-05-10",
      "sms_enabled": true,
      "sms_rate": "0.00000",
      "voice_enabled": true,
      "voice_rate": "0.00850",
      "resource_uri": "/v1/Account/MA2025RK4E639VJFZAGV/Number/18135401302/",
      "tendlc_campaign_Id":"2FA_campaign",
      "tendlc_registration_status":"COMPLETED"
      "toll_free_sms_verification":null
    },
    {
      "number": "14153661106",
      "alias": "",
      "sub_account": null,
      "added_on": "2023-01-01",
      "application": "/v1/Account/MA2025RK4E639VJFZAGV/Application/16632559604105954/",
      "carrier": "Plivo",
      "region": "BELVEDERE, UNITED STATES",
      "number_type": "local",
      "monthly_rental_rate": "0.80000",
      "renewal_date": "2023-05-10",
      "sms_enabled": true,
      "sms_rate": "0.00000",
      "voice_enabled": true,
      "voice_rate": "0.00850",
      "resource_uri": "/v1/Account/MA2025RK4E639VJFZAGV/Number/14153661106/",
      "tendlc_campaign_Id":"Product_Marketing",
      "tendlc_registration_status":"COMPLETED",
      "toll_free_sms_verification":null
    }
  ]
}