{"swagger":"2.0","info":{"version":"0.1.0","title":"AA DXT - Mail Service"},"host":"aa-dxt-mail-service.dev.dxf.bosch.tech","tags":[{"name":"mail"}],"schemes":["https"],"paths":{"/api/ready":{"get":{"operationId":"ready","parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/api/send/template":{"post":{"tags":["mail"],"summary":"sendTemplate","description":"Endpoint to send an email template.","operationId":"sendTemplate","parameters":[{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/TemplateRequest"}}],"responses":{"200":{"description":"The mail was successfully sent.","schema":{"type":"string"}},"400":{"description":"The provided mail data was invalid"},"401":{"description":"Invalid authentication supplied"},"500":{"description":"A problem with the backend mail service was encountered"}}}},"/api/send/text":{"post":{"tags":["mail"],"summary":"sendText","description":"Endpoint to send a normal text/html email.","operationId":"sendText","parameters":[{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/TextMessageRequest"}}],"responses":{"200":{"description":"The mail was successfully sent.","schema":{"type":"string"}},"400":{"description":"The provided mail data was invalid"},"401":{"description":"Invalid authentication supplied"},"500":{"description":"A problem with the backend mail service was encountered"}}}}},"definitions":{"Attachment":{"type":"object","required":["contentBase64","fileName"],"properties":{"fileName":{"type":"string","description":"The attachment name"},"contentType":{"type":"string","description":"The content type, e.g. image/png"},"contentBase64":{"type":"string","description":"The full attachment encoded as base64 string"}},"description":"Defines mail attachment file."},"MailAddress":{"type":"object","required":["email"],"properties":{"name":{"type":"string","description":"The name of the contact (optional)"},"email":{"type":"string","description":"The email address"}},"description":"Defines a mail address with an optional name."},"TemplateRequest":{"type":"object","required":["subject","templateID","to"],"properties":{"to":{"type":"array","description":"Who the mail should be sent to","items":{"$ref":"#/definitions/MailAddress"}},"subject":{"type":"string","description":"The mail subject"},"cc":{"type":"array","description":"The CC field of the mail","items":{"$ref":"#/definitions/MailAddress"}},"bcc":{"type":"array","description":"The BCC field of the mail","items":{"$ref":"#/definitions/MailAddress"}},"senderAddress":{"description":"The sender of the mail. If not defined a default value like noreply@mail.bosch.com will be used.","$ref":"#/definitions/MailAddress"},"attachments":{"type":"array","description":"Optional file attachments.","items":{"$ref":"#/definitions/Attachment"}},"templateID":{"type":"integer","format":"int32","description":"The unique template ID"},"templateArguments":{"type":"object","description":"The values to fill into the mail template.","additionalProperties":{"type":"string"}}},"description":"This model defines a request to send a mail template."},"TextMessageRequest":{"type":"object","required":["subject","textPart","to"],"properties":{"to":{"type":"array","description":"Who the mail should be sent to","items":{"$ref":"#/definitions/MailAddress"}},"subject":{"type":"string","description":"The mail subject"},"cc":{"type":"array","description":"The CC field of the mail","items":{"$ref":"#/definitions/MailAddress"}},"bcc":{"type":"array","description":"The BCC field of the mail","items":{"$ref":"#/definitions/MailAddress"}},"senderAddress":{"description":"The sender of the mail. If not defined a default value like noreply@mail.bosch.com will be used.","$ref":"#/definitions/MailAddress"},"attachments":{"type":"array","description":"Optional file attachments.","items":{"$ref":"#/definitions/Attachment"}},"textPart":{"type":"string","description":"The plain text part of the message"},"htmlPart":{"type":"string","description":"The html part of the message (optional)"}},"description":"This model defines a request to send a plain text/html mail."}}}