{ "openapi": "3.0.0", "info": { "title": "AHEM - Ad Hoc Email", "description": "Welcome to the AHEM API documentation.
AHEM provides an easy to use RESTful API that allows testing or building anything on top of the AHEM mail server.
All endpoints follow the URL:
https://www.ahem.email/api/

__Authorization__
A token must be obtained by calling https://www.ahem.email/auth/authenticate.
The response will contain a token field. Tokens must be added to each api call in the Authorization header and a Bearer token.", "contact": {}, "termsOfService": "http://ahem-regtool.tk", "version": "1.0" }, "servers": [ { "url": "http://ahem-regtool.tk", "variables": {} } ], "paths": { "/api/alive": { "get": { "tags": [ "General" ], "summary": "Get system check results", "description": "", "operationId": "GetSystemCheckResults", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "example": { "success": true, "api": true, "smtp": true, "db": true }, "$ref": "#/components/schemas/GetSystemCheckResultsResponse" }, "example": { "success": true, "api": true, "smtp": true, "db": true } } } } }, "x-operation-settings": { "CollectParameters": false, "AllowDynamicQueryParameters": false, "AllowDynamicFormParameters": false, "IsMultiContentStreaming": false } } }, "/api/properties": { "get": { "tags": [ "General" ], "summary": "Get server properties", "description": "", "operationId": "GetServerProperties", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "example": { "serverBaseUri": "https://www.ahem.email", "emailDeleteInterval": 86400, "emailDeleteAge": 7200, "allowedDomains": [ "ahem.email", "mail.ahem.email", "ahem-email.com" ], "allowAutocomplete": false, "customText": null }, "$ref": "#/components/schemas/GetServerPropertiesResponse" }, "example": { "serverBaseUri": "https://www.ahem.email", "emailDeleteInterval": 86400, "emailDeleteAge": 7200, "allowedDomains": [ "ahem.email", "mail.ahem.email", "ahem-email.com" ], "allowAutocomplete": false, "customText": null } } } } }, "x-operation-settings": { "CollectParameters": false, "AllowDynamicQueryParameters": false, "AllowDynamicFormParameters": false, "IsMultiContentStreaming": false } } }, "/api/emailCount": { "get": { "tags": [ "General" ], "summary": "Get server email count", "description": "", "operationId": "GetEmailCount", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "example": { "serverBaseUri": "https://www.ahem.email", "count": 654, "since": 1539648000 }, "$ref": "#/components/schemas/GetEmailCount" } } } } }, "x-operation-settings": { "CollectParameters": false, "AllowDynamicQueryParameters": false, "AllowDynamicFormParameters": false, "IsMultiContentStreaming": false } } }, "/api/auth/token": { "post": { "tags": [ "General" ], "summary": "Get access token", "description": "", "operationId": "GetAccessToken", "parameters": [ { "name": "Content-Type", "in": "header", "description": "", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "application/json" } } ], "requestBody": { "description": "", "content": { "text/plain": { "schema": { "type": "object" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "example": { "success": true, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6Ijo6MSIsImlhdCI6MTUzOTU1NTI5NCwiZXhwIjoxNTM5NTU4ODk0fQ.Y8FhYY5OGbHNn6EOcrF81swX3xeLF4t7Q6F5L7z6Xdg" }, "$ref": "#/components/schemas/GetAccessTokenResponse" }, "example": { "success": true, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6Ijo6MSIsImlhdCI6MTUzOTU1NTI5NCwiZXhwIjoxNTM5NTU4ODk0fQ.Y8FhYY5OGbHNn6EOcrF81swX3xeLF4t7Q6F5L7z6Xdg" } } } } }, "x-operation-settings": { "CollectParameters": false, "AllowDynamicQueryParameters": false, "AllowDynamicFormParameters": false, "IsMultiContentStreaming": false } } }, "/api/mailbox/{mailboxName}/email": { "get": { "tags": [ "Mailbox" ], "security": [ { "bearerAuth": [] } ], "summary": "get a mailbox's emails list", "description": "", "operationId": "GetAMailbox'sEmailsList", "parameters": [ { "name": "mailboxName", "in": "path", "description": "mailbox name.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "mailboxName" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "example": [ { "emailId": "5bc3c17cb76d8f4e1099725c", "sender": { "address": "test@my.domain.com", "name": "AHEM Test!" }, "subject": "AHEM mail test!", "timestamp": 1539555708477, "isRead": true } ], "$ref": "#/components/schemas/GetAMailboxsEmailsListResponse" }, "description": "" }, "example": [ { "emailId": "5bc3c17cb76d8f4e1099725c", "sender": { "address": "test@my.domain.com", "name": "AHEM Test!" }, "subject": "AHEM mail test!", "timestamp": 1539555708477, "isRead": true } ] } } }, "401": { "description": "Unexpected error in API call. See HTTP response body for details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAMailboxsEmailsList401Response" }, "example": { "success": false, "message": "No token provided." } } } }, "404": { "description": "Unexpected error in API call. See HTTP response body for details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAMailboxsEmailsList404Response" }, "example": { "error": "MAILBOX IS EMPTY!" } } } } }, "x-operation-settings": { "CollectParameters": false, "AllowDynamicQueryParameters": false, "AllowDynamicFormParameters": false, "IsMultiContentStreaming": false } } }, "/api/mailbox/{mailboxName}/email/{emailId}": { "get": { "tags": [ "Email" ], "summary": "Get an email's content", "security": [ { "bearerAuth": [] } ], "description": "", "operationId": "GetAnEmail'sContent", "parameters": [ { "name": "mailboxName", "in": "path", "description": "mailbox name.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "mailboxName" } }, { "name": "emailId", "in": "path", "description": "mailbox name.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "emailId" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "example": { "_id": "5bc64017002e254f65eb37ef", "attachments": [ { "type": "attachment", "content": "iVBORw0KGgoAAAANSUhEUgAAAfoAAAFkCAYAAADIefl6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7J13eFRV2sB/585MekIggQAJyaRAgACWIGAHFQXE3pB1RSyfvXfctaDr2ru7rq6ia9dV1w4qigKWVXQt2AqJCmyPszLl/0c8IQ3mc14/tXXMdCsQ6rBX1c+w8Qhx8xjeCyPbDOPNKP/ODxOQzrk/F5xqAJLlywJtCnwdF5entjUxq0UFBcTkSuQmCC", "contentType": "image/png", "release": null, "contentDisposition": "attachment", "filename": "ahem-happy.png", "contentId": "", "cid": "ahem-tester@mydomain.com", "related": true, "headers": { "content-type": { "value": "image/png", "params": { "name": "ahem-happy.png" } }, "content-id": "", "content-transfer-encoding": "base64", "content-disposition": { "value": "attachment", "params": { "filename": "ahem-happy.png" } } }, "checksum": "4ac3f7fa98c8c86bb1677f32279db7ad", "size": 57654 } ], "headers": { "content-type": { "value": "multipart/alternative", "params": { "boundary": "--_NmP-56cbf8151211f597-Part_1" } }, "from": { "value": [ { "address": "alive-test@my.domain.com", "name": "AHEM Test!" } ], "html": "AHEM Test! <alive-test@my.domain.com>", "text": "AHEM Test! " }, "to": { "value": [ { "address": "alive-test@my.domain.com", "name": "" } ], "html": "alive-test@my.domain.com", "text": "alive-test@my.domain.com" }, "subject": "AHEM mail test! ✔", "message-id": "", "date": "2018-10-16T19:46:31Z", "mime-version": "1.0" }, "headerLines": [ { "key": "content-type", "line": "Content-Type: multipart/alternative;\r\n boundary=\"--_NmP-56cbf8151211f597-Part_1\"" }, { "key": "from", "line": "From: \"AHEM Test!\" " }, { "key": "to", "line": "To: alive-test@my.domain.com" }, { "key": "subject", "line": "Subject: =?UTF-8?Q?AHEM_mail_test!_=E2=9C=94?=" }, { "key": "message-id", "line": "Message-ID: " }, { "key": "date", "line": "Date: Tue, 16 Oct 2018 19:46:31 +0000" }, { "key": "mime-version", "line": "MIME-Version: 1.0" } ], "html": "

API Test: ✔

SMTP Test: ✔

DB Test: ✔


", "text": "API: ✔ SMTP: ✔ DB: ✔", "textAsHtml": "

API: ✔ SMTP: ✔ DB: ✔

", "subject": "AHEM mail test! ✔", "date": "2018-10-16T19:46:31Z", "to": { "value": [ { "address": "alive-test@my.domain.com", "name": "" } ], "html": "alive-test@my.domain.com", "text": "alive-test@my.domain.com" }, "from": { "value": [ { "address": "alive-test@my.domain.com", "name": "AHEM Test!" } ], "html": "AHEM Test! <alive-test@my.domain.com>", "text": "AHEM Test! " }, "messageId": "", "timestamp": 1539719191853 }, "$ref": "#/components/schemas/GetAnEmailsContentResponse" }, "example": { "_id": "5bc64017002e254f65eb37ef", "attachments": [ { "type": "attachment", "content": "iVBORw0KGgoAAAANSUhEUgAAAfoAAAFkCAYAAADIefl6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7J13eFRV2sB/585MekIggQAJyaRAgACWIGAHFQXE3pB1RSyfvXfctaDr2ru7rq6ia9dV1w4qigKWVXQt2AqJCmyPszLl/0c8IQ3mc14/tXXMdCsQ6rBX1c+w8Qhx8xjeCyPbDOPNKP/ODxOQzrk/F5xqAJLlywJtCnwdF5entjUxq0UFBcTkSuQmCC", "contentType": "image/png", "release": null, "contentDisposition": "attachment", "filename": "ahem-happy.png", "contentId": "", "cid": "ahem-tester@mydomain.com", "related": true, "headers": { "content-type": { "value": "image/png", "params": { "name": "ahem-happy.png" } }, "content-id": "", "content-transfer-encoding": "base64", "content-disposition": { "value": "attachment", "params": { "filename": "ahem-happy.png" } } }, "checksum": "4ac3f7fa98c8c86bb1677f32279db7ad", "size": 57654 } ], "headers": { "content-type": { "value": "multipart/alternative", "params": { "boundary": "--_NmP-56cbf8151211f597-Part_1" } }, "from": { "value": [ { "address": "alive-test@my.domain.com", "name": "AHEM Test!" } ], "html": "AHEM Test! <alive-test@my.domain.com>", "text": "AHEM Test! " }, "to": { "value": [ { "address": "alive-test@my.domain.com", "name": "" } ], "html": "alive-test@my.domain.com", "text": "alive-test@my.domain.com" }, "subject": "AHEM mail test! ✔", "message-id": "", "date": "2018-10-16T19:46:31Z", "mime-version": "1.0" }, "headerLines": [ { "key": "content-type", "line": "Content-Type: multipart/alternative;\r\n boundary=\"--_NmP-56cbf8151211f597-Part_1\"" }, { "key": "from", "line": "From: \"AHEM Test!\" " }, { "key": "to", "line": "To: alive-test@my.domain.com" }, { "key": "subject", "line": "Subject: =?UTF-8?Q?AHEM_mail_test!_=E2=9C=94?=" }, { "key": "message-id", "line": "Message-ID: " }, { "key": "date", "line": "Date: Tue, 16 Oct 2018 19:46:31 +0000" }, { "key": "mime-version", "line": "MIME-Version: 1.0" } ], "html": "

API Test: ✔

SMTP Test: ✔

DB Test: ✔


", "text": "API: ✔ SMTP: ✔ DB: ✔", "textAsHtml": "

API: ✔ SMTP: ✔ DB: ✔

", "subject": "AHEM mail test! ✔", "date": "2018-10-16T19:46:31Z", "to": { "value": [ { "address": "alive-test@my.domain.com", "name": "" } ], "html": "alive-test@my.domain.com", "text": "alive-test@my.domain.com" }, "from": { "value": [ { "address": "alive-test@my.domain.com", "name": "AHEM Test!" } ], "html": "AHEM Test! <alive-test@my.domain.com>", "text": "AHEM Test! " }, "messageId": "", "timestamp": 1539719191853 } } } }, "404": { "description": "Unexpected error in API call. See HTTP response body for details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAnEmailsContent404Response" }, "example": { "error": "MAILBOX IS EMPTY!" } } } }, "500": { "description": "Unexpected error in API call. See HTTP response body for details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetAnEmailsContent404Response" }, "example": { "error": "error details" } } } } }, "x-operation-settings": { "CollectParameters": false, "AllowDynamicQueryParameters": false, "AllowDynamicFormParameters": false, "IsMultiContentStreaming": false } }, "delete": { "tags": [ "Email" ], "summary": "Delete an Email", "security": [ { "bearerAuth": [] } ], "description": "", "operationId": "DeleteAnEmail", "parameters": [ { "name": "mailboxName", "in": "path", "description": "mailbox name.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "mailboxName" } }, { "name": "emailId", "in": "path", "description": "mailbox name.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "emailId" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "example": { "success": true }, "$ref": "#/components/schemas/DeleteAnEmailResponse" }, "example": { "success": true } } } }, "500": { "description": "Unexpected error in API call. See HTTP response body for details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteAnEmail500Response" }, "example": { "error": "error details" } } } }, "404": { "description": "Unexpected error in API call. See HTTP response body for details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteAnEmail404Response" }, "example": { "success": false, "message": "EMAIL NOT FOUND" } } } } }, "x-operation-settings": { "CollectParameters": false, "AllowDynamicQueryParameters": false, "AllowDynamicFormParameters": false, "IsMultiContentStreaming": false } }, "patch": { "tags": [ "Email" ], "security": [ { "bearerAuth": [] } ], "summary": "Update an Email's metadata", "description": "", "operationId": "UpdateAnEmail'sMetadata", "parameters": [ { "name": "mailboxName", "in": "path", "description": "mailbox name.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "mailboxName" } }, { "name": "emailId", "in": "path", "description": "mailbox name.", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "example": "emailId" } } ], "requestBody": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAnEmailsMetadataRequest" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "example": { "n": 1, "nModified": 0, "ok": 1 }, "$ref": "#/components/schemas/UpdateAnEmailsMetadataResponse" }, "example": { "n": 1, "nModified": 0, "ok": 1 } } } }, "500": { "description": "Unexpected error in API call. See HTTP response body for details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAnEmailsMetadata500Response" }, "example": { "error": "error details" } } } } }, "x-operation-settings": { "CollectParameters": false, "AllowDynamicQueryParameters": false, "AllowDynamicFormParameters": false, "IsMultiContentStreaming": false } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "schemas": { "GetSystemCheckResultsResponse": { "title": "Get system check results response", "required": [ "success", "api", "smtp", "db" ], "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "api": { "type": "boolean", "example": true }, "smtp": { "type": "boolean", "example": true }, "db": { "type": "boolean", "example": true } }, "example": { "success": true, "api": true, "smtp": true, "db": true } }, "GetServerPropertiesResponse": { "title": "Get server properties response", "required": [ "serverBaseUri", "emailDeleteInterval", "emailDeleteAge", "allowedDomains", "allowAutocomplete", "customText" ], "type": "object", "properties": { "serverBaseUri": { "type": "string", "example": "https://www.ahem.email" }, "emailDeleteInterval": { "type": "integer", "format": "int32", "example": 86400 }, "emailDeleteAge": { "type": "integer", "format": "int32", "example": 7200 }, "allowedDomains": { "type": "array", "items": { "type": "string", "example": [ "ahem.email", "mail.ahem.email", "ahem-email.com" ] }, "description": "" }, "allowAutocomplete": { "type": "boolean", "example": false }, "customText": { "type": "string", "nullable": true } }, "example": { "serverBaseUri": "https://www.ahem.email", "emailDeleteInterval": 86400, "emailDeleteAge": 7200, "allowedDomains": [ "ahem.email", "mail.ahem.email", "ahem-email.com" ], "allowAutocomplete": false, "customText": null } }, "GetEmailCount": { "title": "Get email count results response", "type": "object", "properties": { "count": { "type": "integer", "example": 654 }, "since": { "type": "integer", "example": 1539648000 }, "example": { "count": 654, "since": 1539648000 } } }, "GetAccessTokenResponse": { "title": "Get access token response", "required": [ "success", "token" ], "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "token": { "type": "string", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6Ijo6MSIsImlhdCI6MTUzOTU1NTI5NCwiZXhwIjoxNTM5NTU4ODk0fQ.Y8FhYY5OGbHNn6EOcrF81swX3xeLF4t7Q6F5L7z6Xdg" } }, "example": { "success": true, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpcCI6Ijo6MSIsImlhdCI6MTUzOTU1NTI5NCwiZXhwIjoxNTM5NTU4ODk0fQ.Y8FhYY5OGbHNn6EOcrF81swX3xeLF4t7Q6F5L7z6Xdg" } }, "GetAMailboxsEmailsListResponse": { "title": "get a mailbox's emails list response", "required": [ "emailId", "sender", "subject", "timestamp", "isRead" ], "type": "object", "properties": { "emailId": { "type": "string", "example": "5bc3c17cb76d8f4e1099725c" }, "sender": { "type": "object", "example": { "address": "test@my.domain.com", "name": "AHEM Test!" } }, "subject": { "type": "string", "example": "AHEM mail test!" }, "timestamp": { "type": "integer", "format": "int64", "example": 1539555708477 }, "isRead": { "type": "boolean", "example": true } }, "example": { "emailId": "5bc3c17cb76d8f4e1099725c", "sender": { "address": "test@my.domain.com", "name": "AHEM Test!" }, "subject": "AHEM mail test!", "timestamp": 1539555708477, "isRead": true } }, "GetAMailboxsEmailsList404Response": { "title": "get a mailbox's emails list 404 response", "required": [ "error" ], "type": "object", "properties": { "error": { "type": "string", "example": "MAILBOX IS EMPTY!" } }, "example": { "error": "MAILBOX IS EMPTY!" } }, "GetAMailboxsEmailsList401Response": { "title": "get a mailbox's emails list 401 response", "required": [ "success", "message" ], "type": "object", "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "No token provided." } }, "example": { "success": false, "message": "No token provided." } }, "GetAnEmailsContentResponse": { "title": "Get an email's content response", "required": [ "_id", "attachments", "headers", "headerLines", "html", "text", "textAsHtml", "subject", "date", "to", "from", "messageId", "timestamp" ], "type": "object", "properties": { "_id": { "type": "string", "example": "5bc64017002e254f65eb37ef" }, "attachments": { "type": "array", "items": { "type": "object", "example": [ { "type": "attachment", "content": "iVBORw0KGgoAAAANSUhEUgAAAfoAAAFkCAYAAADIefl6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7J13eFRV2sB/585MekIggQAJyaRAgACWIGAHFQXE3pB1RSyfvXfctaDr2ru7rq6ia9dV1w4qigKWVXQt2AqJCmyPszLl/0c8IQ3mc14/tXXMdCsQ6rBX1c+w8Qhx8xjeCyPbDOPNKP/ODxOQzrk/F5xqAJLlywJtCnwdF5entjUxq0UFBcTkSuQmCC", "contentType": "image/png", "release": null, "contentDisposition": "attachment", "filename": "ahem-happy.png", "contentId": "", "cid": "ahem-tester@mydomain.com", "related": true, "headers": { "content-type": { "value": "image/png", "params": { "name": "ahem-happy.png" } }, "content-id": "", "content-transfer-encoding": "base64", "content-disposition": { "value": "attachment", "params": { "filename": "ahem-happy.png" } } }, "checksum": "4ac3f7fa98c8c86bb1677f32279db7ad", "size": 57654 } ] }, "description": "" }, "headers": { "type": "object", "example": { "content-type": { "value": "multipart/alternative", "params": { "boundary": "--_NmP-56cbf8151211f597-Part_1" } }, "from": { "value": [ { "address": "alive-test@my.domain.com", "name": "AHEM Test!" } ], "html": "AHEM Test! <alive-test@my.domain.com>", "text": "AHEM Test! " }, "to": { "value": [ { "address": "alive-test@my.domain.com", "name": "" } ], "html": "alive-test@my.domain.com", "text": "alive-test@my.domain.com" }, "subject": "AHEM mail test! ✔", "message-id": "", "date": "2018-10-16T19:46:31Z", "mime-version": "1.0" } }, "headerLines": { "type": "array", "items": { "type": "object", "example": [ { "key": "content-type", "line": "Content-Type: multipart/alternative;\r\n boundary=\"--_NmP-56cbf8151211f597-Part_1\"" }, { "key": "from", "line": "From: \"AHEM Test!\" " }, { "key": "to", "line": "To: alive-test@my.domain.com" }, { "key": "subject", "line": "Subject: =?UTF-8?Q?AHEM_mail_test!_=E2=9C=94?=" }, { "key": "message-id", "line": "Message-ID: " }, { "key": "date", "line": "Date: Tue, 16 Oct 2018 19:46:31 +0000" }, { "key": "mime-version", "line": "MIME-Version: 1.0" } ] }, "description": "" }, "html": { "type": "string", "example": "

API Test: ✔

SMTP Test: ✔

DB Test: ✔


" }, "text": { "type": "string", "example": "API: ✔ SMTP: ✔ DB: ✔" }, "textAsHtml": { "type": "string", "example": "

API: ✔ SMTP: ✔ DB: ✔

" }, "subject": { "type": "string", "example": "AHEM mail test! ✔" }, "date": { "type": "string", "example": "10/16/2018 7:46:31 PM" }, "to": { "type": "object", "example": { "value": [ { "address": "alive-test@my.domain.com", "name": "" } ], "html": "alive-test@my.domain.com", "text": "alive-test@my.domain.com" } }, "from": { "type": "object", "example": { "value": [ { "address": "alive-test@my.domain.com", "name": "AHEM Test!" } ], "html": "AHEM Test! <alive-test@my.domain.com>", "text": "AHEM Test! " } }, "messageId": { "type": "string", "example": "" }, "timestamp": { "type": "integer", "format": "int64", "example": 1539719191853 } }, "example": { "_id": "5bc64017002e254f65eb37ef", "attachments": [ { "type": "attachment", "content": "iVBORw0KGgoAAAANSUhEUgAAAfoAAAFkCAYAAADIefl6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7J13eFRV2sB/585MekIggQAJyaRAgACWIGAHFQXE3pB1RSyfvXfctaDr2ru7rq6ia9dV1w4qigKWVXQt2AqJCmyPszLl/0c8IQ3mc14/tXXMdCsQ6rBX1c+w8Qhx8xjeCyPbDOPNKP/ODxOQzrk/F5xqAJLlywJtCnwdF5entjUxq0UFBcTkSuQmCC", "contentType": "image/png", "release": null, "contentDisposition": "attachment", "filename": "ahem-happy.png", "contentId": "", "cid": "ahem-tester@mydomain.com", "related": true, "headers": { "content-type": { "value": "image/png", "params": { "name": "ahem-happy.png" } }, "content-id": "", "content-transfer-encoding": "base64", "content-disposition": { "value": "attachment", "params": { "filename": "ahem-happy.png" } } }, "checksum": "4ac3f7fa98c8c86bb1677f32279db7ad", "size": 57654 } ], "headers": { "content-type": { "value": "multipart/alternative", "params": { "boundary": "--_NmP-56cbf8151211f597-Part_1" } }, "from": { "value": [ { "address": "alive-test@my.domain.com", "name": "AHEM Test!" } ], "html": "AHEM Test! <alive-test@my.domain.com>", "text": "AHEM Test! " }, "to": { "value": [ { "address": "alive-test@my.domain.com", "name": "" } ], "html": "alive-test@my.domain.com", "text": "alive-test@my.domain.com" }, "subject": "AHEM mail test! ✔", "message-id": "", "date": "2018-10-16T19:46:31Z", "mime-version": "1.0" }, "headerLines": [ { "key": "content-type", "line": "Content-Type: multipart/alternative;\r\n boundary=\"--_NmP-56cbf8151211f597-Part_1\"" }, { "key": "from", "line": "From: \"AHEM Test!\" " }, { "key": "to", "line": "To: alive-test@my.domain.com" }, { "key": "subject", "line": "Subject: =?UTF-8?Q?AHEM_mail_test!_=E2=9C=94?=" }, { "key": "message-id", "line": "Message-ID: " }, { "key": "date", "line": "Date: Tue, 16 Oct 2018 19:46:31 +0000" }, { "key": "mime-version", "line": "MIME-Version: 1.0" } ], "html": "

