POST - Save Draft / Template

Purpose

The API is used to save content either as a draft or as a template.

Request URL 

https://mail.zoho.com/api/accounts/<accountId>/messages

Request Parameters

ParameterData TypeDescription
accountId*LongThe unique Zoho Account identifier associated with the particular account.

Request Body (JSON Object)

ParameterData TypeAllowed ValuesDescription
fromAddress*StringEmail AddressSender's email address for the From field (associated to the authenticated account)
toAddress*StringEmail AddressRecipient email address for the To field
mode* String
  • draft
  • template
Whether the content should be saved as a draft or a template
contentStringEmail contentThe content that should be saved as a draft or template
ccAddressStringEmail addressRecipient email address for the Cc field
bccAddressStringEmail addressRecipient email address for the Bcc field
subjectStringEmail subjectSubject of the email that should be sent 
encodingString
  • Big5
  • EUC-JP
  • EUC-KR
  • GB2312
  • ISO-2022-JP
  • ISO-8859-1
  • KOI8-R
  • Shift_JIS
  • US-ASCII
  • UTF-8
  • WINDOWS-1251
  • WINDOWS-1250
  • X-WINDOWS-ISO2022JP
The encoding which should be used in the email content. The default value is UTF-8.
mailFormatString
  • html
  • plaintext
Whether the email should be sent in HTML format or in plain text. The default value is html
askReceiptBoolean
  • yes
  • no
Whether an email receipt is necessary when the draft or the template is sent

* - Mandatory parameters

 Response Codes

Please refer Response Codes.

Sample Request

Copied{
        "mode": "draft",
        "subject": "Regd. Marketing Brochures",
        "fromAddress": "rebecca@zylker.com",
        "mailFormat": "html",
        "toAddress": "justinc@zylker.com",
        "content": "Hi Justin, please share the brochure content with the marketing team before proceeding with it. Thanks."
    }