Download OpenAPI specification:Download
Send transactional and marketing emails, manage domains, suppressions, webhooks, and more.
Sends a marketing email, such as a newsletter or promotion. An unsubscribe link and a one-click unsubscribe header are added automatically. Set scheduledAt to deliver the email later, up to 72 hours ahead. The response contains a messageId; delivery results are available through webhooks and in the email logs.
| X-CM-PRODUCTTOKEN | string Your CM.com product token, which authenticates the request. Find it in the Email Gateway App → Settings → Integration. |
| Sandbox-Mode | boolean Default: false Set to |
The marketing email to send.
object Sender of the email. The address must be on a domain that is verified for your account, and a display | |
object Address that replies are sent to. When omitted, replies go to the sender. | |
Array of objects or null (Gateway_EmailAddress) Primary recipients of the email. The total number of recipients across | |
Array of objects or null (Gateway_EmailAddress) Recipients that receive a visible copy of the email. Counts towards the limit of 50 recipients in total. | |
Array of objects or null (Gateway_EmailAddress) Recipients that receive a hidden copy of the email. Other recipients cannot see these addresses. Counts towards the limit of 50 recipients in total. | |
| subject required | string or null Subject line of the email. |
| html | string or null HTML body of the email. Provide |
| text | string or null Plain-text body of the email. Provide |
Array of objects or null (Gateway_EmailAttachment) Files to attach to the email. The content of each file is Base64 encoded, and the total size of the email including all attachments is limited. Any file type is accepted. Executable files are blocked, which means Windows ( | |
| customerReference | string or null Your own reference for this email, for example an order or user ID. It is included in the webhook events for the email. |
| scheduledAt | string or null Date and time to deliver the email, in ISO 8601 format with a UTC offset, for example |
| inReplyTo | string or null Message-ID of the email you are replying to, including the angle brackets, for example |
| references | string or null Message-IDs of the earlier emails in the conversation, separated by spaces and ordered from oldest to newest. Use together with |
object or null Custom email headers as flat key-value pairs, for example |
{- "from": {
- "email": "string",
- "name": "string"
}, - "replyTo": {
- "email": "string",
- "name": "string"
}, - "to": [
- {
- "email": "string",
- "name": "string"
}
], - "cc": [
- {
- "email": "string",
- "name": "string"
}
], - "bcc": [
- {
- "email": "string",
- "name": "string"
}
], - "subject": "string",
- "html": "string",
- "text": "string",
- "attachments": [
- {
- "fileName": "string",
- "content": "string",
- "contentType": "string",
- "contentId": "string"
}
], - "customerReference": "string",
- "scheduledAt": "string",
- "inReplyTo": "string",
- "references": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}
}{- "status": 0,
- "message": "string",
- "success": true,
- "messageId": "string",
- "batchId": "string"
}Sends a transactional email, such as a password reset, order confirmation or one-time code. Use the priority query parameter to mark time-sensitive emails as high. Set scheduledAt to deliver the email later, up to 72 hours ahead. The response contains a messageId; delivery results are available through webhooks and in the email logs.
| priority required | string Delivery priority of the transactional email. Use |
| X-CM-PRODUCTTOKEN | string Your CM.com product token, which authenticates the request. Find it in the Email Gateway App → Settings → Integration. |
| Sandbox-Mode | boolean Default: false Set to |
The transactional email to send.
object Sender of the email. The address must be on a domain that is verified for your account, and a display | |
object Address that replies are sent to. When omitted, replies go to the sender. | |
Array of objects or null (Gateway_EmailAddress) Primary recipients of the email. The total number of recipients across | |
Array of objects or null (Gateway_EmailAddress) Recipients that receive a visible copy of the email. Counts towards the limit of 50 recipients in total. | |
Array of objects or null (Gateway_EmailAddress) Recipients that receive a hidden copy of the email. Other recipients cannot see these addresses. Counts towards the limit of 50 recipients in total. | |
| subject required | string or null Subject line of the email. |
| html | string or null HTML body of the email. Provide |
| text | string or null Plain-text body of the email. Provide |
Array of objects or null (Gateway_EmailAttachment) Files to attach to the email. The content of each file is Base64 encoded, and the total size of the email including all attachments is limited. Any file type is accepted. Executable files are blocked, which means Windows ( | |
| customerReference | string or null Your own reference for this email, for example an order or user ID. It is included in the webhook events for the email. |
| scheduledAt | string or null Date and time to deliver the email, in ISO 8601 format with a UTC offset, for example |
| inReplyTo | string or null Message-ID of the email you are replying to, including the angle brackets, for example |
| references | string or null Message-IDs of the earlier emails in the conversation, separated by spaces and ordered from oldest to newest. Use together with |
object or null Custom email headers as flat key-value pairs, for example |
{- "from": {
- "email": "string",
- "name": "string"
}, - "replyTo": {
- "email": "string",
- "name": "string"
}, - "to": [
- {
- "email": "string",
- "name": "string"
}
], - "cc": [
- {
- "email": "string",
- "name": "string"
}
], - "bcc": [
- {
- "email": "string",
- "name": "string"
}
], - "subject": "string",
- "html": "string",
- "text": "string",
- "attachments": [
- {
- "fileName": "string",
- "content": "string",
- "contentType": "string",
- "contentId": "string"
}
], - "customerReference": "string",
- "scheduledAt": "string",
- "inReplyTo": "string",
- "references": "string",
- "headers": {
- "property1": "string",
- "property2": "string"
}
}{- "status": 0,
- "message": "string",
- "success": true,
- "messageId": "string",
- "batchId": "string"
}Registers a domain for sending. DNS records are generated for the domain; add them to your DNS provider and then verify the domain. Use the get domain endpoint to retrieve the records.
The domain to register.
| accountId | string <uuid> Identifier (UUID) of the logical account to add the domain to. |
| domain | string or null Domain name to add, for example |
| clickTracking | boolean Set to |
| openTracking | boolean Set to |
{- "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
- "domain": "string",
- "clickTracking": true,
- "openTracking": true
}{- "domainConfig": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
- "domain": "string",
- "createdOn": "2019-08-24T14:15:22Z",
- "modifiedOn": "2019-08-24T14:15:22Z",
- "deletedOn": "2019-08-24T14:15:22Z",
- "dnsRecords": [
- {
- "host": "string",
- "type": "string",
- "value": "string",
- "purpose": "string",
- "priority": 0,
- "dnsStatus": "NotStarted"
}
], - "isValid": true,
- "clickTracking": true,
- "openTracking": true,
- "sendingEnabled": true,
- "receivingEnabled": true,
- "status": "NotStarted"
}, - "status": 200,
- "message": "string",
- "success": true
}Returns all domains registered for an account, including their DNS records, verification status and tracking settings.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
{- "domains": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
- "domain": "string",
- "createdOn": "2019-08-24T14:15:22Z",
- "modifiedOn": "2019-08-24T14:15:22Z",
- "deletedOn": "2019-08-24T14:15:22Z",
- "dnsRecords": [
- {
- "host": "string",
- "type": "string",
- "value": "string",
- "purpose": "string",
- "priority": 0,
- "dnsStatus": "NotStarted"
}
], - "isValid": true,
- "clickTracking": true,
- "openTracking": true,
- "sendingEnabled": true,
- "receivingEnabled": true,
- "status": "NotStarted"
}
], - "status": 200,
- "message": "string",
- "success": true
}Returns the DNS records you must configure for a domain, and whether each record is currently valid.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| domainId required | string <uuid> Identifier (UUID) of the domain, as returned in the |
{- "dnsRecords": [
- {
- "host": "string",
- "type": "string",
- "value": "string",
- "isValid": true,
- "purpose": "string",
- "priority": 0,
- "dnsStatus": "NotStarted"
}
], - "status": 200,
- "message": "string",
- "success": true
}Removes a domain and all of its DNS records from the account.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| domainId required | string <uuid> Identifier (UUID) of the domain, as returned in the |
{- "status": 200,
- "message": "string",
- "success": true
}Enables or disables sending for a domain. The response contains the domain configuration after the change.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| domain required | string Domain name to change the setting for, for example |
| enabled required | boolean Set to |
{- "success": true,
- "status": 200,
- "message": "string",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
- "domain": "string",
- "createdOn": "2019-08-24T14:15:22Z",
- "modifiedOn": "2019-08-24T14:15:22Z",
- "deletedOn": "2019-08-24T14:15:22Z",
- "dnsRecords": [
- {
- "host": "string",
- "type": "string",
- "value": "string",
- "purpose": "string",
- "priority": 0,
- "dnsStatus": "NotStarted"
}
], - "isValid": true,
- "clickTracking": true,
- "openTracking": true,
- "sendingEnabled": true,
- "receivingEnabled": true,
- "status": "NotStarted"
}
]
}Enables or disables receiving for a domain. Receiving requires the MX record of the domain to be verified. The response contains the domain configuration after the change.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| domain required | string Domain name to change the setting for, for example |
| enabled required | boolean Set to |
{- "success": true,
- "status": 200,
- "message": "string",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
- "domain": "string",
- "createdOn": "2019-08-24T14:15:22Z",
- "modifiedOn": "2019-08-24T14:15:22Z",
- "deletedOn": "2019-08-24T14:15:22Z",
- "dnsRecords": [
- {
- "host": "string",
- "type": "string",
- "value": "string",
- "purpose": "string",
- "priority": 0,
- "dnsStatus": "NotStarted"
}
], - "isValid": true,
- "clickTracking": true,
- "openTracking": true,
- "sendingEnabled": true,
- "receivingEnabled": true,
- "status": "NotStarted"
}
]
}Checks the DNS records of a domain against the records that were generated for it and reports whether each record is valid. A domain is ready to send once all of its records are valid. DNS changes can take from a few minutes up to 48 hours to propagate, so run the verification again if records are still reported as invalid.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| domain | string Domain name to verify, for example |
Checks the DNS records of a domain for one capability only: sending (the CNAME records), receiving (the MX record) or all. A record is valid when it is found in DNS with the expected value.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| capability required | string Enum: "sending" "receiving" "all" Which DNS records to verify: |
| domain | string Domain name to verify, for example |
Returns a page of the emails received on your receiving domains. Filter by time range, direction or search text.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| LogTimeRangeType | integer <int32> (Configuration_TimeRangePickerOptions) Enum: 1 2 3 4 5 6 7 8 9 Predefined time range to filter received emails by. Use the custom range option together with |
| Direction | string Filter by direction. |
| SearchText | string Free-text search. |
| StartDate | string <date-time> Required with EndDate when LogTimeRangeType is a custom range. |
| EndDate | string <date-time> End of the time range. Required with StartDate when LogTimeRangeType is a custom range. |
| timezone | string Default: "UTC" IANA time zone used to render timestamps. |
| pageNumber | integer <int32> Default: 1 Page number to return, starting at 1. |
| itemsPerPage | integer <int32> Default: 10 Number of emails to return per page. |
{- "statusCode": 200,
- "message": "string",
- "totalCount": 0,
- "emails": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "from": "string",
- "fromName": "string",
- "toHeader": "string",
- "originalRecipient": "string",
- "subject": "string",
- "receivedAt": "2019-08-24T14:15:22Z",
- "sizeBytes": 0,
- "attachmentCount": 0,
- "direction": "string",
- "attachments": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fileName": "string",
- "contentType": "string",
- "inline": true,
- "contentId": "string",
- "sizeBytes": 0,
- "checksumSha256": "string",
- "truncated": true
}
]
}
]
}Returns the details of one received email, including its headers, body and attachment metadata.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| emailId required | string <uuid> Unique identifier (UUID) of the received email. |
| timezone | string Default: "UTC" IANA time zone used to render timestamps. |
{- "success": true,
- "status": 200,
- "message": "string",
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "direction": "string",
- "rfcMessageId": "string",
- "fromAddress": "string",
- "fromName": "string",
- "toHeader": "string",
- "originalRecipient": "string",
- "subject": "string",
- "sentDate": "2019-08-24T14:15:22Z",
- "receivedAt": "2019-08-24T14:15:22Z",
- "sizeBytes": 0,
- "attachmentCount": 0,
- "inReplyTo": "string",
- "cc": "string",
- "bcc": "string",
- "referencesJson": "string",
- "headers": "string",
- "hasTruncatedAttachment": true,
- "rawContent": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "bodyTextBody": "string",
- "bodyHtmlBody": "string",
- "attachments": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fileName": "string",
- "contentType": "string",
- "inline": true,
- "contentId": "string",
- "sizeBytes": 0,
- "checksumSha256": "string",
- "truncated": true
}
]
}
}Returns the attachments of a received email, including a download URL for each attachment.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| emailId required | string <uuid> Unique identifier (UUID) of the received email. |
{- "success": true,
- "status": 200,
- "message": "string",
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "fileName": "string",
- "contentType": "string",
- "inline": true,
- "contentId": "string",
- "sizeBytes": 0,
- "url": "string",
- "checksumSha256": "string",
- "truncated": true
}
]
}Returns the receiving webhooks of an account. A receiving webhook is called for each email received on a domain.
| logicalAccount required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| domain | string Only return the receiving webhooks for this recipient domain. |
{- "webhookResponse": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "logicalAccountId": "73ba62c4-043d-4691-9699-4381d0ffd86a",
- "webhookUrl": "string",
- "domain": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "usePresignedAttachments": true,
- "presignedUrlExpiryHours": 0
}
], - "status": 200,
- "message": "string",
- "success": true
}Creates a receiving webhook that is called for each email received on a domain. The webhook URL must be an HTTPS URL on port 443.
| logicalAccount required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
The receiving webhook to create.
| webhookUrl | string or null HTTPS URL, port 443. Trailing slash is removed. |
| domain | string or null Recipient domain. Stored lower-case. |
| usePresignedAttachments | boolean or null Send attachments as download links instead of inline base64. Default false. |
| presignedUrlExpiryHours | integer or null <int32> Lifetime of download links in hours. Default 24, effective maximum 168. |
{- "webhookUrl": "string",
- "domain": "string",
- "usePresignedAttachments": true,
- "presignedUrlExpiryHours": 0
}{- "success": true,
- "status": 200,
- "message": "string",
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "logicalAccountId": "73ba62c4-043d-4691-9699-4381d0ffd86a",
- "webhookUrl": "string",
- "domain": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "usePresignedAttachments": true,
- "presignedUrlExpiryHours": 0
}
}Updates a receiving webhook. Only the fields you provide are changed.
| logicalAccount required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
The receiving webhook fields to change.
| id | string <uuid> Identifier (UUID) of the receiving webhook to update. Must not be an empty UUID. |
| resetPresignedUrlExpiryHours | boolean Sets the expiry back to 24. Wins over presignedUrlExpiryHours. |
| webhookUrl | string or null New webhook URL. HTTPS URL, port 443. Trailing slash is removed. Leave out to keep the current URL. |
| domain | string or null New recipient domain. Stored lower-case. Leave out to keep the current domain. |
| usePresignedAttachments | boolean or null Send attachments as download links instead of inline base64. Default false. |
| presignedUrlExpiryHours | integer or null <int32> Lifetime of download links in hours. Default 24, effective maximum 168. |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "resetPresignedUrlExpiryHours": true,
- "webhookUrl": "string",
- "domain": "string",
- "usePresignedAttachments": true,
- "presignedUrlExpiryHours": 0
}{- "webhookResponse": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "logicalAccountId": "73ba62c4-043d-4691-9699-4381d0ffd86a",
- "webhookUrl": "string",
- "domain": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "usePresignedAttachments": true,
- "presignedUrlExpiryHours": 0
}
], - "status": 200,
- "message": "string",
- "success": true
}Deletes a receiving webhook. The response contains the number of deleted rows.
| logicalAccount required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| id required | string <uuid> Identifier (UUID) of the receiving webhook to delete. |
{- "success": true,
- "status": 200,
- "message": "string",
- "data": 0
}Registers a webhook URL for an email event type, such as delivered or bounced. Use the type global to receive all events on one URL. Registering a type that already has a webhook replaces its URL. The response contains the ID of the webhook.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
The event type and the URL to register.
| webhookType | string or null Event type the webhook receives: |
| webhookUrl | string or null HTTPS URL that receives the event notifications. It must be publicly reachable and should respond with a |
{- "webhookType": "string",
- "webhookUrl": "string"
}Returns the webhook configuration of an account.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| all | boolean Default: false Set to |
Deletes the webhook that is registered for an email event type.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| webhookType | string Event type of the webhook to delete: |
Adds recipients to the suppression list, so that emails of the given type are no longer sent to them. A request can contain up to 10 entries.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
The recipients to add to the suppression list. Maximum 10 entries.
| sender | string or null <email> Email address of the sender the suppression applies to. |
| recipient required | string or null <email> Email address of the recipient to suppress. |
| unsubscribeType | integer <int32> Enum: 1 2 3 4 5 6 7 Why the recipient is suppressed: |
| emailType | integer <int32> Enum: 0 1 2 -1 Type of email to suppress: |
[- {
- "unsubscribeType": 1,
- "emailType": 0
}
]{- "success": true,
- "message": "string",
- "status": 200,
- "data": { }
}Searches the unsubscribe list with a set of filters in the request body. Results are paginated.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| timezone | string IANA time zone used to render timestamps. |
| pageSize | integer <int32> Default: 10 Number of results to return per page, from 1 to 100. |
| pageNumber | integer <int32> Default: 1 Page number to return, starting at 1. |
Filters to apply to the unsubscribe list.
| logTimeRangeType | integer <int32> Enum: 1 2 3 4 5 6 7 8 9 Predefined time range to filter by. Use the custom range option together with |
| unsubscribeTypes | string or null Unsubscribe types to include in the results. See the |
| startDate | string or null <date-time> Start of the time range. Used together with |
| endDate | string or null <date-time> End of the time range. Used together with |
| searchEmail | string or null Return only records whose email address contains this text. |
{- "logTimeRangeType": 1,
- "unsubscribeTypes": "string",
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "searchEmail": "string"
}{- "success": true,
- "message": "string",
- "status": 200,
- "data": {
- "count": 0,
- "unsubscribedEmails": [
- {
- "id": 0,
- "messageRequestId": "454f97ec-f0a9-4ec6-8c4a-70b37cae818c",
- "sender": "string",
- "recipient": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "reason": "string",
- "emailType": 0,
- "unsubscribeType": 0,
- "logicalAccount": "900d6e26-27ed-409a-aaf3-fc89317cf87c"
}
]
}
}Returns the suppression list of an account. Filter by recipient email address and email type. Results are paginated, with up to 100 results per page.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
| searchEmail | string Return only suppressions whose recipient email address matches this text. Partial matches are supported. |
| emailType | integer <int32> Default: -1 Filter by email type: |
| pageSize | integer <int32> Default: 10 Number of results to return per page, from 1 to 100. |
| pageNumber | integer <int32> Default: 1 Page number to return, starting at 1. |
{- "success": true,
- "message": "string",
- "status": 200,
- "data": {
- "count": 0,
- "unsubscribedEmails": [
- {
- "id": 0,
- "sender": "string",
- "recipient": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "reason": "string",
- "emailType": 0,
- "unsubscribeType": 0,
- "logicalAccount": "900d6e26-27ed-409a-aaf3-fc89317cf87c",
- "domain": "string",
- "failureCount": 0,
- "expirationDate": "2019-08-24T14:15:22Z"
}
]
}
}Removes several recipients from the suppression list in one request, so that emails of the given type can be sent to them again. Each entry identifies a suppression by sender, recipient and email type.
A suppression is removed only when sender, recipient and email type all match an existing suppression exactly. Entries that match nothing do not fail the request. The response lists them in data.failedRemovals, each with a reason. Check this list even when the response status is 200.
| logicalAccountId required | string <uuid> Identifier (UUID) of the logical account the request applies to. |
The suppressions to remove. The list must contain at least one entry.
| sender required | string <email> Email address of the sender the suppression applies to. Must match the suppression exactly. |
| recipient required | string <email> Email address of the suppressed recipient. Must match the suppression exactly. |
| emailType | integer <int32> Enum: 0 1 2 -1 Type of email the suppression applies to: |
[
]{- "success": true,
- "message": "string",
- "status": 200,
- "data": {
- "failedRemovals": [
]
}
}Unsubscribes a recipient using the unique key from the unsubscribe link in an email. You can optionally provide the reason the recipient gives for unsubscribing.
| uniqueKey required | string <uuid> Unique key (UUID) from the unsubscribe link in the email. |
The reason the recipient gives for unsubscribing.
| unsubscribeReason | string or null Reason the recipient gives for unsubscribing. Optional. |
{- "unsubscribeReason": "string"
}{- "success": true,
- "message": "string",
- "status": 200,
- "data": { }
}