Send Email

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Send a transactional email to one or more recipients.

Endpoint

post /email

Request URL

https://cpaas.zoho.com/v1.1/email Copied!

Request Parameters

- Request Headers

ApiKeyAuthAPI Key

API Key of an agent. Send the header as Authorization: Zoho-enczapikey {apiKey}.
Follow the steps here to generate an API key.

- Request Body

application/json
JSON Object
Show Sub-Attributes
fromobjectMandatory

The sender's email address and optional display name.

addressstringMandatory
Example
accounts@info.zylker.com
namestringOptional
Example
Paula
toarray[object]Mandatory

Array of recipient email addresses.

email_addressJSON ObjectOptional
Show Sub-Attributes
addressstringOptional
Example
rudra.d@zylker.com
namestringOptional
Example
Rudra
ccarray[object]Optional

Array of CC recipient email addresses.

email_addressJSON ObjectOptional
Show Sub-Attributes
addressstringOptional
Example
manager@zylker.com
namestringOptional
Example
Manager
bccarray[object]Optional

Array of BCC recipient email addresses.

email_addressJSON ObjectOptional
Show Sub-Attributes
addressstringOptional
Example
archive@zylker.com
namestringOptional
Example
Archive
reply_toarray[object]Optional

Reply-to email address.

addressstringOptional
Example
support@zylker.com
namestringOptional
Example
Support
subjectstringMandatory

Subject line of the email.

Example
Account Confirmation
htmlbodystringOptional

HTML content of the email body.

Example
<div><b>Kindly click on Verify Account to confirm your account.</b></div>
textbodystringOptional

Plain text content of the email body.

Example
Kindly click on Verify Account to confirm your account.
attachmentsarray[object]Optional

Array of file attachments.

file_cache_keystringOptional
Example
fc-xxxx-xxxx
mime_typestringOptional
Example
application/pdf
namestringOptional
Example
invoice.pdf
contentstringOptional

Base64-encoded file content.

inline_imagesarray[object]Optional

Array of inline images embedded in the email body.

mime_typestringOptional
Example
image/png
namestringOptional
Example
logo.png
contentstringOptional

Base64-encoded image content.

cidstringOptional
Example
logo
track_clicksbooleanOptional

Enable or disable click tracking.

Example
true
track_opensbooleanOptional

Enable or disable open tracking.

Example
true
client_referencestringOptional

A custom reference string to identify the email in your system.

Example
order-12345
mime_headersobjectOptional

Custom MIME headers to add to the email.

Additional propertiesstring
Any additional property defined using a custom key.

Sample Request

Curl
Java
Python
Deluge
Copied!
curl --request POST \
  --url https://cpaas.zoho.com/v1.1/email \
  --header 'Authorization: REPLACE_KEY_VALUE' \
  --header 'content-type: application/json' \
  --data '{"from":{"address":"accounts@info.zylker.com","name":"Paula"},"to":[{"email_address":{"address":"rudra.d@zylker.com","name":"Rudra"}}],"cc":[{"email_address":{"address":"manager@zylker.com","name":"Manager"}}],"bcc":[{"email_address":{"address":"archive@zylker.com","name":"Archive"}}],"reply_to":[{"address":"support@zylker.com","name":"Support"}],"subject":"Account Confirmation","htmlbody":"<div><b>Kindly click on Verify Account to confirm your account.</b></div>","textbody":"Kindly click on Verify Account to confirm your account.","attachments":[{"file_cache_key":"fc-xxxx-xxxx","mime_type":"application/pdf","name":"invoice.pdf","content":"string"}],"inline_images":[{"mime_type":"image/png","name":"logo.png","content":"string","cid":"logo"}],"track_clicks":true,"track_opens":true,"client_reference":"order-12345","mime_headers":{"property1":"string","property2":"string"}}'

Sample Request Body

Copied!
  {
    "from": {
      "address": "accounts@info.zylker.com",
      "name": "Paula"
    },
    "to": [
      {
        "email_address": {
          "address": "rudra.d@zylker.com",
          "name": "Rudra"
        }
      }
    ],
    "cc": [
      {
        "email_address": {
          "address": "manager@zylker.com",
          "name": "Manager"
        }
      }
    ],
    "bcc": [
      {
        "email_address": {
          "address": "archive@zylker.com",
          "name": "Archive"
        }
      }
    ],
    "reply_to": [
      {
        "address": "support@zylker.com",
        "name": "Support"
      }
    ],
    "subject": "Account Confirmation",
    "htmlbody": "<div><b>Kindly click on Verify Account to confirm your account.</b></div>",
    "textbody": "Kindly click on Verify Account to confirm your account.",
    "attachments": [
      {
        "file_cache_key": "fc-xxxx-xxxx",
        "mime_type": "application/pdf",
        "name": "invoice.pdf",
        "content": "string"
      }
    ],
    "inline_images": [
      {
        "mime_type": "image/png",
        "name": "logo.png",
        "content": "string",
        "cid": "logo"
      }
    ],
    "track_clicks": true,
    "track_opens": true,
    "client_reference": "order-12345",
    "mime_headers": {
      "property1": "string",
      "property2": "string"
    }
  }
                
▼ Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Show Sub-Attributes
dataarray[object]
messagestringread-only
Example
OK
request_idstringread-only
Example
req-xxxx

- HTTP code 400

Response Body - application/json
JSON Object
Show Sub-Attributes
dataJSON Object
Show Sub-Attributes
error_codestringread-only
Example
TM_3004
messagestringread-only
Example
Invalid request
messagestringread-only
Example
error

Sample Response: HTTP 200

Copied!
  {
    "data": [
      {
        "code": "EM_104",
        "additional_info": [
          {
            "to": {
              "email_address": {}
            }
          }
        ],
        "message": "OK"
      }
    ],
    "message": "OK",
    "request_id": "req-xxxx"
  }
                
▼ Show full

Sample Response: HTTP 400

Copied!
  {
    "data": {
      "error_code": "TM_3004",
      "message": "Invalid request"
    },
    "message": "error"
  }
                
▼ Show full