🤬
master
ROOT /
REST-GET-mailbox.md
69 lines | UTF-8 | 1 KB

Back to REST API

List contents of mailbox.

URI

GET /api/v1/mailbox/{name}

Params

  • name - name of the mailbox to list the contents of

Output

A JSON array of message header maps, containing the following fields:

  • mailbox - name of the mailbox the message belongs to
  • id - message identifier, will be unique for this mailbox, but not across mailboxes
  • from - message sender
  • subject - message subject line
  • date - date message was received (not the date specified by SMTP headers) in ISO 8601 format.
  • size - size of headers + message in bytes

Example

Request: curl -i -H "Accept: application/json" https://crah.fyi/api/v1/mailbox/swaks

Response: (JSON reformatted for readability)

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Expires: -1
Content-Length: 686
Date: Tue, 15 Oct 2013 23:54:36 GMT

[
  {
      "mailbox":"swaks",
      "id":"20131015T161202-0000",
      "from":"[email protected]",
      "subject":"Swaks Plain Text",
      "date":"2013-10-15T16:12:02.231532239-07:00",
      "size":264
  },
  {
      "mailbox":"swaks",
      "id":"20131015T161202-0001",
      "from":"[email protected]",
      "subject":"Swaks HTML",
      "date":"2013-10-15T16:12:02.292145012-07:00",
      "size":705
  },
  {
      "mailbox":"swaks",
      "id":"20131015T161202-0002",
      "from":"[email protected]",
      "subject":"Swaks Attachment",
      "date":"2013-10-15T16:12:02.358027334-07:00",
      "size":4802
  },
  {
      "mailbox":"swaks",
      "id":"20131015T161202-0003",
      "from":"[email protected]",
      "subject":"Test of ȇɲʢȯȡɪɴʛ",
      "date":"2013-10-15T16:12:02.424206527-07:00",
      "size":2946
  }
]
Please wait...
Page is in error, reload to recover