Create an address
POST/account/addresses
Creates a new address object.
Request
- application/json
Body
required
Address to add
first_name stringrequired
Address first name
last_name stringrequired
Address last name
business_name string
Address business name
phone_number stringrequired
Address phone number
street_address stringrequired
Address first line
extended_address string
Address second line
locality stringrequired
Locality (city for US addresses)
administrative_area string
Administrative area (state for US addresses)
postal_code string
Postal code
country_code stringrequired
2-digit country code
address_book boolean
Default value: true
indicates if the address should be considered part of your 'address book' or not; addresses that are in your address book are shown by default when listing addresses, those not in your address book are not. They can still be shown by using the include_non_address_book filter when requesting addresses.
Responses
200: Address created response
- application/json
400: Bad request
401: Unauthorized
Request samples
curl -L 'https://api.telnyx.com/account/addresses' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"first_name": "John",
"last_name": "Smith",
"business_name": "Telnyx",
"phone_number": "+13125364300",
"street_address": "311 W. Superior St.",
"extended_address": "Suite 504",
"locality": "CHICAGO",
"administrative_area": "IL",
"postal_code": "60654",
"country_code": "US",
"address_book": true
}'
Response samples
{
"id": "string",
"first_name": "John",
"last_name": "Smith",
"business_name": "Telnyx",
"phone_number": "+13125364300",
"street_address": "311 W. Superior St.",
"extended_address": "Suite 504",
"locality": "CHICAGO",
"administrative_area": "IL",
"postal_code": "60654",
"country_code": "US",
"address_book": true
}