> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # List E911 addresses GET https://%7BYour_Space_Name%7D.signalwire.com/api/relay/rest/addresses Lists the physical E911 service addresses stored in your SignalWire project. An E911 address represents the real-world location emergency services should receive for a phone number; create and validate one before assigning it to that number. Resource addresses and SIP Addresses are callable routing handles, not emergency locations. Results are sorted by creation date, most recent first. #### Permissions The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Numbers_. [Learn more about API scopes](/docs/platform/your-signalwire-api-space). Reference: https://signalwire.com/docs/apis/rest/e-911-addresses/list-addresses ## Authentication - `Authorization` header (basic auth, required) — SignalWire Basic Authentication using Project ID and API Token. The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password. Example: ``` Authorization: Basic base64(project_id:token) ``` ## Request ### Query parameters - `filter_label` (string, optional) — Filter addresses by label (partial match). - `page_number` (integer, optional, default: 0) — The page number to retrieve (0-indexed). - `page_size` (integer, optional, default: 50) — The number of items per page (1-1000). - `page_token` (string, optional) — Token for cursor-based pagination. Required when page_number > 0. ## Response ### 200 The request has succeeded. - `links` (PaginationLinks, required) — Pagination links. - `data` (list of Address, required) — List of addresses. ## Errors ### 401 Unauthorized Error Access is unauthorized. - `error` (enum, required) - Allowed values: `Unauthorized` ### 422 Unprocessable Entity Error The request failed validation. See errors for details. - `errors` (list of Types.StatusCodes.SpaceApiErrorItem, required) — List of validation errors. ### 500 Internal Server Error An internal server error occurred. - `error` (enum, required) - Allowed values: `Internal Server Error` ## Types ### PaginationLinks Pagination links for list responses. - `self` (string, required) — Link to the current page. - `first` (string, required) — Link to the first page. - `next` (string, optional) — Link to the next page. Only present when there are more results. - `prev` (string, optional) — Link to the previous page. Only present when not on the first page. ### Address Address model representing a physical address for regulatory compliance. - `id` (string, required) — The unique identifier of the Address on SignalWire. - `label` (string, required) — A friendly name given to the address to help distinguish and search for different addresses within your project. - `country` (string, required) — The ISO 3166 Alpha 2 country code. - `first_name` (string, required) — First name of the occupant associated with this address. - `last_name` (string, required) — Last name of the occupant associated with this address. - `street_number` (string, required) — The number portion of the street address. - `street_name` (string, required) — The name portion of the street address. - `address_type` (enum, required, nullable) — If the address is divided into multiple sub-addresses, this identifies how the address is divided. - Allowed values: `Apartment`, `Basement`, `Building`, `Department`, `Floor`, `Office`, `Penthouse`, `Suite`, `Trailer`, `Unit` - `address_number` (string, required, nullable) — If the address is divided into multiple sub-addresses, this identifies the particular sub-address. - `city` (string, required) — The city portion of the street address. - `state` (string, required) — The state/province/region of the street address. In the USA and Canada, use the two-letter abbreviated form. - `postal_code` (string, required) — The postal code of the street address. - `zip_code` (string, required) — The postal code of the street address. Alias for postal_code for backwards compatibility. - `emergency_enabled` (boolean, required) — Whether E911 emergency calling is enabled for this address (carrier-validated when created/updated with `emergency_enabled=true` for a US address). - `validated` (boolean, required) — Whether the address was validated by the carrier (true when the carrier returned a valid or auto-corrected match). - `validated_at` (string, required, nullable) — The RFC 3339 / ISO 8601 timestamp of the last successful carrier validation, or null if never validated. ### Types.StatusCodes.SpaceApiErrorItem Details about a specific validation error. - `detail` (string, required) — A description of what caused the error. - `status` (string, required) — The HTTP status code. - `title` (string, required) — A short summary of the error type. - `code` (string, required) — The error code. ## Examples **Response** ```json { "links": { "self": "string", "first": "string", "next": "string", "prev": "string" }, "data": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "label": "My Address", "country": "US", "first_name": "Emmett", "last_name": "Brown", "street_number": "1640", "street_name": "Riverside Drive", "address_type": "Apartment", "address_number": "42", "city": "Alexandria", "state": "CA", "postal_code": "91905", "zip_code": "91905", "emergency_enabled": false, "validated": false, "validated_at": null } ] } ``` **SDK Code** ```python import requests url = "https://{your_space_name}.signalwire.com/api/relay/rest/addresses" response = requests.get(url, auth=("", "")) print(response.json()) ``` ```javascript const url = 'https://{your_space_name}.signalwire.com/api/relay/rest/addresses'; const credentials = btoa(":"); const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://{your_space_name}.signalwire.com/api/relay/rest/addresses" req, _ := http.NewRequest("GET", url, nil) req.SetBasicAuth("", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://{your_space_name}.signalwire.com/api/relay/rest/addresses") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request.basic_auth("", "") response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://{your_space_name}.signalwire.com/api/relay/rest/addresses") .basicAuth("", "") .asString(); ``` ```php request('GET', 'https://{your_space_name}.signalwire.com/api/relay/rest/addresses', [ 'headers' => [ ], 'auth' => ['', ''], ]); echo $response->getBody(); ``` ```csharp using RestSharp; using RestSharp.Authenticators; var client = new RestClient("https://{your_space_name}.signalwire.com/api/relay/rest/addresses"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let credentials = Data(":".utf8).base64EncodedString() let headers = ["Authorization": "Basic \(credentials)"] let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/relay/rest/addresses")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```