- Mailbox API – Authentication and Authorization
- Mailbox API – Schemas
- Mailbox API – Versioning
- Mailbox API – Account
- Mailbox API – Account Settings
- Mailbox API – Account Filters
- Mailbox API – Folders
- Mailbox API – Mails
- Mailbox API – Mails Create and Send
- Mailbox API – Mails Search
- Mailbox API – Mails Counters
- Mailbox API – BIMI
- Mailbox API – Conversations
- Mailbox API – Labels
- Mailbox API – Contacts
- Mailbox API – Batch Operations
- Mailbox API – Undo
- Mailbox API – Error Handling
The Mailbox API is available starting with Axigen X4 (10.4).
Create
This endpoint allows you to create a new draft email or insert an email into an existing folder.
If folderId
is specified, the email will be appended to the specified folder, otherwise it will be created as a draft, in the Drafts folder.
Request body (JSON)
Name |
Type |
Required |
Values |
Description |
---|---|---|---|---|
|
|
The default value is the ID of the “Drafts” folder |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
"re", "fw" |
Whether the mail is a reply or a forward. The mail cannot be both a reply and a forward (“refw” is an invalid value) |
|
|
|
Required if |
This field is dependent on
|
|
|
|
The desired value of the |
||
|
|
The unread / read value |
||
|
|
The flagged / not flagged value |
||
|
|
"normal", "low", "high" The desired importance. If missing, the importance will default to "normal". |
||
|
|
The UTF-8 text body, if existing |
||
|
|
The UTF-8 HTML body, if existing |
||
|
|
JSON object list in the following format: |
The attachments in the attachments queue. |
Response
If successful, the response will contain an instance of mail.
Send
This endpoint allows you to send an email which is not yet saved to Drafts.
It will also save a copy to Sent according to the user preference.
Request body (JSON)
Name |
Type |
Required |
Values |
Description |
---|---|---|---|---|
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
"re", "fw" |
Whether the mail is a reply or a forward. The mail cannot be both a reply and a forward (“refw” is an invalid value) |
|
|
|
Required if |
This field is dependent on
|
|
|
|
The desired value of the |
||
|
|
"normal", "low", "high" The desired importance. If missing, the importance will default to "normal". |
||
|
|
Whether to request a read receipt |
||
|
|
Whether to request a delivery receipt |
||
|
|
The UTF-8 text body, if existing |
||
|
|
The UTF-8 HTML body, if existing |
||
|
|
JSON object list in the following format: |
The attachments in the attachments queue. |
Response
If successful, the response will be empty.
Starting with Axigen X5 (10.5), as part of the planned support for the Undo Send functionality, if successful, the server response will be as documented below.
Replace Draft
This endpoint allows you to replace an existing draft email.
URL parameters
Name |
Type |
Required |
Values |
Description |
---|---|---|---|---|
|
|
* |
The draft mail ID |
Request body (JSON)
Name |
Type |
Required |
Values |
Description |
---|---|---|---|---|
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
The desired value of the |
||
|
|
"re", "fw" |
Whether the mail is a reply or a forward. The mail cannot be both a reply and a forward (“refw” is an invalid value) |
|
|
|
Required if |
This field is dependent on
|
|
|
|
The desired value of the |
||
|
|
The unread / read value |
||
|
|
The flagged / not flagged value |
||
|
|
"normal", "low", "high" The desired importance. If missing, the importance will default to "normal". |
||
|
|
The UTF-8 text body, if existing |
||
|
|
The UTF-8 HTML body, if existing |
||
|
|
JSON object list in the following format: |
The attachments in the attachments queue. |
Response
If successful, the response will contain an instance of mail.
Send Draft
This endpoint allows you to send an existing draft email.
If this is preceded by opening the draft for editing, on send you should first save it to drafts and then call this endpoint with the draft mail ID.
This endpoint will also delete the draft upon sending and will save a copy to Sent according to the user preference.
URL parameters
Name |
Type |
Required |
Values |
Description |
---|---|---|---|---|
|
|
* |
The draft mail ID |
Response
If successful, the response will be empty.
Starting with Axigen X5 (10.5), as part of the planned support for the Undo Send functionality, if successful, the server response will be as documented below.
Temporary Attachments
Axigen uses an attachments queue for attachment uploads.
1. To attach a file to a message as a regular attachment:
a. Use the “Create” endpoint to upload the file
b. Pass the temporaryAttachments
array to the “Send” or “Save” endpoint.
2. To attach a file to a message as an inline attachment:
a. Use the “Create” endpoint to upload the file
b. Generate a unique contentId
and refer it as a cid
source for the corresponding inline image in your email body.
This will ensure that your mail body will contain a valid reference for each inline attachment.
c. Pass the temporaryAttachments
array (including the contentId
and the isInline
property set to true
) to the “Send” or “Save” endpoint.
3. When forwarding an email or opening a draft for editing:
a. Add the existing attachments to the internal queue by calling the “Store” endpoint
b. Update your email body and attachments list to point to the internal queue attachments instead of the original ones (both inline and regular attachments).
Create
Request body
Include the attachment as a multipart/form-data
HTTP body part.
Response
Get
URL parameters
Name |
Type |
Required |
Values |
Description |
---|---|---|---|---|
|
|
* |
The temporary attachment ID |
Response
The temporary attachment.
Delete
URL parameters
Name |
Type |
Required |
Values |
Description |
---|---|---|---|---|
|
|
* |
The temporary attachment ID |
Response
If successful, the response will be empty.
Store in Queue
This endpoint allows you to store an email’s attachments in the internal queue.
Request body (JSON)
Name |
Type |
Required |
Values |
Description |
---|---|---|---|---|
|
|
* |
The mail ID whose attachments you want to store. |
Response
The IDs of the temporary attachments are not related to the original mail; they are internal queue unique identifiers.