The Contact object represents an individual contact in your Go-Mailer account. Go-Mailer provides you with programmatic access to create and modify the contacts in your account.
This allows you to create and modify a contact in your Go-Mailer account. A new contact if the email address is not in use. Otherwise, the existing contact is updated.
The contact's email address.
The contact's first name.
The contact's last name.
The contact's gender. Allowed values are male | female
The contact's date of birth. The following format should be used mm-dd-YYYY.
The contact's mobile number. If you wish to use SMS Marketing, please ensure to include the short code. e.g:+234 123 456 7890
The contact's home address.
The street component of the contact's address.
The state component of the contact's address.
The country code component of the contact's address. e.g NG
A key => value set of custom information you would like to store on the contact. Useful for attribution.
const response = await fetch("https://api.go-mailer.com/v1/contacts", {
method: "POST",
headers: {
Authorization: "Bearer <API_KEY>"
},
body: JSON.stringify({
email: "johndoe@example.com",
firstname: "John",
lastname: "Doe",
gender: "male",
address: {
country: "USA",
state: "Oyo",
street: "Sample street",
}
})
});