An Electronic Mail Message
Object definition
View properties and constraints defined on the object
POST Create email
Create a new Email
POST /emails
Required parameters
| Name /type | Description /example | Constraints |
|---|---|---|
| subject string | The email's subject "Oh hai there" | |
| body object | {
"text": "How you doing?",
"html": "Check this out <br> <img src=\"http://i.ytimg.com/vi/J---aiyznGQ/hqdefault.jpg\" alt=\"Logo\" title=\"Logo\" style=\"display:block\" width=\"200\" height=\"87\" />"
} | |
| to object | {
"address": "dog@example.com",
"name": "Mr Dog"
} |
Optional parameters
| Name /type | Description /example | Constraints |
|---|---|---|
| from object | {
"address": "cat@example.com",
"name": "Keyboard Cat"
} |
cURL
curl -X POST "https://localhost:3000/v1/emails" \
-H "Content-Type: application/json" \
--data '{"subject":"Oh hai there","body":{"text":"How you doing?","html":"Check this out <br> <img src=\"http://i.ytimg.com/vi/J---aiyznGQ/hqdefault.jpg\" alt=\"Logo\" title=\"Logo\" style=\"display:block\" width=\"200\" height=\"87\" />"},"to":{"address":"dog@example.com","name":"Mr Dog"},"from":{"address":"cat@example.com","name":"Keyboard Cat"}}'Response
{
"subject": "Oh hai there",
"body": {
"text": "How you doing?",
"html": "Check this out <br> <img src=\"http://i.ytimg.com/vi/J---aiyznGQ/hqdefault.jpg\" alt=\"Logo\" title=\"Logo\" style=\"display:block\" width=\"200\" height=\"87\" />"
},
"to": {
"address": "dog@example.com",
"name": "Mr Dog"
},
"from": {
"address": "cat@example.com",
"name": "Keyboard Cat"
}
}