{"__v":2,"_id":"5450f6397abbbc0800a5eb28","category":{"__v":1,"_id":"5450f39ea66f020800dba989","pages":["5450f6397abbbc0800a5eb28"],"project":"542dbe0ecb19820800c1f4d7","version":"542ecc0a6b0eb6080066ca77","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-29T14:03:10.289Z","from_sync":false,"order":16,"slug":"available-phone-numbers","title":"Available Phone Numbers"},"editedParams":true,"editedParams2":true,"is_link":false,"parentDoc":null,"project":"542dbe0ecb19820800c1f4d7","user":"544a586d27b7fc140078db12","version":{"__v":29,"_id":"542ecc0a6b0eb6080066ca77","forked_from":"542dbe0fcb19820800c1f4da","project":"542dbe0ecb19820800c1f4d7","createdAt":"2014-10-03T16:17:14.165Z","releaseDate":"2014-10-03T16:17:14.165Z","categories":["542ecc0a6b0eb6080066ca78","542ef44f6b0eb6080066cb24","543bf3e22a30961a00b66eb3","5446952b82bd7e08002768a0","544821ae8d7af31a00dd41ce","544a7885f1aefa08006efc69","544c758e11845f0e001ed8de","544e5565b80812080035be55","544e558dbd51b9080037f8ca","5450b045a66f020800dba73d","5450eb6aa66f020800dba945","5450f39ea66f020800dba989","5450f877a66f020800dba9cf","54510356a66f020800dbaa17","5451274514af501a00b50c99","54513345a66f020800dbab24","54513cc014af501a00b50d24","54515eec14af501a00b50db9","54519b1d14af501a00b50ea9","54519b2aa66f020800dbacb4","54524f9704160008005b1d27","54538d2308d1800800473d95","54538d420c09721000a06a03","54538e5608d1800800473d9a","5453ea9547c30114004fb375","5453eb12b077c31c00067bcb","5453eb27b077c31c00067bcd","5453ed5db077c31c00067bde","548075cbe291c51a00e7e096"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"updates":["585dca5d9433960f009680fc"],"next":{"pages":[],"description":""},"createdAt":"2014-10-29T14:14:17.981Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"basic_auth":true,"method":"get","results":{"codes":[{"name":"","code":"{\n  \"first_page_uri\": \"/v2/Accounts/{AccountSid}/AvailablePhoneNumbers/US/Local.json?Page=0&PageSize=50\",\n  \"end\": 49,\n  \"total\": 487,\n  \"previous_page_uri\": \"\",\n  \"num_pages\": 10,\n  \"uri\": \"/v2/Accounts/{AccountSid}/AvailablePhoneNumbers/US/Local.json\", \n  \"page_size\": 50,\n  \"start\": 0,\n  \"next_page_uri\": \"/v2/Accounts/{AccountSid}/AvailablePhoneNumbers/US/Local.json?Page=1&PageSize=50\",\n  \"last_page_uri\": \"/v2/Accounts/{AccountSid}/AvailablePhoneNumbers/US/Local.json?Page=9&PageSize=50\",\n  \"page\": 0,\n  \"available_phone_numbers\": [\n    {\n      \"phone_number\": \"{PhoneNumber}\",\n      \"unblock_support\": \"false\",\n      \"friendly_name\": \"{PhoneNumberFriendly}\",\n      \"iso_country\": \"US\",\n      \"monthly_cost\": \"1.00\",\n      \"voice_enabled\": \"true\",\n      \"country_code\": \"+1\",\n      \"setup_cost\": \"1.00\",\n      \"supports_forwarded_from\": \"false\",\n      \"type\": \"local\",\n      \"sms_enabled\": \"true\",\n      \"per_minute_cost\": \"1.00\"\n    },\n    {\n      \"phone_number\": \"{PhoneNumber}\",\n      \"unblock_support\": \"false\",\n      \"friendly_name\": \"{PhoneNumberFriendly}\",\n      \"iso_country\": \"US\",\n      \"monthly_cost\": \"1.00\",\n      \"voice_enabled\": \"true\",\n      \"country_code\": \"+49\",\n      \"supports_forwarded_from\": \"true\",\n      \"type\": \"local\",\n      \"sms_enabled\": \"false\",\n      \"per_minute_cost\": \"0.01\"\n    }\n  ]\n}","language":"json","status":200},{"name":"","code":"{\n    \"status\": 404,\n    \"message\": \"The requested resource was not found: /v2/Accounts/bad/bad_response.json\"\n}","language":"json","status":404}]},"try":true,"auth":"required","params":[{"_id":"5450fd5b7abbbc0800a5eb68","ref":"","in":"path","required":true,"desc":"Account SID.","default":"","type":"string","name":"AccountSid"},{"_id":"5450fd5b7abbbc0800a5eb67","ref":"","in":"path","required":true,"desc":"Two letter country code.","default":"US","type":"string","name":"Country"},{"_id":"5450fd5b7abbbc0800a5eb66","ref":"","in":"path","required":true,"desc":"Type of the phone number. Can be Local or Tollfree","default":"Local","type":"string","name":"Type"},{"_id":"5450f6397abbbc0800a5eb2e","ref":"","in":"query","required":false,"desc":"Used to return a particular page within the list.","default":"1","type":"string","name":"Page"},{"_id":"5450f6397abbbc0800a5eb2d","ref":"","in":"query","required":false,"desc":"Used to specify the amount of list items to return per page.","default":"50","type":"string","name":"PageSize"},{"_id":"5450f6397abbbc0800a5eb2c","ref":"","in":"query","required":false,"desc":"Specifies the desired characters contained within the available numbers to list.","default":"","type":"string","name":"Contains"},{"_id":"5450f6397abbbc0800a5eb2b","ref":"","in":"query","required":false,"desc":"Specifies the area code that the returned list of available numbers should be in. Only available for North American numbers","default":"","type":"string","name":"AreaCode"},{"_id":"5450f6397abbbc0800a5eb2a","ref":"","in":"query","required":false,"desc":"Specifies the desired region of the available numbers to be listed.","default":"","type":"string","name":"InRegion"},{"_id":"5450f6397abbbc0800a5eb29","ref":"","in":"query","required":false,"desc":"Specifies the desired postal code of the available numbers to be listed.","default":"","type":"string","name":"InPostalCode"}],"url":"/:version/Accounts/:AccountSid/AvailablePhoneNumbers/:Country/:Type.json"},"isReference":false,"order":0,"body":"If you want to add a new TelAPI number, you need to know what ones are available. Our REST API provides a way to request a list of available numbers along with all of their resource properties so you know the numbers you have to choose from.\n\nNote that individual AvailablePhoneNumber resources can not be requested. Requests only return a list of available resources based on the filtering parameters sent with the request.\n\n# **Response Parameters**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"friendly_name\",\n    \"0-1\": \"Domestic format version of the available phone number. (e.g. 1234567890 to (123)-456-7890).\",\n    \"1-0\": \"phone_number\",\n    \"1-1\": \"The E.164 format number of each available number.\",\n    \"2-0\": \"lata\",\n    \"2-1\": \"Local Access and Transportation Area of the available number. The LATA is determined by geographical region.\",\n    \"3-0\": \"rate_center\",\n    \"3-1\": \"The available phone numbers rate center.\",\n    \"4-0\": \"latitude\",\n    \"4-1\": \"The latitude of the available phone number.\",\n    \"5-0\": \"longitude\",\n    \"5-1\": \"The longitude of the available phone number.\",\n    \"6-0\": \"country_code\",\n    \"6-1\": \"Code used to identify the phone numbers geographic origin. Found at the beginning of the number.\",\n    \"7-0\": \"npa\",\n    \"7-1\": \"Numbering Plan Area of the available number. This is more commonly known as the area code.\",\n    \"8-0\": \"exchange\",\n    \"8-1\": \"Three digits following the NPA (area code) in the available number.\",\n    \"9-0\": \"city\",\n    \"9-1\": \"The available phone numbers city.\",\n    \"10-0\": \"region\",\n    \"10-1\": \"The region of the available phone number. Usually a two letter abbreviation.\",\n    \"11-0\": \"postal_code\",\n    \"11-1\": \"The postal code (also known as zip code) of the available number.\",\n    \"12-0\": \"iso_country\",\n    \"12-1\": \"Two letter country code of the available phone number.\",\n    \"13-0\": \"type\",\n    \"13-1\": \"Type of phone number (local or tollfree).\",\n    \"14-0\": \"setup_cost\",\n    \"14-1\": \"Cost of phone number setup.\",\n    \"15-0\": \"monthly_cost\",\n    \"15-1\": \"Cost of phone number per month.\",\n    \"16-0\": \"voice_enabled\",\n    \"17-0\": \"sms_enabled\",\n    \"16-1\": \"Is voice enabled for this phone number? Can be true or false.\",\n    \"17-1\": \"Is SMS enabled for this phone number? Can be true or false.\",\n    \"18-0\": \"supports_forwarded_from\",\n    \"18-1\": \"Does phone number support forwarded from? Can be true or false.\"\n  },\n  \"cols\": 2,\n  \"rows\": 19\n}\n[/block]\n# **Listing Response Parameters**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"first_page_uri\",\n    \"0-1\": \"URI for the first page of results.\",\n    \"1-0\": \"end\",\n    \"1-1\": \"Last result index.\",\n    \"2-0\": \"total\",\n    \"2-1\": \"Number of items.\",\n    \"3-0\": \"previous_page_uri\",\n    \"3-1\": \"URI for the previous page of results.\",\n    \"4-0\": \"num_pages\",\n    \"4-1\": \"Number of pages.\",\n    \"5-0\": \"uri\",\n    \"5-1\": \"The Uniform Resource Identifier to this resource.\",\n    \"6-0\": \"page_size\",\n    \"6-1\": \"Number of items on a single page.\",\n    \"7-0\": \"start\",\n    \"7-1\": \"Index of the first item on the current page.\",\n    \"8-0\": \"next_page_uri\",\n    \"8-1\": \"URI for the next page of the results.\",\n    \"9-0\": \"last_page_uri\",\n    \"9-1\": \"URI for the last page of the results.\",\n    \"10-0\": \"page\",\n    \"10-1\": \"Current page number.\",\n    \"11-0\": \"available_phone_numbers\",\n    \"11-1\": \"Array containing available phone numbers.\"\n  },\n  \"cols\": 2,\n  \"rows\": 12\n}\n[/block]\n# **Example cURL**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X GET -u '{AccountSid}:{AuthToken}' 'https://api.telapi.com/v2/Accounts/{AccountSid}/AvailablePhoneNumbers/US/Local.json?AreaCode=XXX'\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","excerpt":"shows information on all phone numbers available for purchasing","slug":"list-available-numbers","type":"endpoint","title":"List Available Numbers"}

