Skip to main content
POST
/
user_addresses
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const userAddress = await client.userAddresses.create({
  business_name: "Toy-O'Kon",
  country_code: 'US',
  first_name: 'Alfred',
  last_name: 'Foster',
  locality: 'Austin',
  street_address: '600 Congress Avenue',
});

console.log(userAddress.data);
{
  "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"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Parameters that can be defined during user address creation

first_name
string
required

The first name associated with the user address.

Example:

"Alfred"

last_name
string
required

The last name associated with the user address.

Example:

"Foster"

business_name
string
required

The business name associated with the user address.

Example:

"Toy-O'Kon"

street_address
string
required

The primary street address information about the user address.

Example:

"600 Congress Avenue"

locality
string
required

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

Example:

"Austin"

country_code
string
required

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

Example:

"US"

customer_reference
string

A customer reference string for customer look ups.

Example:

"MY REF 001"

phone_number
string

The phone number associated with the user address.

Example:

"+12125559000"

extended_address
string

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

Example:

"14th Floor"

administrative_area
string

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

Example:

"TX"

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.

Example:

"Ciudad de los deportes"

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.

Example:

"Guadalajara"

postal_code
string

The postal code of the user address.

Example:

"78701"

skip_address_verification
string
default:false

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).

Response

Successful response

data
object