Overview
    Alice & Bob
    Sending
    Receiving
    Identity
    Encryption
Technology
    Identity CA
    MTA Identity
    MTA Transport
Changes
Glossary

Message Transport of a Mail Transfer Agent

Message Handling API
Message Handling API
The MTA provides endpoints that support the following use cases with regards to message handling:

  1. Submitting a message
  2. Message revocation
  3. Fetching the message count
  4. Fetching message IDs
  5. Fetching message IDs for unread messages
  6. Fetching the message header
  7. Fetching the message body
  8. Fetching an attachment
  9. Deleting messages
Submitting a message

URL: example.com/message
Protocol: HTTPS
Method: POST
Consumes: multipart/form-data
Produces: application/xml, application/json
Authentication: none
Status Codes: 200, 400, 404, 413, 500

Input: encrypted multi-part message
Output: Receipt object
Error: HttpStatus object
Message revocation

URL: example.com/message/revocation
Protocol: HTTPS
Method: POST
Consumes: application/xml, application/json
Produces: text/plain, application/xml, application/json
Authentication: none
Status Codes: 200, 400, 500

Input: Receipt object
Output: Boolean value (true/false)
Error: HttpStatus object
Fetching the message count

URL: example.com/message/count
Protocol: HTTPS
Method: GET
Consumes: N/A
Produces: application/xml, application/json
Authentication: mutual authentication using client certificate (implementation dependent)
Status Codes: 200, 400, 401, 403, 500

Input: none
Output: MessageCount object
Error: HttpStatus object
Fetching message IDs

URL: example.com/message/id
Protocol: HTTPS
Method: GET
Consumes: N/A
Produces: application/xml, application/json
Authentication: mutual authentication using client certificate (implementation dependent)
Status Codes: 200, 400, 401, 403, 500

Input: none
Output: MessageIds object
Error: HttpStatus object
Fetching message IDs for unread messages

URL: example.com/message/id/unread
Protocol: HTTPS
Method: GET
Consumes: N/A
Produces: application/xml, application/json
Authentication: mutual authentication using client certificate (implementation dependent)
Status Codes: 200, 400, 401, 403, 500

Input: none
Output: MessageIds object
Error: HttpStatus object
Fetching the message header

URL: example.com/message/header
Protocol: HTTPS
Method: POST
Consumes: application/xml, application/json
Produces: multipart/form-data
Authentication: mutual authentication using client certificate (implementation dependent)
Status Codes: 200, 400, 401, 403, 404, 500

Input: MessageId object
Output: multipart message
Error: HttpStatus object
Fetching the message body

URL: example.com/message/body
Protocol: HTTPS
Method: POST
Consumes: application/xml, application/json
Produces: application/octet-stream
Authentication: mutual authentication using client certificate (implementation dependent)
Status Codes: 200, 400, 401, 403, 404, 500

Input: MessageId object
Output: message body as stream
Error: HttpStatus object
Fetching an attachment

URL: example.com/message/attachment
Protocol: HTTPS
Method: POST
Consumes: application/xml, application/json
Produces: application/octet-stream
Authentication: mutual authentication using client certificate (implementation dependent)
Status Codes: 200, 400, 401, 403, 404, 500

Input: MessageId object
Output: message attachment as stream
Error: HttpStatus object
Deleting messages

URL: example.com/message/msg
Protocol: HTTPS
Method: POST
Consumes: application/xml, application/json
Produces: application/xml, application/json
Authentication: mutual authentication using client certificate (implementation dependent)
Status Codes: 200, 400, 401, 403, 404, 500

Input: MessageIds object
Output: MessageIds object
Error: HttpStatus object