Introduction

Email Gateway API is a bulk email sending service for businesses.

Email Gateway API aim to provide business the ability to send bulk emails in a reliable and efficient manner. For example, if you would like to send bulk marketing emails or reliably send transactional emails then Email Gateway API is the best option.

Prerequisites

To make use of Email Gateway API you must be registered with CM.com and you need to have access to Email App.

You can make request by visiting CM.com

Authentication

To make any request to Email Gateway API you need a secret called Product Token. Once you have access to Email App you can get product token by visiting settings page in email app and copying the product token. To make any request to Email Gateway App you need to pass the product token as header in the POST request with the name
X-CM-PRODUCTTOKEN

How it works

There are two APIs in Email Gateway API that are responsible for sending emails.

  • /v1/marketing
  • /v1/transactional?priority=High/Low

Marketing API is used for sending bulk marketing emails while transactional API is used for sending priority transactional emails. Priority value in transactional email informs Gateway API about the priority of the email. Priority value does not have any effect on the delivered emails however it informs the Gateway API to send email as soon as possible.

Once you send email request to the API if everything is successful, we provide you with the messageId which is a unique identifier for each email request. If you login to the app then you would be able to view the logs, metrics and other details related to each and every email sent via Gateway API.

Webhooks

Email gateway also has the ability to add webhooks for certain events which can be found in the email app (settings-> webhooks). You can provide a URL in the input box and the event data will be sent to that URL using a POST request.
Currently there are 7 webhooks available.

  • Delivered
  • Bounces
  • Unsubscribes
  • Spam Reports
  • Open
  • Click
  • Global webhook

If global webhook is configured, then for all events, a POST request is made to Global webhook irrespective of whether individual event webhooks are configured or not.

Domains

In domains section of the email app, you can register your domain with cm.com. Once you domain is configured you will be presented with some values in the next section which needs to be added to the domain you configured. This process will make sure that we are authenticated to send emails on behalf your registered domain.

The registered domains also have a status bar indicating whether the domain is verified or not. Once domain is configured our services will check the authenticity of the domain and update the status if the verification is successful. This process runs every 15 minutes and may take a minute or two to update the status. Emails can be sent only if the domain verification is successful.