SMTP API

This API is only for transactional emails.
Version 1.1

deprecated


Send a transactional message

For upload attachments use: Content-Type: multipart/form-data


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
html_content 0 1 HTML Content? body boolean (form-data: int(1))
subject Example Text null Subject body string(100)
sender_email company@example.com null Sender Email body string(100)
sender_name Company null Sender Name body string(100)
plan_time 2016-06-22T10:46:06+02:00 null Scheduled Time body ISO8601
recipients empty Recipients body array
recipients: email john.doe@example.com null Recipient Email body string(100)
recipients: cm_add 1 0 Add subscriber to client's profile body boolean (form-data: int(1))
content <html></html> null Content Body body string
attachment-{n} null Attachments body form-data file(max. 10MB total size)
Request Example:
Example Request URL:
https://smtpapi.clevermonitor.com/v1.1/message
Response Parameters:
Name Data Type Reference Description
message_id string(38) Message Id
html_content boolean HTML Content?
status int(3) transaction_status Status
create_time ISO8601 Time of Creation
subject string(100) Subject
sender_email string(100) Sender Email
sender_name string(100) Sender_name
plan_time ISO8601 Plan Time
attachments array Attachments
attachments: filename string File Name
attachments: mimetype string MIME Type
attachments: crc string(md5) Checksum
recipient array Recipient
recipient: email string(100) Recipient Email
recipient: added integer(3) record_status Recipient added to client's profile
Response Messages:
Code Status Example Body
200 OK
[
    {
        "message_id": "98de1ab8-f32b-d71b-da62-728a278fab20",
        "html_content": true,
        "status": 2,
        "create_time": "2016-06-22T13:32:08+02:00",
        "subject": "My Transaction Message",
        "sender_email": "company@example.com",
        "sender_name": "Company",
        "plan_time": "2016-06-22T12:17:09+02:00",
        "attachments": [
            {
                "filename": "file.csv",
                "mimetype": "text\/plain",
                "crc": "b1058951ec1d5bd6cc24f0f06f019361"
            },
            {
                "filename": "image.jpg",
                "mimetype": "image\/jpeg",
                "crc": "a5faac3674647ce33f6e815b33333de8"
            },
            {
                "filename": "document.pdf",
                "mimetype": "application\/pdf",
                "crc": "12fe0c3e7618a461c8d19ec5e0fc767a"
            }
        ],
        "recipient": {
            "email": "john.doe@example.com",
            "added": 202
        }
    }
]

Overview of planned messages


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
count 100 100 Record Limit query integer(max. 100)
offset 0 0 Record Offset query integer
Example Request URL:
https://smtpapi.clevermonitor.com/v1.1/message/overview/plan
Response Parameters:
Name Data Type Reference Description
message_id string(38) Message Id
status integer(2) transaction_status Status
create_time ISO8601 Time of Creation
subject string(100) Subject
sender_email string(100) Sender Email
sender_name string(100) Sender Name
plan_time ISO8601 Scheduled Time
recipient string(100) Recipient Email
html_content boolean HTML Content?
Response Messages:
Code Status Example Body
200 OK
[
    {
        "message_id": "8f9c6f4a-853e-f466-1e24-725421bfaa5f",
        "status": 2,
        "create_time": "2016-06-21T12:30:01+02:00",
        "subject": "My Transaction Email",
        "sender_email": "company@example.com",
        "sender_name": "MyCompany",
        "plan_time": "2016-07-21T12:30:01+02:00",
        "recipient": "john.doe@example.com",
        "html_content": true
    },
    {
        "message_id": "d698a386-0a73-9a58-4048-c648f5152760",
        "status": 2,
        "create_time": "2016-06-21T12:30:04+02:00",
        "subject": "My Second Transaction Email",
        "sender_email": "company@example.com",
        "sender_name": "MyCompany",
        "plan_time": "2016-06-21T12:30:01+02:00",
        "recipient": "mike.johnson@example.com",
        "html_content": true
    }
]

