> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# E911

> Register an emergency address and enable E911 service for your SignalWire phone numbers.

**E911, or Enhanced 911,** is a support system for wireless and VoIP phone users who dial 911,
the standard number for requesting help in an emergency across supported countries.
Because a VoIP number isn't tied to a physical line,
you register a street address for the number ahead of time.
When someone dials 911 from that number,
the call is routed to the dispatch center serving the registered address,
and that address is displayed to the dispatcher.

E911 on SignalWire is self-service:
create an emergency address, assign it to a phone number,
and the number is provisioned for emergency calling.
You can manage everything from the [Dashboard](#set-up-e911-in-the-dashboard)
or the [REST API](#set-up-e911-with-the-rest-api).

#### 911 calls from unregistered numbers

Calling 911 from a number with no E911 address still connects,
but it is answered by a national relay center
that must ask for your location before transferring you to local responders
— delaying response.
Each of these calls also incurs a \$100 fee.
Register an address before an emergency,
and always dial 933, not 911, to [test your configuration](#test-your-e911-configuration)
— 933 test calls are exempt from the fee.

## How it works

Emergency addresses live in your project as a reusable collection,
so one address can serve many of the project's phone numbers.
E911 is available for US addresses only.
When you create a US address with emergency service enabled,
it is validated against the carrier's emergency database,
and small errors are corrected automatically.

Assigning a validated address to a phone number starts provisioning at the carrier.
Provisioning is asynchronous:
the number's E911 status starts as `pending` and becomes `active` once the carrier confirms,
typically within a few minutes.
The address's label is presented to the dispatcher as the caller name,
so use a label that identifies the caller or location clearly.
While a number has an E911 address assigned,
it can't be transferred to another project.

## Set up E911 with the REST API

First, create an address with `emergency_enabled` set to `true`:

### Request

POST https\://%7BYour\_Space\_Name%7D.signalwire.com/api/relay/rest/addresses

```curl
curl -X POST https://{your_space_name}.signalwire.com/api/relay/rest/addresses \
     -H "Content-Type: application/json" \
     -u "<project_id>:<api_token>" \
     -d '{
  "label": "My Address",
  "country": "US",
  "first_name": "Emmett",
  "last_name": "Brown",
  "street_number": "1640",
  "street_name": "Riverside Drive",
  "city": "Alexandria",
  "state": "CA",
  "postal_code": "91905"
}'
```

```python
import requests

url = "https://{your_space_name}.signalwire.com/api/relay/rest/addresses"

payload = {
    "label": "My Address",
    "country": "US",
    "first_name": "Emmett",
    "last_name": "Brown",
    "street_number": "1640",
    "street_name": "Riverside Drive",
    "city": "Alexandria",
    "state": "CA",
    "postal_code": "91905"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<project_id>", "<api_token>"))

print(response.json())
```

```javascript
const url = 'https://{your_space_name}.signalwire.com/api/relay/rest/addresses';
const credentials = btoa("<project_id>:<api_token>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"label":"My Address","country":"US","first_name":"Emmett","last_name":"Brown","street_number":"1640","street_name":"Riverside Drive","city":"Alexandria","state":"CA","postal_code":"91905"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://{your_space_name}.signalwire.com/api/relay/rest/addresses"

	payload := strings.NewReader("{\n  \"label\": \"My Address\",\n  \"country\": \"US\",\n  \"first_name\": \"Emmett\",\n  \"last_name\": \"Brown\",\n  \"street_number\": \"1640\",\n  \"street_name\": \"Riverside Drive\",\n  \"city\": \"Alexandria\",\n  \"state\": \"CA\",\n  \"postal_code\": \"91905\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.SetBasicAuth("<project_id>", "<api_token>")
	req.Header.Add("Content-Type", "application/json")

	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::Post.new(url)
request.basic_auth("<project_id>", "<api_token>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"label\": \"My Address\",\n  \"country\": \"US\",\n  \"first_name\": \"Emmett\",\n  \"last_name\": \"Brown\",\n  \"street_number\": \"1640\",\n  \"street_name\": \"Riverside Drive\",\n  \"city\": \"Alexandria\",\n  \"state\": \"CA\",\n  \"postal_code\": \"91905\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://{your_space_name}.signalwire.com/api/relay/rest/addresses")
  .basicAuth("<project_id>", "<api_token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"label\": \"My Address\",\n  \"country\": \"US\",\n  \"first_name\": \"Emmett\",\n  \"last_name\": \"Brown\",\n  \"street_number\": \"1640\",\n  \"street_name\": \"Riverside Drive\",\n  \"city\": \"Alexandria\",\n  \"state\": \"CA\",\n  \"postal_code\": \"91905\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://{your_space_name}.signalwire.com/api/relay/rest/addresses', [
  'body' => '{
  "label": "My Address",
  "country": "US",
  "first_name": "Emmett",
  "last_name": "Brown",
  "street_number": "1640",
  "street_name": "Riverside Drive",
  "city": "Alexandria",
  "state": "CA",
  "postal_code": "91905"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<project_id>', '<api_token>'],
]);

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("<project_id>", "<api_token>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"label\": \"My Address\",\n  \"country\": \"US\",\n  \"first_name\": \"Emmett\",\n  \"last_name\": \"Brown\",\n  \"street_number\": \"1640\",\n  \"street_name\": \"Riverside Drive\",\n  \"city\": \"Alexandria\",\n  \"state\": \"CA\",\n  \"postal_code\": \"91905\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<project_id>:<api_token>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "label": "My Address",
  "country": "US",
  "first_name": "Emmett",
  "last_name": "Brown",
  "street_number": "1640",
  "street_name": "Riverside Drive",
  "city": "Alexandria",
  "state": "CA",
  "postal_code": "91905"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

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 = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

If the carrier can't validate the address,
the request fails with a `422` response listing the problems
and, when available, suggested corrections in a `candidates` array.

Next, assign the address to a phone number:

### Request

POST https\://%7BYour\_Space\_Name%7D.signalwire.com/api/relay/rest/phone\_numbers/\{id}/e911\_address

```curl
curl -X POST https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/e911_address \
     -H "Content-Type: application/json" \
     -u "<project_id>:<api_token>" \
     -d '{
  "e911_address_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
```

```python
import requests

url = "https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/e911_address"

payload = { "e911_address_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<project_id>", "<api_token>"))

print(response.json())
```

```javascript
const url = 'https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/e911_address';
const credentials = btoa("<project_id>:<api_token>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"e911_address_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6"}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/e911_address"

	payload := strings.NewReader("{\n  \"e911_address_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.SetBasicAuth("<project_id>", "<api_token>")
	req.Header.Add("Content-Type", "application/json")

	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/phone_numbers/id/e911_address")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request.basic_auth("<project_id>", "<api_token>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"e911_address_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/e911_address")
  .basicAuth("<project_id>", "<api_token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"e911_address_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/e911_address', [
  'body' => '{
  "e911_address_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<project_id>', '<api_token>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/e911_address");
client.Authenticator = new HttpBasicAuthenticator("<project_id>", "<api_token>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"e911_address_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<project_id>:<api_token>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = ["e911_address_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/relay/rest/phone_numbers/id/e911_address")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

The phone number's `e911_status` field tracks provisioning;
the number is ready for emergency calling once it reads `active`.
Status changes don't send webhooks,
so poll the number to watch for the transition.
To disable E911 on the number,
send a `DELETE` request to the same endpoint.

For full request and response details,
see the [E911 Addresses](/docs/apis/rest/e-911-addresses/list-addresses) reference for address operations,
and [Assign an E911 address](/docs/apis/rest/phone-numbers/assign-e-911-address)
and [Remove an E911 address](/docs/apis/rest/phone-numbers/remove-e-911-address)
under the Phone Numbers reference.

#### Compatibility API

If you manage numbers with the Compatibility API,
you can attach an existing emergency address by setting `EmergencyAddressSid`
when [updating an incoming phone number](/docs/compatibility-api/rest/incoming-phone-numbers/update-incoming-phone-number).

## Set up E911 in the Dashboard

Open the **Phone Numbers** section of your Dashboard
and select the **E911** tab to create and manage emergency addresses.
To assign an address,
open a phone number's detail page and set its emergency address there.
The same validation and provisioning process applies,
and the number's E911 status is shown alongside the assignment.

## Test your E911 configuration

Once the number's E911 status is `active`,
dial 933 from it.
933 is the emergency network's test line:
it reads back the address on file for the number
so you can confirm your registration is correct,
and calling it never incurs the unregistered-call fee.
If 933 doesn't read back the address you registered,
check the number's E911 status:
provisioning may still be `pending`,
or the number may not have an address assigned at all.