Send Reply
Purpose
This API is used to reply to an email.
OAuth Scope
Use the scope
MailApps.messages.ALL (or) MailApps.messages.CREATE
ALL - Full access to the messages.
CREATE - Create a reply email.
To generate Authtoken, refer here.
Request URL
Method: POST
https://mail360.zoho.com/api/accounts/{account_key}/messages/{messageId}
Path Parameters
- account_key* string
- This is the unique key to identify a specific account. It is generated during account addition.
- This parameter can be fetched from Get all accounts API.
- messageId* string
- This is the unique key used to identify a specific email.
Request Body (JSON object)
- fromAddress* string
- Provide the sender's email address.
- ccAddress string
- Provide the recipient's email address for Cc.
- bccAddress string
- Provide the recipient's email addresses for Bcc.
- action* string
- Specifies the type of email-related action that should be performed on the message.
- The possible values can be:
- reply - specifies that the user intends to respond only to the sender of the original message.
- replyall - specifies that the user wishes to respond to both the sender and all other recipients of the original message.
- forward - specifies that the user wants to forward the original message to a new recipient or group of recipients.
- toAddress* string
- Provide the recipient's email address.
- This parameter becomes mandatory when the value of the action is set to forward.
- subject string
- Provide the subject of the email.
- content string
- Provide the content of the email.
- mailFormat string
- Specify the format in which the mail needs to be sent. The value can be
- html
- plaintext
- The default value is html.
- Specify the format in which the mail needs to be sent. The value can be
- inReplyTo string
- Provide the email address to which the recipients should reply.
- refHeader string
- Specifies the reference header.
- attachments Array of JSON objects
- This parameter is an array consisting of JSON objects.
- Each object in this array contain a key-value pair formatted as: "fileId" : "sampleID". The key, fileId, is constant across all objects. The value associated with fileId signifies the ID of the file that has been uploaded as an attachment and is of the string data type. This value can be obtained from Upload attachment API.
To Schedule an Email Reply:
With this API you can also schedule when to send your email reply. To schedule an email reply, follow the same procedure as above along with the upcoming additional parameters.
- isSchedule boolean
- Depending on whether the mail has to be scheduled or not, the value can be
- true - if the email should be scheduled.
- false - if the email should be sent immediately.
- Depending on whether the mail has to be scheduled or not, the value can be
- scheduleType int
- Specifies the type of scheduling.
- Provide the value as
- 6, to choose the custom date and time of your choice.
- timeZone string
- Specify the timezone to schedule your email.
- This parameter is mandatory if scheduleType is set to value 6. For example: GMT 5:30 (India Standard Time - Asia/Calcutta).
- scheduleTime string
- Specify the date and time you want to schedule your email.
- This parameter is mandatory if scheduleType is set to value 6. Format: MM/DD/YYYY HH:MM:SS. For example: 09/15/2023 14:30:28
* - Mandatory parameter
Note:
While the Messages APIs focus on individual messages, the Threads APIs deal with entire conversation threads, each of which contains multiple messages.
Sample request - Action : reply/replyall/forward
Copiedcurl "https://mail360.zoho.com/api/accounts/x7**00s/messages/167**01" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken 802432953.3e6146aa6bb42b3a1076454603fa7090.f4c5c6f05d0fa481454ecf321f04fd6c" \
-d '{
"fromAddress":"paul@zylker.com",
"content":"This is a test reply.",
"subject":"Re: test reply",
"action":"replyall"
}'