API Test: ✔

SMTP Test: ✔

DB Test: ✔


", "text": "API: ✔ SMTP: ✔ DB: ✔", "textAsHtml": "

API: ✔ SMTP: ✔ DB: ✔

", "subject": "AHEM mail test! ✔", "date": "2018-10-16T19:46:31Z", "to": { "value": [ { "address": "alive-test@my.domain.com", "name": "" } ], "html": "alive-test@my.domain.com", "text": "alive-test@my.domain.com" }, "from": { "value": [ { "address": "alive-test@my.domain.com", "name": "AHEM Test!" } ], "html": "AHEM Test! <alive-test@my.domain.com>", "text": "AHEM Test! " }, "messageId": "", "timestamp": 1539719191853 } }, "GetAnEmailsContent404Response": { "title": "Get an email's content 404 response", "required": [ "error" ], "type": "object", "properties": { "error": { "type": "string", "example": "MAILBOX IS EMPTY!" } }, "example": { "error": "MAILBOX IS EMPTY!" } }, "DeleteAnEmailResponse": { "title": "Delete an Email response", "required": [ "success" ], "type": "object", "properties": { "success": { "type": "boolean", "example": true } }, "example": { "success": true } }, "DeleteAnEmail500Response": { "title": "Delete an Email 500 response", "required": [ "error" ], "type": "object", "properties": { "error": { "type": "string", "example": "error details" } }, "example": { "error": "error details" } }, "DeleteAnEmail404Response": { "title": "Delete an Email 404 response", "required": [ "success", "message" ], "type": "object", "properties": { "success": { "type": "boolean", "example": false }, "message": { "type": "string", "example": "EMAIL NOT FOUND" } }, "example": { "error": "error details" } }, "UpdateAnEmailsMetadataRequest": { "title": "Update an Email's metadata request", "required": [ "isRead" ], "type": "object", "properties": { "isRead": { "type": "boolean", "example": true } }, "example": { "isRead": true } }, "UpdateAnEmailsMetadataResponse": { "title": "Update an Email's metadata response", "required": [ "n", "nModified", "ok" ], "type": "object", "properties": { "n": { "type": "integer", "format": "int32", "example": 1 }, "nModified": { "type": "integer", "format": "int32", "example": 0 }, "ok": { "type": "integer", "format": "int32", "example": 1 } }, "example": { "n": 1, "nModified": 0, "ok": 1 } }, "UpdateAnEmailsMetadata500Response": { "title": "Update an Email's metadata 500 response", "required": [ "error" ], "type": "object", "properties": { "error": { "type": "string", "example": "error details" } }, "example": { "error": "error details" } } } }, "security": [], "tags": [ { "name": "General", "description": "General APIs" }, { "name": "Mailbox", "description": "Mailbox actions" }, { "name": "Email", "description": "Email actions" } ] }