Creates an address
Changed onCreates a new address on your account from the provided details, for use with services that require a physical address such as emergency calling and regulatory compliance.
By default, the new record is validated for emergency use at creation time. If the address fails validation, no record is created and the request is rejected with a 422 response; the errors array includes a suggested value for each offending field when one is available.
Set validate_address to false to skip validation at creation, for example when the address was already validated with the Validate an address action. The record is then created without emergency validation: if it is not valid it will not be able to be used for emergency services (such as a phone number's emergency address), and because address records cannot be updated, a new record has to be created to correct it.
Request
- Base URL: https://api.telnyx.com/v2
- URL: https://api.telnyx.com/v2/addresses
- Auth: HTTP bearer
Request body
Example request
{
"customer_reference": "MY REF 001",
"first_name": "Alfred",
"last_name": "Foster",
"business_name": "Toy-O'Kon",
"phone_number": "+12125559000",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"neighborhood": "Ciudad de los deportes",
"borough": "Guadalajara",
"postal_code": "78701",
"country_code": "US",
"validate_address": true
}Response
Successful response. validate_address on the returned record indicates whether it was validated for emergency use at creation: created with the default true, the record passed emergency validation; created with false, validation was skipped during this creation request, and the address may have been validated separately. This flag is not a current validity status; emergency use still requires a valid address.
Example response
{
"data": {
"id": "1293384261075731499",
"record_type": "address",
"customer_reference": "MY REF 001",
"first_name": "Alfred",
"last_name": "Foster",
"business_name": "Toy-O'Kon",
"phone_number": "+12125559000",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"neighborhood": "Ciudad de los deportes",
"borough": "Guadalajara",
"postal_code": "78701",
"country_code": "US",
"validate_address": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Changes
- info
added the media type
application/jsonfor the response with the status
- info