Go-Mailer.

Contacts

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.

Synchronize contact

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.

POST https://api.go-mailer.com/v1/contacts

Request body

email - string - required

The contact's email address.

firstname - string

The contact's first name.

lastname - string

The contact's last name.

gender - string

The contact's gender. Allowed values are male | female

date_of_birth - string

The contact's date of birth. The following format should be used mm-dd-YYYY.

phone_number - string

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

address - object

The contact's home address.

address.street - string

The street component of the contact's address.

address.state - string

The state component of the contact's address.

address.country - string

The country code component of the contact's address. e.g NG

extra_data - object

A key => value set of custom information you would like to store on the contact. Useful for attribution.

Sample request

HTTPNode.jsPythonPHP
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",
    }
  })
});