getList Available Numbers

shows information on all phone numbers available for purchasing

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

AccountSid:
required
string
Account SID.
Country:
required
stringUS
Two letter country code.
Type:
required
stringLocal
Type of the phone number. Can be Local or Tollfree

Query Params

Page:
string1
Used to return a particular page within the list.
PageSize:
string50
Used to specify the amount of list items to return per page.
Contains:
string
Specifies the desired characters contained within the available numbers to list.
AreaCode:
string
Specifies the area code that the returned list of available numbers should be in. Only available for North American numbers
InRegion:
string
Specifies the desired region of the available numbers to be listed.
InPostalCode:
string
Specifies the desired postal code of the available numbers to be listed.

Result Format


Documentation

If you want to add a new TelAPI number, you need to know what ones are available. Our REST API provides a way to request a list of available numbers along with all of their resource properties so you know the numbers you have to choose from. Note that individual AvailablePhoneNumber resources can not be requested. Requests only return a list of available resources based on the filtering parameters sent with the request. # **Response Parameters** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "friendly_name", "0-1": "Domestic format version of the available phone number. (e.g. 1234567890 to (123)-456-7890).", "1-0": "phone_number", "1-1": "The E.164 format number of each available number.", "2-0": "lata", "2-1": "Local Access and Transportation Area of the available number. The LATA is determined by geographical region.", "3-0": "rate_center", "3-1": "The available phone numbers rate center.", "4-0": "latitude", "4-1": "The latitude of the available phone number.", "5-0": "longitude", "5-1": "The longitude of the available phone number.", "6-0": "country_code", "6-1": "Code used to identify the phone numbers geographic origin. Found at the beginning of the number.", "7-0": "npa", "7-1": "Numbering Plan Area of the available number. This is more commonly known as the area code.", "8-0": "exchange", "8-1": "Three digits following the NPA (area code) in the available number.", "9-0": "city", "9-1": "The available phone numbers city.", "10-0": "region", "10-1": "The region of the available phone number. Usually a two letter abbreviation.", "11-0": "postal_code", "11-1": "The postal code (also known as zip code) of the available number.", "12-0": "iso_country", "12-1": "Two letter country code of the available phone number.", "13-0": "type", "13-1": "Type of phone number (local or tollfree).", "14-0": "setup_cost", "14-1": "Cost of phone number setup.", "15-0": "monthly_cost", "15-1": "Cost of phone number per month.", "16-0": "voice_enabled", "17-0": "sms_enabled", "16-1": "Is voice enabled for this phone number? Can be true or false.", "17-1": "Is SMS enabled for this phone number? Can be true or false.", "18-0": "supports_forwarded_from", "18-1": "Does phone number support forwarded from? Can be true or false." }, "cols": 2, "rows": 19 } [/block] # **Listing Response Parameters** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "first_page_uri", "0-1": "URI for the first page of results.", "1-0": "end", "1-1": "Last result index.", "2-0": "total", "2-1": "Number of items.", "3-0": "previous_page_uri", "3-1": "URI for the previous page of results.", "4-0": "num_pages", "4-1": "Number of pages.", "5-0": "uri", "5-1": "The Uniform Resource Identifier to this resource.", "6-0": "page_size", "6-1": "Number of items on a single page.", "7-0": "start", "7-1": "Index of the first item on the current page.", "8-0": "next_page_uri", "8-1": "URI for the next page of the results.", "9-0": "last_page_uri", "9-1": "URI for the last page of the results.", "10-0": "page", "10-1": "Current page number.", "11-0": "available_phone_numbers", "11-1": "Array containing available phone numbers." }, "cols": 2, "rows": 12 } [/block] # **Example cURL** [block:code] { "codes": [ { "code": "curl -X GET -u '{AccountSid}:{AuthToken}' 'https://api.telapi.com/v2/Accounts/{AccountSid}/AvailablePhoneNumbers/US/Local.json?AreaCode=XXX'", "language": "shell" } ] } [/block]