import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const address = await client.addresses.delete('id');
console.log(address.data);{
"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",
"address_book": false,
"validate_address": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Deletes an existing address.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const address = await client.addresses.delete('id');
console.log(address.data);{
"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",
"address_book": false,
"validate_address": true,
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
address ID
Successful response
Show child attributes
Uniquely identifies the address.
"1293384261075731499"
Identifies the type of the resource.
"address"
A customer reference string for customer look ups.
"MY REF 001"
The first name associated with the address. An address must have either a first last name or a business name.
"Alfred"
The last name associated with the address. An address must have either a first last name or a business name.
"Foster"
The business name associated with the address. An address must have either a first last name or a business name.
"Toy-O'Kon"
The phone number associated with the address.
"+12125559000"
The primary street address information about the address.
"600 Congress Avenue"
Additional street address information about the address such as, but not limited to, unit number or apartment number.
"14th Floor"
The locality of the address. For US addresses, this corresponds to the city of the address.
"Austin"
The locality of the address. For US addresses, this corresponds to the state of the address.
"TX"
The neighborhood of the address. This field is not used for addresses in the US but is used for some international addresses.
"Ciudad de los deportes"
The borough of the address. This field is not used for addresses in the US but is used for some international addresses.
"Guadalajara"
The postal code of the address.
"78701"
The two-character (ISO 3166-1 alpha-2) country code of the address.
"US"
Indicates whether or not the address should be considered part of your list of addresses that appear for regular use.
false
Indicates whether or not the address should be validated for emergency use upon creation or not. This should be left with the default value of true unless you have used the /addresses/actions/validate endpoint to validate the address separately prior to creation. If an address is not validated for emergency use upon creation and it is not valid, it will not be able to be used for emergency services.
true
ISO 8601 formatted date indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
Was this page helpful?