Introduction

Welcome to the AHEM API documentation.
AHEM provides an easy to use RESTful API, that allows you to test or build anything on top of the AHEM mail server. The table below details the various api calls you can use and what they are used for.

Authentication

A token must be obtained by calling https://www.ahem.email/auth/authenticate. The response will contain a token filed.
Tokens must be added to each api call in the Authorization header.

Usage

The AHEM API documentation is also available in swagger form.
Description: Returns an access token associated with the requesting IP address.

Method: POST

URL: https://www.ahem.email/auth/authenticate

Parameters: {}

Description: Returns a list of mailboxes starting with the prefix

Method: POST

URL: https://www.ahem.email/api/mailbox/autocomplete

Parameters: { "prefix":[string] }

Description: Returns various server properties and settings

Method: GET

URL: https://www.ahem.email/api/properties

Parameters:

Description: returns a list of the email objects in the mailbox

Method: GET

URL: https://www.ahem.email/api/mailbox/{mailbox}

Parameters:

Description: Deletes a whole mailbox

Method: DELETE

URL: https://www.ahem.email/api/mailbox/{mailbox}

Parameters:

Description: Returns the contents of a specific email

Method: GET

URL: https://www.ahem.email/api/mailbox/{mailbox}/{emailId}

Parameters:

Description: Delete an emails

Method: DELETE

URL: https://www.ahem.email/api/mailbox/{mailbox}/{emailId}

Parameters:

Description: Updates the emailInfo object (representation of the email meta data in the user's mailbox. Currently, only the isRead field is supported.

Method: PATCH

URL: https://www.ahem.email/api/mailbox/{acount}/{emailId}

Parameters: {"isRead" : [boolean]}

Description: Downloads a specific attachment on an email

Method: GET

URL: https://www.ahem.email/api/mailbox/{mailbox}/{emailId}/attachments/{filename}

Parameters: