openapi: 3.0.2
info:
    title: '@atlas/api-gateway'
    version: 1.28.7
servers:
    -
        url: 'https://api.mocha.atlashcl.com/api'
paths:
    /authentication/login:
        post:
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/LoginRequest'
                required: true
            tags:
                - authentication
            parameters:
                -
                    name: origin
                    description: Whitelisted site list is maintained on per tenant basis to allow user login.
                    schema:
                        default: localhost
                        type: string
                    in: header
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/LoginResult'
                    description: Login request succeeded
                '400':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ResponseBaseStructure'
                    description: The user should provide password in payload
                '401':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ResponseBaseStructure'
                    description: No match user found for provided username and password pair
            operationId: authentication.login
            summary: Sign in as a user with an email and password
    /authentication/validate:
        get:
            tags:
                - authentication
            parameters:
                - $ref: '#/components/parameters/headerAuthorization'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ResponseBaseStructure'
                    description: Session is valid
                '401':
                    content:
                        application/json:
                            schema:
                               $ref: '#/components/schemas/ResponseBaseStructure'
                    description: Session is invalid
            operationId: authentication.validateToken
            summary: Validate user JWT token
    /authentication/logout:
        get:
            tags:
                - authentication
            parameters:
                - $ref: '#/components/parameters/headerAuthorization'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ResponseBaseStructure'
                    description: Logout request succeeded
            operationId: authentication.logout
            summary: Invalidate HttpOnly cookies
    /authentication/methods:
        get:
            tags:
                - authentication
            parameters:
                -
                    name: cobrand
                    description: Target cobrand
                    schema:
                        type: string
                    in: query
                    required: true
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/LoginMethods'
                    description: Query request succeeded
                '404':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ResponseBaseStructure'
                    description: Target cobrand not found
            operationId: authentication.getCobrandSupportedAuthMethod
            summary: Get list of supported authentication methods
    /preference:
        get:
            tags:
                - preference
            parameters:
                - $ref: '#/components/parameters/headerAuthorization'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PreferenceResult'
                    description: Query request succeeded
            operationId: preference.getPreferences
            summary: Get user preference(s)
    /preference/signature:
        get:
            tags:
                - preference
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SignatureResult'
                    description: Query request succeeded
            operationId: preference.getSignature
            summary: Get saved HTML signature
    '/config/customers/{customerId}':
        get:
            tags:
                - config
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathCustomerId'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                              $ref: '#/components/schemas/ConfigCustomerResult'
                    description: Query request succeeded
            operationId: config.customerGetAllConfig
            summary: Get all customer config
        parameters:
            -
                name: customerId
                schema:
                    type: string
                in: path
                required: true
    '/admin/customers/{customerId}':
        get:
            tags:
                - admin
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathCustomerId'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminCustomerResult'
                    description: Query request succeeded
            operationId: admin.getCustomerInfo
            summary: Get customer info from administration perspective
        parameters:
            -
                name: customerId
                schema:
                    type: string
                in: path
                required: true
    /tags:
        get:
            tags:
                - tags
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/queryFolderKey'
                -
                    $ref: '#/components/parameters/queryOffset'
                -
                    $ref: '#/components/parameters/queryLimit'
                -
                    $ref: '#/components/parameters/queryFormat'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TaglistResult'
                    description: Query request succeeded
            operationId: tags.getTags
            summary: List folders in Mailbox
    '/tags/{folderId}':
        put:
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/FolderRequest'
                required: true
            tags:
                - tags
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathFolderId'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/FolderResult'
                    description: Put request succeeded
            operationId: tags.putAction
            summary: General Functions for handle PUT
        post:
            tags:
                - tags
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathFolderId'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                allOf:
                                    -
                                        $ref: '#/components/schemas/ResponseBaseStructure'
                                    -
                                        type: object
                                        properties:
                                            data:
                                                type: array
                                                items:
                                                    $ref: '#/components/schemas/Folder'
                    description: Query request succeeded
            operationId: tags.createTag
            summary: Create folder
        delete:
            tags:
                - tags
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathFolderId'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TaglistResult'
                    description: Delete request succeeded
            operationId: tags.deleteTag
            summary: Delete folder
        parameters:
            -
                name: folderId
                schema:
                    type: string
                in: path
                required: true
    /messages:
        get:
            tags:
                - messages
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/queryFolderKey'
                -
                    $ref: '#/components/parameters/queryOffset'
                -
                    $ref: '#/components/parameters/queryLimit'
                -
                    $ref: '#/components/parameters/queryFormat'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MessagesResult'
                    description: Query request succeeded
            operationId: messages.listMessages
            summary: List messages
        put:
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/MessagesRequest'
                required: true
            tags:
                - messages
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ResponseBaseStructure'
                    description: Put request succeeded
            operationId: messages.updateMessages
            summary: 'Operation on multiple messages. Including marking flags, and moving messages to another folder'
        post:
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/MessageRequestBody'
                required: true
            tags:
                - messages
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    name: send
                    description: |
                        `true` means send, while `false` means save as draft
                    schema:
                        default: false
                        type: boolean
                    in: query
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MessageResponse'
                    description: Query request succeeded
            operationId: messages.createMessage
            summary: Save/send a message
    '/messages/{messageId}/notify':
        post:
            tags:
                - messages
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathMessageId'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ResponseBaseStructure'
                    description: Notified disposition recipients succeeded
            operationId: messages.notifyDisposition
            summary: Notify the people listed in message receipt
        parameters:
            -
                name: messageId
                schema:
                    type: string
                in: path
                required: true
    '/messages/{messageIds}':
        get:
            tags:
                - messages
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathMessageIds'
                -
                    $ref: '#/components/parameters/queryFormat'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MessageItemResponse'
                    description: Query request succeeded
            operationId: messages.fetchMessages
            summary: 'Get messages. Support multiple message ids, comma separated.'
        delete:
            tags:
                - messages
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathMessageIds'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ResponseBaseStructure'
                    description: Delete request succeeded
            operationId: messages.deleteMessages
            summary: Delete an existing message resource by its mail uid.
        parameters:
            -
                name: messageIds
                schema:
                    type: string
                in: path
                required: true
    '/messages/{messageId}/attachments':
        post:
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AttachmentRequest'
                required: true
            tags:
                - messages
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathMessageId'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AttachmentResponse'
                    description: Post request succeeded
            operationId: messages.addAttachment
            summary: >-
                Add attachment to the draft/message. A draft is automatically generated if the message
                targetted is not a draft.
        parameters:
            -
                name: messageId
                schema:
                    type: string
                in: path
                required: true
    '/messages/{messageId}/attachments/{attachmentId}/download':
        post:
            tags:
                - messages
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathMessageId'
                -
                    $ref: '#/components/parameters/pathAttachmentId'
                -
                    name: save
                    description: >
                        `true` means download, while `false` means preview.

                        This flag determines what value does the API set for header `content-disposition` and
                        `content-type`.
                    schema:
                        type: boolean
                    in: query
            responses:
                '200':
                    description: Query request succeeded. Content-Type varies depending on the attachment.
            operationId: messages.downloadAttachmentById
            summary: Downloads the attachment as a binary
            description: |
                No XHR.
                Ideally, this could just be a link, but then we can't send the Auth header. (We could have the
                token as part of the query string but that will be kept in the browser's history, presenting a
                possible security issue.)
                <br><br>
                So, to solve all this, the browser will submit a form with target="_blank" to cause the
                returned data from this endpoint to open in a new tab. The browser can then handle the
                download or just preview in that tab. The auth token is one of the form's "fields" and will be
                part of the request body. For this reason, this endpoint is also a POST instead of a GET.
        parameters:
            -
                name: messageId
                schema:
                    type: string
                in: path
                required: true
            -
                name: attachmentId
                schema:
                    type: string
                in: path
                required: true
    '/messages/{messageId}/attachments/{attachmentIds}':
        delete:
            tags:
                - messages
            parameters:
                -
                    $ref: '#/components/parameters/headerAuthorization'
                -
                    $ref: '#/components/parameters/pathMessageId'
                -
                    $ref: '#/components/parameters/pathAttachmentIds'
            responses:
                '200':
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AttachmentResponse'
                    description: Query request succeeded
            operationId: messages.deleteAttachment
            summary: Delete attachment(s)
        parameters:
            -
                name: attachmentIds
                schema:
                    type: string
                in: path
                required: true
            -
                name: messageId
                schema:
                    type: string
                in: path
                required: true
