Add or Replace Customer Email Address

You can create or replace a customer email address using the following endpoint and sample payload:

POST https://example-gotransverse.com/billing/2/customers/{customer_id}/addresses

TIP: This endpoint can also create POSTAL and TELECOM addresses. Refer to Add or Replace Customer Postal Address and Add or Replace Customer Phone Number.

Learn what you need to know to successfully create an address in the Considerations, Before You Start, Request, and Response sections below.


Considerations

Consider the following when creating a new email address for a customer:

  • A customer can have up to three email addresses, one for each purpose.

  • An address cannot be edited or deleted. It can only be replaced with a new address of the same address_type and purpose.

Before You Start

You will need the following when creating a new email address:

  • The id of the customer entity to update as the endpoint's {customer_id} path parameter.

Request

Copy
{
  "address_type": "email",
  "purpose": "PRIMARY",
  "email": "contact@gmail.com"
}
Create Customer Email Address Request Fields
Name Description Data Type Required or Optional Notes

address_type

The type of address. The value must be EMAIL to create an email address.

string

Required

 

purpose

The purpose of the email address:

  • PRIMARY — The default email address when emailing an invoice or receipt for a customer's billing accounts.

  • SECONDARY — The email address is for reference only and not used by other areas of the system.

  • PAYMENT — The email address is for reference only and not used by other areas of the system.

string

Required

 

email

The email address.

string

Required

 

Response

When successful, the new address entity is returned with an id assigned.

Copy
{
  "address_type": "email",
  "id": "21088"
  "purpose": "PRIMARY",
  "email": "contact@gmail.com"
}

 

 

 

Topic Updated: 7/2024.