create

View as MarkdownOpen in Claude

Create a new regulatory address.

Request

labelstringRequired<=250 characters
A friendly name given to the address to help distinguish and search for different addresses within your project. When the address is assigned to a phone number for E911, this label is also sent to the carrier as the caller name. The emergency network limits that field to 32 characters, so longer labels are truncated to the first 32 characters before being sent. Truncation affects only the name shown to the dispatcher, never the address used to route the call.
countrystringRequired
The ISO 3166 Alpha 2 country code.
first_namestringRequired<=250 characters
First name of the occupant associated with this address.
last_namestringRequired<=250 characters
Last name of the occupant associated with this address.
street_numberstringRequired<=250 characters
The number portion of the street address.
street_namestringRequired<=250 characters
The name portion of the street address.
citystringRequired<=250 characters
The city portion of the street address.
statestringRequired
The state/province/region of the street address. In the USA and Canada, use the two-letter abbreviated form.
postal_codestringRequired<=250 characters
The postal code of the street address.
address_typeenumOptional
If the address is divided into multiple sub-addresses, this identifies how the address is divided. Possible values are: Apartment, Basement, Building, Department, Floor, Office, Penthouse, Suite, Trailer, Unit.
address_numberstringOptional
If the address is divided into multiple sub-addresses, this identifies the particular sub-address.
emergency_enabledbooleanOptionalDefaults to false
Applies to US addresses only. When `true` and `country` is `US`, the address is validated against the carrier before it is stored. For any other `country` the flag is ignored and the response returns `emergency_enabled: false`. Defaults to `false`, which stores the address without carrier validation.
auto_correct_addressbooleanOptionalDefaults to true
When the carrier suggests a corrected version of the address, `true` (the default) stores the corrected address; `false` rejects the request with the suggestion returned as candidates.

Response

idstringRequiredformat: "uuid"
The unique identifier of the Address on SignalWire.
labelstringRequired
A friendly name given to the address to help distinguish and search for different addresses within your project.
countrystringRequired
The ISO 3166 Alpha 2 country code.
first_namestringRequired
First name of the occupant associated with this address.
last_namestringRequired
Last name of the occupant associated with this address.
street_numberstringRequired
The number portion of the street address.
street_namestringRequired
The name portion of the street address.
address_typeenum or nullRequired
If the address is divided into multiple sub-addresses, this identifies how the address is divided.
address_numberstring or nullRequired
If the address is divided into multiple sub-addresses, this identifies the particular sub-address.
citystringRequired
The city portion of the street address.
statestringRequired
The state/province/region of the street address. In the USA and Canada, use the two-letter abbreviated form.
postal_codestringRequired
The postal code of the street address.
zip_codestringRequired
The postal code of the street address. Alias for postal_code for backwards compatibility.
emergency_enabledbooleanRequired
Whether E911 emergency calling is enabled for this address (carrier-validated when created/updated with `emergency_enabled=true` for a US address).
validatedbooleanRequired
Whether the address was validated by the carrier (true when the carrier returned a valid or auto-corrected match).
validated_atstring or nullRequired
The RFC 3339 / ISO 8601 timestamp of the last successful carrier validation, or null if never validated.

Response Example

Response
1{
2 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3 "label": "My Address",
4 "country": "US",
5 "first_name": "Emmett",
6 "last_name": "Brown",
7 "street_number": "1640",
8 "street_name": "Riverside Drive",
9 "address_type": "Apartment",
10 "address_number": "42",
11 "city": "Alexandria",
12 "state": "CA",
13 "postal_code": "91905",
14 "zip_code": "91905",
15 "emergency_enabled": false,
16 "validated": false,
17 "validated_at": null
18}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const addr = await client.addresses.create({
10 label: "HQ Address",
11 first_name: "Jane",
12 last_name: "Doe",
13 street_number: "123",
14 street_name: "Main St",
15 city: "Austin",
16 state: "TX",
17 postal_code: "78701",
18 country: "US",
19});
20console.log("Created address:", addr.id);