Skip to main content

Creates a user address

POST 
/user_addresses

Creates a user address.

Request

Body

required

Parameters that can be defined during user address creation

    customer_reference customer_reference (string)

    A customer reference string for customer look ups.

    first_name first_name (string)required

    The first name associated with the user address.

    last_name last_name (string)required

    The last name associated with the user address.

    business_name business_name (string)required

    The business name associated with the user address.

    phone_number phone_number (string)

    The phone number associated with the user address.

    street_address street_address (string)required

    The primary street address information about the user address.

    extended_address extended_address (string)

    Additional street address information about the user address such as, but not limited to, unit number or apartment number.

    locality locality (string)required

    The locality of the user address. For US addresses, this corresponds to the city of the address.

    administrative_area administrative_area (string)

    The locality of the user address. For US addresses, this corresponds to the state of the address.

    neighborhood neighborhood (string)

    The neighborhood of the user address. This field is not used for addresses in the US but is used for some international addresses.

    borough borough (string)

    The borough of the user address. This field is not used for addresses in the US but is used for some international addresses.

    postal_code postal_code (string)

    The postal code of the user address.

    country_code country_code (string)required

    The two-character (ISO 3166-1 alpha-2) country code of the user address.

    skip_address_verification skip_address_verification (string)

    An optional boolean value specifying if verification of the address should be skipped or not. UserAddresses are generally used for shipping addresses, and failure to validate your shipping address will likely result in a failure to deliver SIM cards or other items ordered from Telnyx. Do not use this parameter unless you are sure that the address is correct even though it cannot be validated. If this is set to any value other than true, verification of the address will be attempted, and the user address will not be allowed if verification fails. If verification fails but suggested values are available that might make the address correct, they will be present in the response as well. If this value is set to true, then the verification will not be attempted. Defaults to false (verification will be performed).

Responses

200: Successful response

422: Bad request

Request samples


curl -L 'https://api.telnyx.com/v2/user_addresses' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"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",
"skip_address_verification": "string"
}'

Response samples


{
"data": {
"id": "c3527e69-dc5a-4b3e-8f44-99d209f83c1d",
"record_type": "user_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",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}