Go-Mailer.

Automation Event

This is an object which represents a custom automation event on Go-Mailer. These events can be created by you and they can be triggered from your applications.

VERB https://api.go-mailer.com

Trigger an event

As stated in the introduction, you can trigger events from your own application.

You generally need two key blocs of information: the code of the event to be triggered and a context object containing relevant information about the event.

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

Request body

event_code - string

The is a unique code that is used to identify a specific Event. Two events SHOULD NOT have the same code.

context - object

This is a set of Key => value pairs which is expected to contain extra information related to the event and target for whom the event was triggered. This includes the contact's information.

contact_email - string

The user's email address. This is required and is used to identify the user for whom the event was triggered.

Sample request

HTTPNode.jsPythonPHP
const response = await fetch("https://api.go-mailer.com/v1/automations", {
  method: "POST",
  headers: {
    Authorization: "Bearer <API_KEY>"
  },
  body: JSON.stringify({
    event_code: "makes_purchase",
    contact_email: "johndoe@example.com",
    context: {
      firstname: "John",
      lastname: "Doe",
      item: "iPhone",
      price: 1999.99
    }
  })
});