{"__v":0,"_id":"581eb9d5a1ae5219000ef8ae","category":{"__v":0,"_id":"57f53fb368a53b2000e03f0f","project":"5588b8a2f6c18d0d005bba03","version":"5588b8a2f6c18d0d005bba06","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-10-05T18:00:19.547Z","from_sync":false,"order":0,"slug":"api","title":"REST API"},"parentDoc":null,"project":"5588b8a2f6c18d0d005bba03","user":"5588b847f6c18d0d005bba01","version":{"__v":14,"_id":"5588b8a2f6c18d0d005bba06","project":"5588b8a2f6c18d0d005bba03","createdAt":"2015-06-23T01:38:42.696Z","releaseDate":"2015-06-23T01:38:42.696Z","categories":["5588b8a3f6c18d0d005bba07","5588e9689cfea70d00371df3","5588f5921163180d00b64704","561598b121e9110d0078025a","5616f1c9d170d00d00189306","5616f5c3a410c90d00c6121e","561803dcf8c9632100ac7592","563667280441020d0000e9eb","5642570d9417b40d00c0fcd3","57bf5f02efe0050e00d50bd5","57f53fb368a53b2000e03f0f","57f55187440418170086325a","582e3afa72fd270f0006926d","5841faa973967b0f004b4a2b"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-11-06T05:04:21.415Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl --header \"X-API-Token: <your token>\" https://api.mixmax.com/v1/messages","language":"curl"}]},"method":"get","results":{"codes":[{"name":"","code":"{\n  \"results\": [{\n    \"_id\": \"lAh716dny9EiTzt2E\",\n    \"userId\": \"kZYPwDDiGPTfQDj5n\",\n    \"created\": 1478284647090,\n    \"trackingEnabled\": true,\n    \"linkTrackingEnabled\": false,\n    \"notificationsEnabled\": false,\n    \"from\": {\n      \"email\": \"hello:::at:::mixmax.com\",\n      \"name\": \"Mixmax Hello\"\n    },\n    \"teamIds\": [],\n    \"updatedAt\": 1478285662022,\n    \"body\": \"<p data-m-revert-to-text=\\\"http://developer.mixmax.com/docs/getting-started\\\" data-m-id=\\\"WH\\\"><br></p><p data-m-revert-to-text=\\\"http://developer.mixmax.com/docs/getting-started\\\" data-m-id=\\\"tu\\\"><br></p>\",\n    \"subject\": \"Introduction: Integration API · Mixmax Developer\"\n  }, {\n    \"_id\": \"8BhHIZ58pkR3S8WSF\",\n    \"userId\": \"kZYPwDDiGPTfQDj5n\",\n    \"created\": 1477466076086,\n    \"trackingEnabled\": true,\n    \"linkTrackingEnabled\": false,\n    \"notificationsEnabled\": false,\n    \"from\": {\n      \"email\": \"hello@mixmax.com\",\n      \"name\": \"Mixmax Hello\"\n    },\n    \"updatedAt\": 1477535660548,\n    \"to\": [{\n      \"email\": \"careers@mixmax.com\",\n      \"name\": \"Mixmax Careers\"\n    }],\n    \"subject\": \"I want to apply!\",\n    \"attachments\": [],\n    \"followUp\": {},\n    \"teamIds\": null,\n    \"sent\": 1477535699539\n  }]\n}","language":"json","status":200}]},"settings":"","auth":"required","params":[],"url":"/v1/messages"},"isReference":true,"order":42,"body":"\"Messages\" represent emails sent via Mixmax that are sent using the Mixmax compose window or automatically using the Sequences feature.\n\nMessages can be in the following states:\n* **Draft**: If the message has the `body` property but not `sendingError`, then it's still in draft and hasn't been sent.\n* **Attempted to send but with error**: If the message has the the `sendingError` property but not `sent` property.\n* **Sent**: If the message has the `sent` property, then it has been successfully sent.\n* **Scheduled**: If the message has the `scheduled` property, then it is scheduled to send at that timestamp.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"_id\",\n    \"0-1\": \"*String*\",\n    \"0-2\": \"Unique ID\",\n    \"2-0\": \"created\",\n    \"2-1\": \"*Timestamp*\",\n    \"2-2\": \"When the message was first created as a draft\",\n    \"3-0\": \"updatedAt\",\n    \"3-1\": \"*Timestamp*\",\n    \"3-2\": \"When the message was last modified (usually when it was last saved as a draft)\",\n    \"4-0\": \"from\",\n    \"4-1\": \"*Object*\",\n    \"4-2\": \"\\\"From\\\" address. This is one of your email addresses.\",\n    \"1-0\": \"userId\",\n    \"1-1\": \"*String*\",\n    \"1-2\": \"Your user id\",\n    \"5-0\": \"from.email\",\n    \"5-1\": \"*String*\",\n    \"5-2\": \"Email of 'from' address\",\n    \"6-0\": \"from.name\",\n    \"6-1\": \"*String*\",\n    \"6-2\": \"Name of 'from' address\",\n    \"7-0\": \"to\",\n    \"7-1\": \"*Array*\",\n    \"7-2\": \"Recipients of message in the 'to' field\",\n    \"8-0\": \"to.email\",\n    \"8-1\": \"*String*\",\n    \"8-2\": \"Email of the 'to' address\",\n    \"9-0\": \"to.name\",\n    \"9-1\": \"*String*\",\n    \"9-2\": \"Name of the 'to' address, if it exists\",\n    \"10-0\": \"cc\",\n    \"10-1\": \"*Array*\",\n    \"10-2\": \"Recipients of message in the 'cc' field, if specified\",\n    \"11-0\": \"cc.email\",\n    \"11-1\": \"*String*\",\n    \"11-2\": \"Email of the 'cc' address\",\n    \"12-0\": \"cc.name\",\n    \"12-1\": \"*String*\",\n    \"12-2\": \"Name of the 'cc' address, if it exists\",\n    \"13-0\": \"bcc\",\n    \"13-1\": \"*Array*\",\n    \"13-2\": \"Recipients of message in the 'bcc' field, if specified\",\n    \"14-0\": \"bcc.email\",\n    \"14-1\": \"*String*\",\n    \"14-2\": \"Email of the 'bcc' address\",\n    \"15-0\": \"bcc.name\",\n    \"15-1\": \"*String*\",\n    \"15-2\": \"Name of the 'cc' address, if it exists\",\n    \"16-0\": \"subject\",\n    \"16-1\": \"*String*\",\n    \"16-2\": \"Subject of the message\",\n    \"17-0\": \"trackingEnabled\",\n    \"17-1\": \"*Boolean*\",\n    \"17-2\": \"True if email tracking is enabled for this message\",\n    \"18-0\": \"linkTrackingEnabled\",\n    \"18-1\": \"*Boolean*\",\n    \"18-2\": \"True if this message has link tracking enabled\",\n    \"19-0\": \"notificationsEnabled\",\n    \"19-1\": \"*Boolean*\",\n    \"19-2\": \"True if this message has \\\"Desktop notifications\\\" enabled\",\n    \"20-0\": \"teamIds\",\n    \"20-1\": \"*Array*\",\n    \"20-2\": \"Array of team ids that email tracking results are synced to\",\n    \"21-0\": \"followUp\",\n    \"21-1\": \"*Object*\",\n    \"21-2\": \"Exists if a reminder was set for this message\",\n    \"22-0\": \"followUp.unparsedDate\",\n    \"22-1\": \"*String*\",\n    \"23-0\": \"followUp.trigger\",\n    \"24-0\": \"followUp.description\",\n    \"23-1\": \"*String*\",\n    \"24-1\": \"*String*\",\n    \"23-2\": \"One of `noReply`, `notRead`, or `regardless`\",\n    \"22-2\": \"Text that was typed into the date field, e.g. \\\"In 2 days\\\"\",\n    \"24-2\": \"Note for the followup, if there was one\",\n    \"25-0\": \"attachments\",\n    \"25-1\": \"*Array*\",\n    \"25-2\": \"Array of[ \\\"traditional\\\" attachments](http://success.mixmax.com/article/44-traditional-attachments)\",\n    \"26-0\": \"attachments.name\",\n    \"26-1\": \"*String*\",\n    \"26-2\": \"Filename of the attachment\",\n    \"27-0\": \"attachments.type\",\n    \"27-1\": \"*String*\",\n    \"27-2\": \"Mimetype of the attachment, if known.\",\n    \"28-0\": \"attachments.size\",\n    \"28-1\": \"*Number*\",\n    \"28-2\": \"The size of the file in bytes, if known.\",\n    \"29-0\": \"snippetIds\",\n    \"29-1\": \"*Array*\",\n    \"29-2\": \"Array of snippet (template) ids that were used in this message.\",\n    \"34-0\": \"body\",\n    \"36-0\": \"sent\",\n    \"36-1\": \"*Timestamp*\",\n    \"37-0\": \"sendingError\",\n    \"37-1\": \"*String*\",\n    \"37-2\": \"Indicates that the message failed to send.\",\n    \"38-0\": \"errorResponse\",\n    \"38-1\": \"*String*\",\n    \"36-2\": \"Date the message was sent successfully. If this exists, you can assume the message was sent properly.\",\n    \"34-1\": \"*String*\",\n    \"34-2\": \"HTML body of the message. Won't exist if `sent` property exists, as Mixmax forgets about the message body after it is sent.\",\n    \"38-2\": \"Will exist only if `sendingError` exists. Contains the raw error response from the SMTP server, if the error was due to a SMTP failure.\",\n    \"30-0\": \"sequence\",\n    \"30-1\": \"*Object*\",\n    \"30-2\": \"If this message was sent automatically as a sequence, this will have details about that sequence.\",\n    \"31-0\": \"sequence.id\",\n    \"31-1\": \"*String*\",\n    \"32-0\": \"sequence.stageId\",\n    \"33-0\": \"sequence.recipientId\",\n    \"32-1\": \"*String*\",\n    \"33-1\": \"*String*\",\n    \"31-2\": \"ID of the sequence that triggered this message\",\n    \"32-2\": \"ID of the sequence stage that triggered this message\",\n    \"33-2\": \"ID of the sequence recipient that triggered this message\",\n    \"35-0\": \"scheduled\",\n    \"35-1\": \"*Timestamp*\",\n    \"35-2\": \"If this message is scheduled to send (and has not send yet), this is the timestamp of when it will send.\"\n  },\n  \"cols\": 3,\n  \"rows\": 39\n}\n[/block]","excerpt":"Returns messages (emails) that are in draft, have been scheduled to send, or have been sent.","slug":"messages","type":"endpoint","title":"/messages"}

