« Open API List

API Information

Description
List messages in mail box.

Request URL

Mail API v1.0

GET /v1/emails/(uuid:email_id)/messages

Request Paramters

Parameter Value Style Type Description
X-Auth-Token - header string User Token
email_id - query UUID Email ID
offset(Optional) - query int The number of the transactions to start displaying with (Default:0)
limit(Optional) - query int The number of transactions for displaying (Default:1000)
sort_key(Optional) date/subject/from query string Sort Key、Default:date
sort_type(Optional) asc/desc query string Sort Order (Default:asc)

Response Paramters

Parameter Value Style Type Description
messages - - list -
message_id - plain UUID Message ID
from - plain string Sender
subject - plain string Subject
size - plain int Size
date - plain string Date of Receipt
total_count - plain int Total Count
current_count - plain int Current Count

Request Json

This operation does not accept a request body.

Normal response codes

200 - Success

Error response codes

401 - Access Denied
404 - Not Found

Repeatable

Yes

Example

curl -i -X GET \
-H "Accept: application/json" \
-H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140" \
https://mail-hosting.tyo1.cloud.z.com/v1/emails/bb370c78b7a9d/messages
HTTP/1.1 200 Success
Date: Tue, 09 Dec 2014 01:46:58 GMT
Server: Apache
Content-Length: 1003
Content-Type: application/json

{
  "messages": [
      {
          "message_id": "d059a9cefb0ae755794894ccc0c01551",
          "from": "mail@example.com",
          "subject": "subject1",
          "size": 510,
          "date": "2015-04-07T04:19:05Z"
      },
      {
          "message_id": "5297373a3542bbe3a231217fd8726bc4",
          "from": "mail@example.com",
          "subject": "subject2",
          "size": 456,
          "date": "2015-04-07T04:19:05Z"
      }
  ],
  "total_count":100,
  "current_count":10
}