email management

Send Email Using Template

Send a transactional email using a pre-created CPaaS template.

post/email/template

Request

  • Base URL
    https://cpaas.zoho.com/v1.1
  • Auth
    API key in header Authorization

Request body

template_keystring

Unique key of the email template. Use either template_key or template_alias.

client_referencestring

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

bounce_addressstring email

Verified bounce (Return-Path) address that receives bounce notifications for this email. Must be a bounce address created and verified under the sending agent's domain.

merge_infoMergeInfo

Key-value pairs to replace template variables.

track_opensboolean

Enable or disable open tracking.

template_aliasstring

Alias of the email template. Use either template_alias or template_key.

track_clicksboolean

Enable or disable click tracking.

Example request

{
  "cc": [
    {
      "email_address": {
        "address": "manager@zylker.com",
        "name": "Manager"
      }
    }
  ],
  "template_key": "1234567890",
  "client_reference": "order-12345",
  "bcc": [
    {
      "email_address": {
        "address": "archive@zylker.com",
        "name": "Archive"
      }
    }
  ],
  "attachments": [
    {
      "mime_type": "application/pdf",
      "name": "invoice.pdf",
      "content": "JVBERi0xLjQKJcTl8uXrp... (base64-encoded bytes)"
    },
    {
      "file_cache_key": "ea36f19a.a59e41437e3e1a1.h1.bbeabef0-d2c5-11f1-8876-2a30dd3b833c.1a18258b05f",
      "name": "terms.pdf"
    }
  ],
  "bounce_address": "bounce@bounce-zem.zylker.com",
  "merge_info": {
    "account_id": "98765",
    "user_name": "Rudra"
  },
  "track_opens": true,
  "reply_to": [
    {
      "address": "support@zylker.com",
      "name": "Support"
    }
  ],
  "from": {
    "address": "accounts@info.zylker.com",
    "name": "Paula"
  },
  "template_alias": "account-confirmation",
  "to": [
    {
      "email_address": {
        "address": "rudra.d@zylker.com",
        "name": "Rudra"
      }
    }
  ],
  "track_clicks": true
}

Response

Email sent using template successfully.

messagestring
request_idstring

Example response

{
  "data": [
    {
      "code": "EM_104",
      "message": "OK"
    }
  ],
  "message": "OK",
  "request_id": "req-xxxx"
}

Changes

No recorded changes to this operation across all 1 revision of this API.