GetMX-API
  1. Message
GetMX-API
  • Domain
    • Get Domains
      POST
    • Add Domain
      POST
    • Delete Domain
      POST
    • Get Domain Detail
      POST
    • Bind Domain to Group-Pay
      POST
    • Unbind Domain from Group-Pay
      POST
    • Update Domain
      POST
  • Group Pay
    • Get Group-Pays
      POST
    • Add Group-Pay
      POST
    • Update Group-Pay
      POST
  • Email
    • Get Emails
      POST
    • Add Email
      POST
    • Delete Email
      POST
    • Update Email
      POST
    • Clean up Email
      POST
  • Message
    • Get Messages
      POST
    • Get Message Detail
      POST
    • Delete Message
      POST
    • Flagged Message
      POST
    • Seen Message
      POST
    • Answered Message
      POST
    • Get Folders
      POST
    • Move Message Folder
      POST
  • Alias
    • Get Aliases
      POST
    • Add Alias
      POST
    • Delete Alias
      POST
    • Update Alias
      POST
  • Message Notice
    • Get Message Notices
    • Add Message Notice
    • Delete Message Notice
    • Check Message Notice
    • Update Message Notice
  • SMTP Rule
    • Get Smtp Rules
    • Add Smtp Rule
    • Update Smtp Rule
    • Delete Smtp Rule
  • Scale
    • Query Remaining Space
    • Server Cleanup
  1. Message

Get Messages

POST
/v1/message/list
For Scale version requests to this interface, please use the dedicated server address. Reference documentation: https://docs.getmx.com/docs/domain-email/operation/open#api-request-address

Request

Body Params multipart/form-data
token
string 
required
Token generated by the management backend
Example:
{{token}}
folder
array[string]
required
Email folder, through the /v1/message/folder/list endpoint. e.g. Inbox. Note: Inbox for incoming messages, Drafts for drafts, Sent for sent messages, Deleted Items for deleted emails.
Example:
["Inbox"]
mail_id
string 
required
Mail ID (can be obtained from the GetMX management backend or through the /v1/mail/list endpoint; the 'id' field is the 'mail_id').
Example:
12345678
start_time
string 
required
Start time
Example:
2024-05-01
end_time
string 
required
End time, note: The API time selection granularity is by day. To select the current day, please add one day to the date. For example, if 'end_time' is set to 2021-05-01, it represents 2021-05-01 00:00:00. To request data for 2021-05-01, set it to 2021-05-02.
Example:
2025-03-24
page
integer 
required
Page
Example:
1
limit
integer 
required
Number of entries per page (maximum of 20)
Example:
10
from
string 
optional
Sender email, e.g. [email protected]
Example:
[email protected]
to
string 
optional
Recipient email, suitable for mail collection features, e.g. [email protected]
Example:
[email protected]
subject
string 
optional
Filter by subject
Example:
Subject
flagged
string 
optional
1 flagged, -1 unflagged, 0 all
Example:
0
seen
string 
optional
1 seen, -1 unseen, 0 all
Example:
0

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://domain-open-api.getmx.com/v1/message/list' \
--form 'token="token"' \
--form 'folder="Inbox"' \
--form 'mail_id="12345678"' \
--form 'start_time="2024-05-01"' \
--form 'end_time="2025-03-24"' \
--form 'page="1"' \
--form 'limit="10"'

Responses

🟢200成功
application/json
Body
code
integer 
required
msg
string 
required
data
object 
required
list
array [object {7}] 
required
total
integer 
required
Example
{
    "code": 0,
    "msg": "string",
    "data": {
        "list": [
            {
                "body": "string",
                "from": "string",
                "id": "string",
                "subject": "string",
                "time": "string",
                "timestamp": 0,
                "to": "string"
            }
        ],
        "total": 0
    }
}
Modified at 2024-12-03 00:49:16
Previous
Clean up Email
Next
Get Message Detail
Built with