- 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).
Search
Request body (JSON)
Name |
Type |
Required |
Values |
Description |
---|---|---|---|---|
|
|
* |
Example: |
The IDs of the folders to search in |
|
|
* |
JSON object list in the following format: |
The query should be a JSON array containing all the requested search criteria. See the Search Syntax chapter below for details about criteria. |
|
|
Whether the folders specified in the |
Response
Mails Search Syntax
Criteria
The table below contains the criteria included in the API search implementation, along with their advanced search / quick search mapping.
Criterion class |
Criterion |
Operators |
Syntax |
|||
---|---|---|---|---|---|---|
Prefix (All languages) |
Examples |
Notes |
Mailbox REST API Examples |
|||
Text |
From |
contains (default) doesn't contain (-) |
from: |
|
Also accepted with a space after ":" When in quotes, exact match will be applied. |
|
To |
contains (default) doesn't contain (-) |
to: |
|
Also accepted with a space after ":" When in quotes, exact match will be applied. |
|
|
Subject |
contains (default) doesn't contain (-) |
subject: |
subject:Party subject:(Christmas Party) subject:("Christmas Party") subject:-Party subject:-(Christmas Party) -subject:("Christmas Party") |
Also accepted with a space after ":" When in quotes, exact match will be applied. |
Same as the "From" criterion API; replace |
|
Cc |
contains (default) doesn't contain (-) |
cc: |
cc:John cc:(John Doe) cc:("John Doe") cc:-John cc:-(John Doe) cc:-("John Doe") |
Also accepted with a space after ":" When in quotes, exact match will be applied. |
Same as the "From" criterion API; replace |
|
Bcc |
contains (default) doesn't contain (-) |
bcc: |
bcc:John bcc:(John Doe) bcc:("John Doe") bcc:-John bcc:-(John Doe) bcc:-("John Doe") |
Also accepted with a space after ":" When in quotes, exact match will be applied. |
Same as the "From" criterion API; replace |
|
Body |
contains (default) doesn't contain (-) |
body: |
body:Party body:(Christmas Party) body:("Christmas Party") body:-Party body:-(Christmas Party) body:-("Christmas Party") |
Also accepted with a space after ":" When in quotes, exact match will be applied. |
Same as the "From" criterion API; replace |
|
Any field |
contains (default) doesn't contain (-) |
N/A |
John John Doe <john.doe@example.com> (Christmas Party) "Christmas Party" -John -(John Doe <john.doe@example.com>) -(Christmas Party) -"Christmas Party" |
Also accepted with a space after ":" When in quotes, exact match will be applied. |
Same as the "From" criterion API; replace |
|
Time |
Date |
before |
before:[date] |
before:15/12/2019 before:(15/12/2019) |
Also accepted with a space after ":" Dates are accepted in the format: "last 7 days" replaces "is from this week" "last 30 days" replaces "is from this month" "before" replaces "is before" "after" replaces "is since" Examples assume today is 14/12/2019 The "After" and "Before" dates are exclusive. The date timestamps are treated as UTC, regardless of the client's timezone. |
|
after |
after:[date] |
after:14/12/2019 after:(14/12/2019) |
|
|||
last 7 days |
after:[date] before:[date] |
after:07/12/2019 before:15/12/2019 after:(07/12/2019) before:(15/12/2019) |
|
|||
last 30 days |
after:14/11/2019 before:15/12/2019 after:(14/11/2019) before:(15/12/2019) |
|
||||
between (default) |
after:15/08/2019 before:15/12/2019 after:(15/08/2019) before:(15/12/2019) |
|
||||
Has attachment |
Has attachment |
N/A |
has: |
has:attachment |
|
|
Read / Unread |
Read / Unread |
N/A |
is: |
|
Also accepted with a space after ":" An |
|
Folder ID |
Search in |
All mail |
in:anywhere |
in:anywhere |
Also accepted with a space after ":" The folder name can be in quotes or without quotes. If there's a folder named "mailbox", the current mailbox takes precedence; the folder needs to be added in brackets or quotes to take precedence. |
Note that the folder IDs are specified in the fid array, not in the query |
Current mailbox (default) |
N/A |
N/A |
|
|||
Current mailbox (including Spam and Trash) |
in:mailbox |
in:mailbox |
|
|||
Current folder |
in:[folderName] |
in:Inbox in:(Marketing Materials) in:("Marketing Materials") |
|
|||
Custom folders |
in:("Inbox", "Marketing Materials") |
in:("Inbox", "Marketing Materials") |
|
|||
Size |
Size |
is less than |
smaller:[size] |
|
Also accepted with a space after ":" |
|
is more than |
larger:[size] |
|
|
|||
Flag |
Flag |
is follow-up |
is: |
is:follow-up |
Also accepted with a space after ":" |
|
is not follow-up |
is:-follow-up |
|
||||
is completed |
is:completed |
|
||||
is not completed |
is:-completed |
|
||||
Importance |
Importance |
is high importance |
has: |
has:high-importance |
Also accepted with a space after ":" |
|
is not high importance |
has:-high-importance |
|
||||
is low importance |
has:low-importance |
|
||||
is not low importance |
has:-low-importance |
|
||||
is normal importance |
has:normal-importance |
|
||||
is not normal importance |
has:-normal-importance |
|
||||
Label |
Label |
has label |
label: |
label:MyLabelName |
Also accepted with a space after ":" The client will translate label name to label id |
|
does not have label |
label:-MyOtherLabelName |
|
Additional Notes
-
The default operator is
AND
. -
The "-" prefix negates the entire criterion ("-" followed by space is not accepted — i.e. does not have the same behavior)
-
Multiple criteria can be combined. Examples:
-
Christmas Party from:John
-
"Christmas Party 2019" from:John
-
from:John from:Doe
→from:(John Doe)
-
from:John subject:Party is:replied after:2019-12-01
-