Message detail


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
id 386d0815-885d-d18a-a9e9-4e723a521b63 null Message Id path string(38)
Example Request URL:
https://smtpapi.clevermonitor.com/v1.1/message/386d0815-885d-d18a-a9e9-4e723a521b63
Response Parameters:
Name Data Type Reference Description
message_id string(38) Message Id
status integer(2) transaction_status Status
subject string(100) Subject
sender_email string(100) Sender Email
sender_name string(100) Sender Name
plan_time ISO8601 Scheduled Time
recipient string(100) Recipient Email
send_time ISO8601 Time of Sending
open_last ISO8601 Open Last
opens_total integer(5) Opens Total
click_last ISO8601 Click Last
clicks_unique integer(5) Clicks Unique
clicks_total integer(5) Clicks Total
undelivered ISO8601 Undelivered
unsubscribed ISO8601 Unsubscribed
spam ISO8601 Spam
domain string(100) Domain
Response Messages:
Code Status Example Body
200 OK
{
    "message_id": "507a8639-2d52-a867-57c8-3f219d6ea8e8",
    "status": 11,
    "subject": "My Transaction Email",
    "sender_email": "company@example.com",
    "sender_name": "MyCompany",
    "plan_time": null,
    "recipient": "john.doe@example.com",
    "send_time": null,
    "open_last": null,
    "opens_total": 0,
    "click_last": null,
    "clicks_unique": 0,
    "clicks_total": 0,
    "undelivered": null,
    "unsubscribed": null,
    "spam": null,
    "domain": "example.com"
}

Message content


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
id 386d0815-885d-d18a-a9e9-4e723a521b63 null Message Id path string(38)
Example Request URL:
https://smtpapi.clevermonitor.com/v1.1/message/386d0815-885d-d18a-a9e9-4e723a521b63/content
Response Parameters:
Name Data Type Reference Description
message_id string(38) Message Id
status integer(2) transaction_status Status
plan_time ISO8601 Plan Time
send_time ISO8601 Time of sending
html_content boolean HTML Content?
content string Content Body
Response Messages:
Code Status Example Body
200 OK
{
    "message_id": "8f9c6f4a-853e-f466-1e24-725421bfaa5f",
    "status": 2,
    "plan_time": "2016-07-21T12:30:01+02:00",
    "send_time": null,
    "html_content": true,
    "content": "<html><\/html>"
}

Change of scheduling a message


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
id 386d0815-885d-d18a-a9e9-4e723a521b63 null Message Id path string(38)
plan_time 2016-06-21T14:57:16+02:00 null Scheduled Time body ISO8601
Request Example:
{
    "plan_time": "2016-07-21T12:30:01+02:00"
}
Example Request URL:
https://smtpapi.clevermonitor.com/v1.1/message/386d0815-885d-d18a-a9e9-4e723a521b63/plan
Response Parameters:
Name Data Type Reference Description
message_id string(38) Message Id
status integer(2) transaction_status Status
plan_time ISO8601 Scheduled Time
Response Messages:
Code Status Example Body
200 OK
{
    "message_id": "507a8639-2d52-a867-57c8-3f219d6ea8e8",
    "status": 2,
    "plan_time": "2016-07-21T12:30:01+02:00"
}

Cancel a plan


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
id 386d0815-885d-d18a-a9e9-4e723a521b63 null Message Id path string(38)
Example Request URL:
https://smtpapi.clevermonitor.com/v1.1/message/386d0815-885d-d18a-a9e9-4e723a521b63/plan
Response Parameters:
Name Data Type Reference Description
message_id string(38) Message Id
status integer(2) transaction_status Status
Response Messages:
Code Status Example Body
200 OK
{
    "message_id": "507a8639-2d52-a867-57c8-3f219d6ea8e8",
    "status": 2
}

Delete a message


Request Parameters:
Name Example Value Default Value Description Type Data Type Required
id 386d0815-885d-d18a-a9e9-4e723a521b63 null Message Id path string(38)
Example Request URL:
https://smtpapi.clevermonitor.com/v1.1/message/386d0815-885d-d18a-a9e9-4e723a521b63
Response Parameters:
Name Data Type Reference Description
message_id string(38) Message Id
Response Messages:
Code Status Example Body
200 OK
{
    "message_id": "507a8639-2d52-a867-57c8-3f219d6ea8e8"
}

Copyright © CleverMonitor, 2017