Migrate Messages

    Converts messages into a single .eml file and saves it in the specified user folder.

    Caution

    • You should call the "Start Mail Migration" API (startSaveEml) before using this API.
    • Email messages of up to 20 accounts for each tenantId can be migrated at the same time.
    • If the specified folder does not exist, the EML file is saved in Inbox.

    API Type

    Server API

    Request URL

    https://apis.worksmobile.com/r/{API ID}/mail/v2/saveEml

    HTTP Method

    POST(Content-Type: multipart/form-data; boundary="$boundary”; charset=UTF-8)

    Request

    Parameter Type Required Description
    targetMemberEmail String Y Email address to save the EML file to.
    file MultipartFile Y EML file to attach
    folderSN Integer Y Folder to save the EML file in.
    It is 0 by default, which means Inbox.
    isRead Boolean N Indicates whether to mark the message containing the EML file as read or unread.
    ● true: Read (default)
    ● false: Unread

    Response

    It returns HTTP status 200 with response data in JSON format if the API call is successful.

    Property Type Required Description
    savedMailSN Integer Y Serial number of the message containing the EML file

    Response Example

    {"savedMailSN":437953}
    

    Error

    It returns an error code and message with HTTP status when the API call fails.

    Property Type Description
    code String Error code
    message String Error message
    HTTP status Error code Description
    400 BAD_REQUEST The startSaveEml API was not called.
    409 SC_CONFLICT The maximum number of migrations by tenantId was exceeded.
    500 SYSTEM_ERROR Internal server error
    Error Example
    {
        "code": "SC_CONFLICT",
        "message": "The number of migrations by tenantId exceeded.",
        "domain": "mail"
    }