Base Path: /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/outbox
Version: 3.5.0
The Outbox API sends, replies or forwards a message.
Authorization: OAuth 2.0 Bearer token is required to access the resources of this API. Once signed up, credentials and URL to access the OAuth API can be found on My Apps Page.
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/outbox/
Sends a message. Also used to reply to a single recipient, reply to all recipients and forward a message. The body of the message can be in plain text or HTML or both.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"to": [
{
"name": null,
"address": "example@example.com"
}
],
"cc": [],
"subject": "Test",
"draft": true,
"priority": "low",
"attachmentGroupId": "file_group_yui_3_17_2_1_1437101906759_172",
"attachmentInfo": [],
"transferOfCare": false,
"content": {
"alternatives": [
{
"contentType": "text/html",
"value": "test
"
},
{
"contentType": "text/plain",
"value": "test"
}
]
},
"draftMessageDescriptor": {
"folderDescriptor": {
"mailboxDescriptor": {
"providerIdentifier": "DIRECT",
"mailboxIdentifier": "developer.portal@example.com",
"mailboxName": null,
"shared": false,
"sharingType": null
},
"path": "Drafts",
"role": "DRAFTS"
},
"messageUid": "11"
},
"patientIdentifier": null,
"ccdaTransmission": false
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
204
Successfully sent the message. There is no additional content to return in the body of the response.
400
Your request was invalid. A parameter, or the data in a parameter, may be incorrect.
401
Your API key or access token has expired or is invalid.
404
Cannot retrieve one or more message attachments.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/outbox/" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"to":[{"name":null,"address":"example@example.com"}],"cc":[],"subject":"Test","draft":true,"priority":"low","attachmentGroupId":"file_group_yui_3_17_2_1_1437101906759_172","attachmentInfo":[],"transferOfCare":false,"content":{"alternatives":[{"contentType":"text/html","value":"<p>test</p>"},{"contentType":"text/plain","value":"test"}]},"draftMessageDescriptor":{"folderDescriptor":{"mailboxDescriptor":{"providerIdentifier":"DIRECT","mailboxIdentifier":"developer.portal@example.com","mailboxName":null,"shared":false,"sharingType":null},"path":"Drafts","role":"DRAFTS"},"messageUid":"11"},"patientIdentifier":null,"ccdaTransmission":false}'