Contacts
The Contact object represents an individual contact in your Go-Mailer account. The API gives you programmatic access to create and update the contacts in your account.
Synchronize a contact
Creates or updates a contact in your account. If the email address isn't in use yet, a new contact is created; otherwise the existing contact is updated.
https://api.go-mailer.com/v1/contactsRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Required | The contact's email address. |
firstname | string | Optional | The contact's first name. |
lastname | string | Optional | The contact's last name. |
gender | string | Optional | The contact's gender. Allowed values: |
date_of_birth | string | Optional | The contact's date of birth, in the format |
phone_number | string | Optional | The contact's mobile number. If you want to use SMS marketing, include the country code, e.g. |
address | object | Optional | The contact's home address. |
address.street | string | Optional | The street part of the address. |
address.state | string | Optional | The state part of the address. |
address.country | string | Optional | The country code part of the address, e.g. |
extra_data | object | Optional |
|
Sample request
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",
}
})
});