This API will soon be deprecated. Please use another API.

    Send Messages

    Sends a message.

    API Type

    Service API

    Request URL

    https://apis.worksmobile.com/{API ID}/mail/sendMail

    HTTP Method

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

    Request

    Parameter Type Required Description
    userName String Y Sender name
    to String Y The email addresses of to-recipients; each address is separated by a semicolon (;).
    Example) admin@example.com; admin1@example.com
    cc String N The email addresses of cc-recipients; each address is separated by a semicolon (;).
    Example) admin@example.com; admin1@example.com
    bcc String N The email addresses of bcc-recipients; each address is separated by a semicolon (;).
    Example) admin@example.com; admin1@example.com
    subject String Y Message subject
    text String N Message content
    saveSentMail String N Indicates whether to save the message in Sent Mail.
    ● true
    ● false
    FileName Multipart N The name of an attachment
    • The FileName is the name of a file to be attached. For example, you should put "file.text" in this parameter when a file named file.text is attached.

    Request Example

    https://apis.worksmobile.com/{API ID}/mail/sendMail

    Response

    It returns the value of the "data" property which contains the results when the API call succeeds.

    Property Type Required Description
    smtpFailList List Y List of email addresses which cannot be sent due to the SMTP error
    Example) nvmail051@example.com, nvmail052@example.com
    successList List Y List of email addresses which has been successfully sent
    Example) nvmail051@example.com, nvmail052@example.com
    dupAddrList List Y List of email addresses which are added more than once (not an error)
    Example) nvmail051@example.com, nvmail052@example.com
    dormantAddrList List Y List of dormant email addresses
    Example) nvmail051@example.com, nvmail052@example.com
    noneExistenceAddrList List Y List of email addresses which does not exist
    Example) nvmail051@example.com, nvmail052@example.com
    wrongAddrList List Y List of wrong email addresses
    Example) nvmail051@example.com, nvmail052@example.com

    Response Example

    {
    "message": "success",
        "code": "000"
        "data": {
         smtpFailList=[      
         ],
         successList=[
               nvmail051@example.com, nvmail052@example.com 
         ],
         dupAddrList=[         
         ],
         dormantAddrList=[        
         ],
         noneExistenceAddrList=[ 
         ],
         wrongAddrList=[        
         ]
    }
    
    }
    

    It returns an error code and message when the API call fails (refer to Response Common).

    Error Code Error Message Description
    100 Invalid parameter Data does not exist in To or Subject field.
    999 Unknown error Internal error