components:
    schemas:
        AttachmentRequest:
            required:
                - filename
                - base64
            type: object
            properties:
                filename:
                    default: testing.txt
                    type: string
                base64:
                    format: byte
                    description: 'File content, base64 encoded string'
                    default: 'data:text/plain;base64,dGVzdGluZw=='
                    type: string        
        AttachmentResponse:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/AttachmentResponseArray'
        AttachmentResponseArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/AttachmentResponseDetails'
        AttachmentResponseDetails:
            type: object
            required:
                - id
                - attachments
            properties:
                id:
                    type: string
                    description: New message id
                attachments:
                    type: array
                    items:
                        $ref: '#/components/schemas/AttachmentOverview'
        LoginRequest:
            required:
                - username
            type: object
            properties:
                username:
                    type: string
                password:
                    type: string
        LoginResult:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/LoginResultArray'
        LoginResultArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/LoginResultDetail'
        LoginResultDetail:
            type: object
            properties:
                token:
                    description: |
                        A Bearer token. Inside the token, there should be:
                          - locale, default: "en-us"
                          - status?
                    default: Bearer eeeeeee.eeeeeee.eeeee
                    type: string
        LoginMethods:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/LoginMethodsArray'
        LoginMethodsArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/LoginMethodsDetails'
        LoginMethodsDetails:
            type: object
            properties:
                method:
                    description: Authentication method
                    default: basic
                    enum:
                        - basic
                    type: string
        MessagesRequest:
            required:
                - updates
            type: object
            properties:
                updates:
                    type: array
                    items:
                        $ref: '#/components/schemas/MessagesRequestItem'
        MessagesRequestItem:
            type: object
            required:
                - id
            properties:
                id:
                    description: Operation target message id
                    type: string
                flag:
                    nullable: true
                    description: >
                        `true` means flag the message, while `false` means unflag
                        the message.

                        To not touch the `flag` state, simply not have this key.
                    type: boolean
                unread:
                    nullable: true
                    description: >
                        `true` means mark the message as read, while `false` means
                        mark the message as unread.

                        To not touch the `read` state, simply not have this key.
                    type: boolean
                spam:
                    nullable: true
                    description: >
                        `true` means mark as spam, while `false` means unmark as
                        spam.

                        To not touch the `spam` state, simply not have this key.
                    type: boolean
                tags:
                    nullable: true
                    type: array
                    items:
                        description: |
                            Folder id that the message is moving into.
                            To not move the message, simply not have this key.
                        default: INBOX
                        type: string            
        MessagesResult:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/MessagesResultArray'        
        MessagesResultArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/Message'
        MessageRequestBody:
            required:
                - from
            type: object
            properties:
                from:
                    $ref: '#/components/schemas/RFC822Address'
                to:
                    type: array
                    items:
                        $ref: '#/components/schemas/RFC822Address'
                cc:
                    type: array
                    items:
                        $ref: '#/components/schemas/RFC822Address'
                bcc:
                    type: array
                    items:
                        $ref: '#/components/schemas/RFC822Address'
                draftUID:
                    description: Inherit attachments and headers from another message.
                    type: string
                subject:
                    type: string
                message:
                    description: HTML content.
                    type: string
                importance:
                    enum:
                        - normal
                        - high
                    type: string
                reply:
                    description: target message to mark `replied` flag.
                    type: string
                forward:
                    description: target message to mark `forwarded` flag.
                    type: string
                isReturnReceiptRequested:
                    description: >-
                        Request the receipient to send you a receipt when they read the
                        message.
                    type: boolean
                saveSent:
                    description: Whether to save a sent copy in `SENT` folder.
                    type: boolean        
        MessageResponse:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/MessageResponseBody'
        MessageResponseBody:
            type: object
            properties:
                data:
                    type: array
                    items:
                       $ref: '#/components/schemas/MessageResponseBodyDetails' 
        MessageResponseBodyDetails:
            required:
                - id
                - attachments
            type: object
            properties:
                id:
                    description: New message id
                    type: string
                attachments:
                    type: array
                    items:
                        $ref: '#/components/schemas/AttachmentOverview'    
        MessageItemResponse:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/MessageItemResponseArray'
        MessageItemResponseArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/MessagesMultiStatus'            
        PreferenceResult:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/PreferenceResultArray'
        PreferenceResultArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/PreferenceResultDetails'
        PreferenceResultDetails:
            type: object
            properties:
                blockimg:
                    enum:
                        - 'true'
                        - 'false'
                    type: string
                messageonreply:
                    enum:
                        - 'true'
                        - 'false'
                    type: string
                savesentcopy:
                    enum:
                        - 'true'
                        - 'false'
                    type: string
                calendar.week.start:
                    default: 0
                    type: integer
                mail.return-receipt.reply:
                    enum:
                        - ASK
                        - ALWAYS
                        - NEVER
                    type: string
                ui.contacts.name.order:
                    enum:
                        - FN_LN
                        - LN_FN
                    type: string
                language:
                    default: en-us
                    type: string
                firstname:
                    type: string
                lastname:
                    type: string
                maxuploadfile:
                    default: 10
                    type: integer
                maxuploadsize:
                    default: 30
                    type: integer
                ios.qr.code.url:
                    type: string
                ios.qr.code.src:
                    type: string
        SignatureResult:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/SignatureResultArray'
        SignatureResultArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/SignatureResultDetails'
        SignatureResultDetails:
            type: object
            properties:
                content:
                    description: HTML signature saved
                    default: <p>This is a signature</p>
                    type: string
                inUse:
                    description: >-
                        Whether the related cooresponding signature is
                        being used.
                    type: boolean
        ConfigCustomerResult:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/ConfigCustomerResultArray'
        ConfigCustomerResultArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/ConfigCustomerResultDetails'        
        ConfigCustomerResultDetails:
            type: object
            properties:
                service.setting.server.ext.mail.imap.hostName:
                    type: string
                service.setting.server.ext.mail.imap.portNumber:
                    type: string
                service.setting.server.ext.mail.pop.hostName:
                    type: string
                service.setting.server.ext.mail.pop.portNumber:
                    type: string
                service.setting.server.ext.mail.smtp.hostName:
                    type: string
                service.setting.server.ext.mail.smtp.portNumber:
                    type: string
                customer.logo:
                    description: Base64 encoded image
                    type: string
                customer.color.theme:
                    type: string
                customer.custom.navbar.links.first.level:
                    type: string
                customer.custom.navbar.links.second.level:
                    description: |
                        Customized menus appearing on the Mail UI
                        Sample: JSON.stringify([{
                          title: 'Sample Link',
                          description: 'This is the description',
                          value: 'https://www.google.com'
                        }])
                    type: string
                customer.custom.css:
                    description: css string that customizes the Mail UI
                    type: string        
        AdminCustomerResult:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/AdminCustomerResultArray'
        AdminCustomerResultArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/AdminCustomerResultDetails'        
        AdminCustomerResultDetails:
            type: object
            properties:
                organization:
                    description: 'Customer name, to be displayed on the Mail UI'
                    type: string
        FolderRequest:
            required:
                - action
            type: object
            properties:
                action:
                    enum:
                        - rename
                        - empty
                    type: string
                newFolderName:
                    type: string            
        FolderResult:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/FolderResultArray'
        FolderResultArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/Folder'
        TaglistResult:
            allOf:
                - $ref: '#/components/schemas/ResponseBaseStructure'
                - $ref: '#/components/schemas/TaglistResultArray'
        TaglistResultArray:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/Folder'
        MultiStatusMustHave:
            required:
                - id
                - _status
            type: object
            properties:
                id:
                    description: The original matching key for specific resource
                    type: string
                _status:
                    description: HTTP status code as if the call is made to operate on only one item
                    default: 200
                    type: integer
        ResponseBaseStructure:
            properties:
                data:
                    type: array
                    items:
                        type: object
                metadata:
                    required:
                        - message
                        - reqId
                    type: string
                    properties:
                        message:
                            type: string
                        reqId:
                            type: string
        RFC822Address:
            description: RFC822 email address.
            type: string
        Folder:
            required:
                - id
            type: object
            properties:
                id:
                    type: string
                name:
                    description: Folder name to display
                    type: string
                path:
                    type: string
                system:
                    enum:
                        - '0'
                        - '1'
                    type: integer
                timestamp:
                    description: Unix timestamp that the folder last has its messages updated.
                    type: integer
                total:
                    description: Total number of messages inside
                    type: integer
                count:
                    description: Number of unread messages inside
                    type: integer
        AttachmentOverview:
            required:
                - id
                - filename
                - size
                - contentType
            type: object
            properties:
                id:
                    type: string
                filename:
                    type: string
                size:
                    description: 'Attachment size, in byte(s)'
                    type: number
                contentType:
                    default: application/ics
                    type: string
        Message:
            required:
                - id
            type: object
            properties:
                id:
                    type: string
                arrival:
                    description: Unix timestamp that the message gets into the system
                    type: string
                has:
                    type: array
                    items:
                        enum:
                            - attachment
                        type: string
                is:
                    type: array
                    items:
                        enum:
                            - unread
                            - draft
                            - flagged
                            - replied
                            - forwarded
                            - receipt-requested
                            - receipt-replied
                            - event
                        type: string
                rfcBCC:
                    $ref: '#/components/schemas/RFC822Address'
                rfcCC:
                    $ref: '#/components/schemas/RFC822Address'
                rfcDate:
                    description: Unix timestamp that the message claims it was created
                    type: string
                rfcSubject:
                    type: string
                rfcTo:
                    $ref: '#/components/schemas/RFC822Address'
                rfcFrom:
                    $ref: '#/components/schemas/RFC822Address'
                rfcReplyAddress:
                    description: Email address should the recipient wants to reply the message
                    type: string
                body:
                    description: Body content of the message. Only returned when queried with `full` format
                    type: string
                attachments:
                    type: array
                    items:
                        $ref: '#/components/schemas/AttachmentOverview'
                size:
                    description: 'Message size, in byte(s)'
                    type: string
                snippet:
                    description: 'Snippet of the message, usually is the plain text alternative part of the message'
                    type: string
                tags:
                    description: Folders the message is in
                    type: array
                    items:
                        default: INBOX
                        type: string
        MessagesMultiStatus:
            type: object
            properties:
                data:
                    type: array
                    items:
                        $ref: '#/components/schemas/MessagesMultiStatusDetails'
        MessagesMultiStatusDetails:
            allOf:
                - $ref: '#/components/schemas/MultiStatusMustHave'
                - $ref: '#/components/schemas/Message'                        
    parameters:
        headerAuthorization:
            name: authorization
            description: Bearer token obtained from `POST /authentication/login`
            schema:
                type: string
            in: header
            required: true
        pathCustomerId:
            name: customerId
            description: Id that identifies a customer
            schema:
                type: string
            in: path
            required: true
        pathFolderId:
            name: folderId
            description: Id that identifies a folder
            schema:
                default: INBOX
                type: string
            in: path
            required: true
        pathMessageId:
            name: messageId
            description: Id that identifies a message
            schema:
                type: string
            in: path
            required: true
        pathMessageIds:
            name: messageIds
            description: 'Ids that identifie multiple messages, seperated by comma'
            schema:
                type: string
            in: path
            required: true
        pathAttachmentId:
            name: attachmentId
            description: Id that identifies an attachment
            schema:
                type: string
            in: path
            required: true
        pathAttachmentIds:
            name: attachmentIds
            description: 'Ids that identifie multiple attachments, seperated by comma'
            schema:
                type: string
            in: path
            required: true
        queryOffset:
            name: offset
            description: Offset anchor to be used with pagination
            schema:
                default: 0
                type: number
            in: query
        queryLimit:
            name: limit
            description: Number of items to be fetched with pagination
            schema:
                default: 0
                type: number
            in: query
        queryFormat:
            name: format
            schema:
                enum:
                    - minimal
                    - metadata
                    - full
                type: string
            in: query
        queryFolderKey:
            name: folderId
            description: Id that identifies a folder
            schema:
                type: string
            in: query
    securitySchemes:
        bearerAuth:
            scheme: bearer
            bearerFormat: JWT
            type: http
security:
    -
        bearerAuth: []
tags:
    -
        name: authentication
    -
        name: preference
    -
        name: config
    -
        name: admin
    -
        name: tags
    -
        name: messages
