Skip to content
V2 (Legacy) API ReferenceGet started

List phone numbers (deprecated)

Deprecated
phonenumbers.list() -> PhonenumberListResponse
GET/v3/phonenumbers

Deprecated. Use GET /v3/phone_numbers instead.

ReturnsExpand Collapse
class PhonenumberListResponse:
phone_numbers: List[PhoneNumber]

List of phone numbers assigned to the partner

id: str

Unique identifier for the phone number

formatuuid
phone_number: str

Phone number in E.164 format

capabilities: Optional[PhoneNumberCapabilities]
mms: bool

Whether MMS messaging is supported

sms: bool

Whether SMS messaging is supported

voice: bool

Whether voice calls are supported

country_code: Optional[str]

Deprecated. Always null.

type: Optional[str]

Deprecated. Always null.

List phone numbers (deprecated)

import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
phonenumbers = client.phonenumbers.list()
print(phonenumbers.phone_numbers)
{
  "phone_numbers": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "phone_number": "+12025551234",
      "capabilities": {
        "mms": true,
        "sms": true,
        "voice": false
      },
      "country_code": "US",
      "type": null
    }
  ]
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}
Returns Examples
{
  "phone_numbers": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "phone_number": "+12025551234",
      "capabilities": {
        "mms": true,
        "sms": true,
        "voice": false
      },
      "country_code": "US",
      "type": null
    }
  ]
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}