{"_id":"58c9c083726a2a19002bfdcd","__v":6,"parentDoc":null,"project":"5588b8a2f6c18d0d005bba03","category":{"_id":"57f53fb368a53b2000e03f0f","version":"5588b8a2f6c18d0d005bba06","project":"5588b8a2f6c18d0d005bba03","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-10-05T18:00:19.547Z","from_sync":false,"order":0,"slug":"api","title":"REST API"},"version":{"_id":"5588b8a2f6c18d0d005bba06","project":"5588b8a2f6c18d0d005bba03","__v":15,"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","58db348aa32c8419002433bb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"5588b847f6c18d0d005bba01","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-03-15T22:30:27.900Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -X POST --header \"X-API-Token: <your token>\" --header \"Content-Type: application/json\" -d '{\n\t\"message\": {\n\t\t\"to\": \"myrecipient:::at:::example.com,another@gmail.com\",\n\t\t\"cc\": \"mycc@example.com,anothercc@gmail.com\",\n    \"bcc\": \"mybcc@example.com,anotherbcc@gmail.com\",\n\t\t\"from\": \"hello@mixmax.com\",\n\t\t\"subject\": \"This is my subject\",\n\t\t\"html\": \"<p>Hello World</p>\"\n\t}\n}' \"https://api.mixmax.com/v1/send/\"","language":"curl"}]},"method":"post","results":{"codes":[{"code":"","name":"","status":200,"language":"json"}]},"settings":"","auth":"required","params":[{"_id":"58c9c82ccffe542300df650a","ref":"","in":"body","required":false,"desc":"(Required) Object containing the fields of the message (to, subject, html, etc.)","default":"","type":"object","name":"message"},{"_id":"58c9c82ccffe542300df6509","ref":"","in":"body","required":false,"desc":"(At least one of message.to, message.cc, message.bcc must contain a valid email address). Comma-separated list of recipient emails that will be used in the \"to\" field of the gmail message. Alternatively, you can pass an Array of Objects of the form `{ name: \"First Last\", address: \"example@mixmax.com\" }` to specify the name of each recipient.","default":"\"\"","type":"string","name":"message.to"},{"_id":"58c9c82ccffe542300df6508","ref":"","in":"body","required":false,"desc":"Same as message.to except this will be used in the \"cc\" field of the gmail message.","default":"\"\"","type":"string","name":"message.cc"},{"_id":"58c9c83bfa6c4b0f0031b899","ref":"","in":"body","required":false,"desc":"Same as message.to except this will be used in the \"bcc\" field of the gmail message.","default":"\"\"","type":"string","name":"message.bcc"},{"_id":"58c9c92ac108331b00c1fa9f","ref":"","in":"body","required":false,"desc":"(Optional) Subject of the gmail message","default":"\"\"","type":"string","name":"message.subject"},{"_id":"58c9c92ac108331b00c1fa9e","ref":"","in":"body","required":false,"desc":"(Optional) HTML body of the gmail message.","default":"\"\"","type":"string","name":"message.html"},{"_id":"58c9e71f04807f0f007fa7ed","ref":"","in":"body","required":false,"desc":"(Optional) The sender's email. If empty, will determine the email from the API Token","default":"Email associated with the api token","type":"string","name":"message.from"}],"url":"/v1/send"},"isReference":true,"order":102,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"See [Incoming Webhooks](http://success.mixmax.com/article/205-incoming-webhooks) that allow you to easily send an email without writing code\",\n  \"title\": \"Have you seen Incoming Webhooks?\"\n}\n[/block]\nMessages sent using this API do not integrate with the rest of the Mixmax platform (i.e. won't have features like smart variables, tracking, etc.)","excerpt":"Sends a Gmail message using the user's Gmail account.","slug":"send-post","type":"endpoint","title":"/send"}

post/send

Sends a Gmail message using the user's Gmail account.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

message:
object
(Required) Object containing the fields of the message (to, subject, html, etc.)
message.to:
string""
(At least one of message.to, message.cc, message.bcc must contain a valid email address). Comma-separated list of recipient emails that will be used in the "to" field of the gmail message. Alternatively, you can pass an Array of Objects of the form `{ name: "First Last", address: "example@mixmax.com" }` to specify the name of each recipient.
message.cc:
string""
Same as message.to except this will be used in the "cc" field of the gmail message.
message.bcc:
string""
Same as message.to except this will be used in the "bcc" field of the gmail message.
message.subject:
string""
(Optional) Subject of the gmail message
message.html:
string""
(Optional) HTML body of the gmail message.
message.from:
stringEmail associated with the api token
(Optional) The sender's email. If empty, will determine the email from the API Token

Examples


Documentation

[block:callout] { "type": "info", "body": "See [Incoming Webhooks](http://success.mixmax.com/article/205-incoming-webhooks) that allow you to easily send an email without writing code", "title": "Have you seen Incoming Webhooks?" } [/block] Messages sent using this API do not integrate with the rest of the Mixmax platform (i.e. won't have features like smart variables, tracking, etc.)

User Information

Try It Out

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