Snapmail API

Using Snapmail’s API, you can get the data of your emails on Snapmail.cc. You can use it in your automation tasks.

All data is returned as JSON unless specified.

You can also see example of using API to get captcha from email > >

Endpoints

POST /emailList/filter - Get all emails from an email box.

key and emailAddress are essential, find API key on My Account . Other options are optional.

isPrefix enables you to get all emails from a prefix email box, then you can get email from howareyou2333@snapmail.cc etc.

count: Get a specified number of emails by mailbox, because sometimes you only need the last 2 emails

Maximum result count is 50 emails, you can get more with page option.

# example
POST https://www.snapmail.cc/emailList/filter
Content-Type: application/json

{
  "key": "9a4df3ec-324a-xd3e-12s6-a1f17ca20161",
  "emailAddress": "howareyou@snapmail.cc",
  "isPrefix": true,
  "page": 1,
  "count": 1
}


# Response sample:
[
  {
    'html': '<!DOCTYPE html><html><head></head><body><p>This is a test email.</p></body></html>',
    'text': 'This is a test email.',
    'headers': {
      'content-type': '',
      'from': 'test@snapmail.cc',
      'to': 'test@snapmail.cc',
      'subject': 'test',
      'message-id': '',
      'date': 'Mon, 20 Jan 2024 05:45:22 +0000'
    },
    'subject': 'test',
    'messageId': '',
    'priority': 'normal',
    'from': [{ 'address': 'test@snapmail.cc', 'name': '' }],
    'to': [{ 'address': 'test@snapmail.cc', 'name': '' }],
    'date': '2024-01-20T05:45:22.000Z',
    'id': '256ad5eb-911f-4dde-a2f6',
    'time': '2024-01-20T05:45:25.801Z',
    'timestamp': 1997351925801,
    'envelope': {
      'from': { 'address': 'test@snapmail.cc', 'args': false },
      'to': [{ 'address': 'test@snapmail.cc', 'args': false }]
    },
    'read': false
  }
]

GET /email/:id - Get a given email by id (id needs to be obtained from /emaillist/:box)

# example
https://www.snapmail.cc/email/LBmlAa56

GET /email/:id/html - Get a given emails html body

# example
https://www.snapmail.cc/email/LBmlAa56/html

DELETE /email/:id - Delete a given email by id

Try Snapmail now

Back to Snapmail blog