Introduction
Learn about core concepts, authentication and response codes.
Base URL
The Email Gateway API is built on REST principles. To prioritize security, HTTPS is mandatory for all requests, and HTTP is not supported under any circumstances.
All requests contain the following base URL:
https://api.cm.com/email/
Authentication
To authenticate you will need a secure credential called the Product Token. This token acts as your unique key to authenticate requests.
How to Obtain the Product Token:
- Log in to the Email Gateway App.
- Navigate to the Settings page within the app.
- Locate and copy your Product Token in the Integration section.
When making a request to the API, include the Product Token in the request headers. Use the header name X-CM-PRODUCTTOKEN and pass the token as its value. For example, in a POST request, your header should look like this:
curl -X POST "https://api.cm.com/email/gateway/v1/transactional?priority={priority}" \
-H "Content-Type: application/json" \
-H "X-CM-PRODUCTTOKEN: {your-product-token}" \
-d '{your-json-payload}'
POST https://api.cm.com/email/gateway/v1/transactional?priority={priority}
Content-Type: application/json
X-CM-PRODUCTTOKEN: {your-product-token}
Response Codes
The API follows standard HTTP status codes to communicate the outcome of your requests. Here's a breakdown of how these codes are used:
2xx: Indicates a successful request.4xx: Represents client-side errors, such as invalid input or authentication issues.5xx: Signals server-side errors or infrastructure problems.
| Status | Meaning |
|---|---|
200 | Request was successful. |
400 | Invalid parameters; check your input. |
401 | Missing Product Token. |
403 | Invalid Product Token. |
404 | Resource not found. |
429 | Rate limit exceeded. |
5xx | Server error on CM.com's side. |
These codes help you quickly identify and troubleshoot issues with your API requests.
Updated 3 days ago