get/messages

Returns messages (emails) that are in draft, have been scheduled to send, or have been sent.

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format


Documentation

"Messages" represent emails sent via Mixmax that are sent using the Mixmax compose window or automatically using the Sequences feature. Messages can be in the following states: * **Draft**: If the message has the `body` property but not `sendingError`, then it's still in draft and hasn't been sent. * **Attempted to send but with error**: If the message has the the `sendingError` property but not `sent` property. * **Sent**: If the message has the `sent` property, then it has been successfully sent. * **Scheduled**: If the message has the `scheduled` property, then it is scheduled to send at that timestamp. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "_id", "0-1": "*String*", "0-2": "Unique ID", "2-0": "created", "2-1": "*Timestamp*", "2-2": "When the message was first created as a draft", "3-0": "updatedAt", "3-1": "*Timestamp*", "3-2": "When the message was last modified (usually when it was last saved as a draft)", "4-0": "from", "4-1": "*Object*", "4-2": "\"From\" address. This is one of your email addresses.", "1-0": "userId", "1-1": "*String*", "1-2": "Your user id", "5-0": "from.email", "5-1": "*String*", "5-2": "Email of 'from' address", "6-0": "from.name", "6-1": "*String*", "6-2": "Name of 'from' address", "7-0": "to", "7-1": "*Array*", "7-2": "Recipients of message in the 'to' field", "8-0": "to.email", "8-1": "*String*", "8-2": "Email of the 'to' address", "9-0": "to.name", "9-1": "*String*", "9-2": "Name of the 'to' address, if it exists", "10-0": "cc", "10-1": "*Array*", "10-2": "Recipients of message in the 'cc' field, if specified", "11-0": "cc.email", "11-1": "*String*", "11-2": "Email of the 'cc' address", "12-0": "cc.name", "12-1": "*String*", "12-2": "Name of the 'cc' address, if it exists", "13-0": "bcc", "13-1": "*Array*", "13-2": "Recipients of message in the 'bcc' field, if specified", "14-0": "bcc.email", "14-1": "*String*", "14-2": "Email of the 'bcc' address", "15-0": "bcc.name", "15-1": "*String*", "15-2": "Name of the 'cc' address, if it exists", "16-0": "subject", "16-1": "*String*", "16-2": "Subject of the message", "17-0": "trackingEnabled", "17-1": "*Boolean*", "17-2": "True if email tracking is enabled for this message", "18-0": "linkTrackingEnabled", "18-1": "*Boolean*", "18-2": "True if this message has link tracking enabled", "19-0": "notificationsEnabled", "19-1": "*Boolean*", "19-2": "True if this message has \"Desktop notifications\" enabled", "20-0": "teamIds", "20-1": "*Array*", "20-2": "Array of team ids that email tracking results are synced to", "21-0": "followUp", "21-1": "*Object*", "21-2": "Exists if a reminder was set for this message", "22-0": "followUp.unparsedDate", "22-1": "*String*", "23-0": "followUp.trigger", "24-0": "followUp.description", "23-1": "*String*", "24-1": "*String*", "23-2": "One of `noReply`, `notRead`, or `regardless`", "22-2": "Text that was typed into the date field, e.g. \"In 2 days\"", "24-2": "Note for the followup, if there was one", "25-0": "attachments", "25-1": "*Array*", "25-2": "Array of[ \"traditional\" attachments](http://success.mixmax.com/article/44-traditional-attachments)", "26-0": "attachments.name", "26-1": "*String*", "26-2": "Filename of the attachment", "27-0": "attachments.type", "27-1": "*String*", "27-2": "Mimetype of the attachment, if known.", "28-0": "attachments.size", "28-1": "*Number*", "28-2": "The size of the file in bytes, if known.", "29-0": "snippetIds", "29-1": "*Array*", "29-2": "Array of snippet (template) ids that were used in this message.", "34-0": "body", "36-0": "sent", "36-1": "*Timestamp*", "37-0": "sendingError", "37-1": "*String*", "37-2": "Indicates that the message failed to send.", "38-0": "errorResponse", "38-1": "*String*", "36-2": "Date the message was sent successfully. If this exists, you can assume the message was sent properly.", "34-1": "*String*", "34-2": "HTML body of the message. Won't exist if `sent` property exists, as Mixmax forgets about the message body after it is sent.", "38-2": "Will exist only if `sendingError` exists. Contains the raw error response from the SMTP server, if the error was due to a SMTP failure.", "30-0": "sequence", "30-1": "*Object*", "30-2": "If this message was sent automatically as a sequence, this will have details about that sequence.", "31-0": "sequence.id", "31-1": "*String*", "32-0": "sequence.stageId", "33-0": "sequence.recipientId", "32-1": "*String*", "33-1": "*String*", "31-2": "ID of the sequence that triggered this message", "32-2": "ID of the sequence stage that triggered this message", "33-2": "ID of the sequence recipient that triggered this message", "35-0": "scheduled", "35-1": "*Timestamp*", "35-2": "If this message is scheduled to send (and has not send yet), this is the timestamp of when it will send." }, "cols": 3, "rows": 39 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}