Base Path: /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences
Version: 3.5.0
Preferences make it easy for your subscribers to manage their email by providing them with a centralized place to control how they send and receive messages. You can configure the following settings in your preferences:
Auto-forward: Any message you receive can be automatically forwarded to a group of contacts.
Auto-reply: Automatically respond to your emails when you are away from the office.
Mailbox sharing: Authorize other users to manage your incoming and outgoing mail.
Message rules: Use rules to decide what happens to emails when they arrive. If more than one rule applies to a message, the first rule in the list is used.
Signature: Create a signature that can be automatically appended to the messages you send.
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.
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/
Retrieves the mail settings for a user's personal mailbox.
Name
Type
Data Type
Description
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully retrieved the user's mail preferences.
401
Your API key or access token has expired or is invalid.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
PUT /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/
Updates the mail settings for a user's personal mailbox.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"mailboxAddress": "developer.portal@example.com",
"sharedMailboxes": [],
"autoReplyMessage": "Test auto-reply",
"messageSignature": "signature
",
"filters": [
{
"conditions": [
{
"type": "senderMatches",
"address": "junior@ma.direct.test"
}
],
"actions": [
{
"type": "fileIntoFolder",
"path": "INBOX.AA"
}
]
},
{
"conditions": [
{
"type": "subjectContains",
"searchString": "junior"
}
],
"actions": [
{
"type": "fileIntoFolder",
"path": "Trash"
}
]
}
],
"autoForwardGroup": "24",
"sharedUsers": [
"shared@example.com"
],
"sharingType": "DELEGATED",
"sharedMailboxOn": true,
"autoReplyOn": true,
"messageSignatureOn": true,
"autoForwardOn": true
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully updated the user's mail preferences.
400
Encountered an error while updating the user's mail preferences, because one or more of the following occurred:
We received an unexpected value for autoReplyOn
, autoForwardOn
, messageSignatureOn
or sharedMailboxOn
.
The contactGroupId
is invalid.
The folder name or path is invalid.
One or more Direct email addresses are invalid.
401
Your API key or access token has expired or is invalid.
curl -X PUT "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"mailboxAddress":"developer.portal@example.com","sharedMailboxes":[],"autoReplyMessage":"Test auto-reply","messageSignature":"<p>signature</p>","filters":[{"conditions":[{"type":"senderMatches","address":"junior@ma.direct.test"}],"actions":[{"type":"fileIntoFolder","path":"INBOX.AA"}]},{"conditions":[{"type":"subjectContains","searchString":"junior"}],"actions":[{"type":"fileIntoFolder","path":"Trash"}]}],"autoForwardGroup":"24","sharedUsers":["shared@example.com"],"sharingType":"DELEGATED","sharedMailboxOn":true,"autoReplyOn":true,"messageSignatureOn":true,"autoForwardOn":true}'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/search
Finds users you can share your mailbox with.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"searchString": "search",
"maxResult": 15
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
We found a list of providers that match your search criteria.
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.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/search" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"searchString":"search","maxResult":15}'
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/autoReply
Retrieves the user's automatic reply setting.
Name
Type
Data Type
Description
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully retrieved the user's automatic reply setting.
401
Your API key or access token has expired or is invalid.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/autoReply" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/autoReply
Updates the user's automatic reply setting.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"autoReplyOn": true,
"autoReplyMessage": "I am not in office"
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully updated the user's automatic reply setting.
400
Encountered an error while updating the user's automatic reply setting, because we received an unexpected value for autoReplyOn
.
401
Your API key or access token has expired or is invalid.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/autoReply" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"autoReplyOn":true,"autoReplyMessage":"I am not in office"}'
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/autoForward
Retrieves the user's automatic forward setting.
Name
Type
Data Type
Description
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully retrieved the user's automatic forward setting.
401
Your API key or access token has expired or is invalid.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/autoForward" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/autoForward
Updates the user's automatic forward setting.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"autoForwardOn": true,
"autoForwardGroup": 7
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully updated the user's automatic forward setting.
400
Encountered an error while updating the user's automatic forward setting, either because we received an unexpected value for autoForwardOn
, or the contactGroupId
is invalid.
401
Your API key or access token has expired or is invalid.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/autoForward" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"autoForwardOn":true,"autoForwardGroup":7}'
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/messageSignature
Retrieves the user's personalized signature.
Name
Type
Data Type
Description
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully retrieved the user's signature.
401
Your API key or access token has expired or is invalid.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/messageSignature" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/messageSignature
Updates the user's personalized signature.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"messageSignatureOn": true,
"messageSignature": "Example Signature"
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully updated the user's signature.
400
Encountered an error while updating the user's signature, because we received an unexpected value for messageSignatureOn
.
401
Your API key or access token has expired or is invalid.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/messageSignature" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"messageSignatureOn":true,"messageSignature":"Example Signature"}'
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/messageRules
Retrieves the rules for the user's personal mailbox. Rules are used to take actions such as moving a message to a specified folder, or deleting a message.
Name
Type
Data Type
Description
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully retrieved the rules for the specified mailbox.
401
Your API key or access token has expired or is invalid.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/messageRules" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/messageRules
Updates the rules for the user's personal mailbox.
Name
Type
Data Type
Description
Name:
body
optional
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"filters": [
{
"conditions": [
{
"type": "senderMatches",
"address": "dsa@dsa"
}
],
"actions": [
{
"type": "fileIntoFolder",
"path": "INBOX.sender"
}
]
},
{
"conditions": [
{
"type": "subjectContains",
"searchString": "sa"
}
],
"actions": [
{
"type": "fileIntoFolder",
"path": "INBOX.subject"
}
]
}
]
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully updated the rules for the specified mailbox.
400
Encountered an error while updating the rules for the specified mailbox, because the folder name or path is invalid.
401
Your API key or access token has expired or is invalid.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/messageRules" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"filters":[{"conditions":[{"type":"senderMatches","address":"dsa@dsa"}],"actions":[{"type":"fileIntoFolder","path":"INBOX.sender"}]},{"conditions":[{"type":"subjectContains","searchString":"sa"}],"actions":[{"type":"fileIntoFolder","path":"INBOX.subject"}]}]}'
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/mailboxSharing
Retrieves the mailbox sharing preferences of the user.
Name
Type
Data Type
Description
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully retrieved the mailbox sharing setting for the specified account.
401
Your API key or access token has expired or is invalid.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/mailboxSharing" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/preferences/mailboxSharing
Updates the mailbox sharing preferences of the user.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"sharedMailboxOn": true,
"sharedUsers": [
"Shared User "
]
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully updated the mailbox sharing setting for the specified account.
400
Encountered an error while updating the user's mailbox sharing preference, either because we received an unexpected value for sharedMailboxOn
, or one of the Direct email addresses is invalid.
401
Your API key or access token has expired or is invalid.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/preferences/mailboxSharing" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"sharedMailboxOn":true,"sharedUsers":["Shared User <shared.user@example.com>"]}'