Base Path: /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/attachment
Version: 3.5.0
Attachments are files that you upload to your email message to transfer images and documents to another party. The Communicate Webmail API enables you to upload or download a single file with each request. It respects any system limitations on uploaded files, such as the maximum file size (which is 50 MB) and the permissible file types.
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}/attachment/{attachmentGroupId}
Uploads a file to a message. The following checks are carried out when uploading the file:
Viruses – If a trojan, virus, malware or other malicious threat is detected, your attachment is not saved on the mail server.
File size – The size cannot exceed 50 MB, either as a single file or in aggregate.
File type – To prevent malicious files and other illegal software from being uploaded to the Webmail server, you cannot attach files with the following extensions to your message — ade
, adp
, bat
, chm
, cmd
, com
, cpl
, exe
, hta
, ins
, isp
, jse
, lib
, lnk
, mde
, msc
, msp
, mst
, pif
, scr
, sct
, shb
, sys
, vb
, vbe
, vbs
, vxd
, wsc
, wsf
, wsh
, sh
, js
, tar
, tgz
, taz
, z
, gz
, rar
, bz2
, bz
Name
Type
Data Type
Description
Name:
attachmentGroupId
required
Type:
path
Data Type:
string
Description:
Unique identifier of the group that contains the attachment.
Sample Value: 12
Name:
file
required
Type:
formData
Data Type:
file
Description:
File itself.
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
The file was uploaded successfully.
400
One of the following has occurred:
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/attachment/12" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'file=undefined'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/attachment/{attachmentGroupId}/size
Checks that the total size of all the attachments does not exceed 50 MB.
Name
Type
Data Type
Description
Name:
attachmentGroupId
required
Type:
path
Data Type:
string
Description:
Unique identifier of the group that contains the attachment.
Sample Value: 12
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
If successful, the API responds with:
401
Your API key or access token has expired or is invalid.
404
Cannot find an attachment group with that unique identifier.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/attachment/12/size" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
DELETE /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/attachment/{attachmentGroupId}/{attachmentId}
Stops the upload, and removes the attachment from the message.
Name
Type
Data Type
Description
Name:
attachmentGroupId
required
Type:
path
Data Type:
string
Description:
Unique identifier of the group that contains the attachment.
Sample Value: 12
Name:
attachmentId
required
Type:
path
Data Type:
string
Description:
Unique identifier of the attachment whose upload must be canceled.
Sample Value: 34
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully removed the attachment from the message.
401
Your API key or access token has expired or is invalid.
404
Cannot find an attachment group or attachment with that unique identifier.
curl -X DELETE "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/attachment/12/34" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'