# Zoho ZeptoMail

> Transactional email (now Zoho CPaaS). Send emails and templates, and manage agents, templates, domains, email logs and suppressions.

App · Email · 20 actions. Web page: https://docs.lodol.com/docs/integrations/zoho-zeptomail

## Actions

### Add suppressions

Stop ZeptoMail sending to email addresses or domains.

**Inputs**

- List (`suppression_type`, text): Email addresses (the default) or whole domains. One of: `email` (Email addresses), `domain` (Domains). Default: `email`.
- Values (`values`, text, required): Email addresses or domains, comma-separated.
- Action (`suppression_action`, text): Optional. Suppress (the default) skips them silently; reject fails the send; suppress tracking (email addresses only) sends without open and click tracking. One of: `reject`, `suppress`, `suppress_tracking` (Suppress tracking). Default: `suppress`.
- Agents (`mailagent_keys`, list): Optional. Only these agents; blank means every agent.
- Description (`description`, text): Optional. Why they are suppressed.

**Outputs**: What was added to the suppression list.

- `action` (text): reject, suppress or suppress_tracking.
- `description` (text): The description.
- `mailagent_keys` (list): The agents it applies to; all when empty.
- `modified_time` (text): When the entries were added.
- `suppression_type` (text): email or domain.
- `values` (list): The values added.

**Example output**

```json
{
  "action": "suppress",
  "description": "Hard bounce",
  "mailagent_keys": [
    "1ac36788bcb06e03"
  ],
  "modified_time": "01 Mar 2026 04:44 PM",
  "suppression_type": "email",
  "values": [
    "bounced@example.com"
  ]
}
```

### Check domain verification

Ask ZeptoMail to re-check a domain's DNS records. 'verified' says whether they are in place.

**Inputs**

- Domain (`domain_key`, text, required): The domain. Its key from 'List domains' works too.

**Outputs**: A sending domain with the DNS records it needs.

- `associated_mailagents` (list): The agents the domain is added to.
- `cname` (object): The bounce CNAME record.
- `dkim` (object): The DKIM TXT record.
- `domain_key` (text): The domain's key.
- `domain_name` (text): The domain name.
- `is_restricted_senders` (true/false): Whether only listed sender addresses may send.
- `status` (text): verified or unverified.
- `verified` (true/false): Whether ZeptoMail has verified the domain.

**Example output**

```json
{
  "associated_mailagents": [
    "Transactional"
  ],
  "cname": {
    "cname_record": "cluster89.zeptomail.com",
    "host": "bounce-zem.mail.example.com",
    "status": "verified"
  },
  "dkim": {
    "host": "12345._domainkey.mail.example.com",
    "public_key": "k=rsa; p=MIGfMA0GCSqGSIb3DQEB...",
    "selector": "12345",
    "status": "verified"
  },
  "domain_key": "d5e1c4b2a3f60718",
  "domain_name": "mail.example.com",
  "is_restricted_senders": false,
  "status": "verified",
  "verified": true
}
```

### Create agent

Create an agent. Add a verified domain to it in ZeptoMail before sending through it.

**Inputs**

- Agent name (`agent_name`, text, required): The agent's name, unique in the account (up to 100 characters).
- Description (`description`, text): Optional. What the agent is for.

**Outputs**: An agent: a separate sending stream with its own Send Mail token.

- `created_time` (text): When the agent was created, e.g. 04 Jun 2025 08:19 PM.
- `description` (text): The agent's description.
- `mailagent_key` (text): The agent's key; templates and logs are per agent.
- `mailagent_name` (text): The agent's name.
- `status` (text): active, inactive, blocked or shutdown.

**Example output**

```json
{
  "created_time": "04 Jun 2026 08:19 PM",
  "description": "Order and account emails",
  "mailagent_key": "1ac36788bcb06e03",
  "mailagent_name": "Transactional",
  "status": "active"
}
```

### Create template

Create an email template in an agent. Use {{name}}-style merge tags in the subject and body.

**Inputs**

- Agent (`mailagent_key`, text, required): The agent. Its key from 'List agents' works too.
- Template name (`template_name`, text, required): The template's name.
- Subject (`subject`, text, required): The subject, up to 500 characters.
- HTML body (`html_body`, text, required): The template's HTML body.
- Template alias (`template_alias`, text): Optional. A unique alias to send with instead of the key.

**Outputs**: An email template.

- `created_time` (text): When the template was created.
- `htmlbody` (text): The HTML body (only returned when reading one template).
- `modified_time` (text): When the template was last changed.
- `sample_merge_info` (object): Sample merge values, by merge tag.
- `subject` (text): The subject; {{name}} merge tags are filled when sending.
- `template_alias` (text): The template's alias, an alternative to the key.
- `template_key` (text): The template's key; use it to send with the template.
- `template_name` (text): The template's name.

**Example output**

```json
{
  "created_time": "04 Jun 2026 08:30 PM",
  "htmlbody": "<p>Hello {{name}}</p>",
  "modified_time": "04 Jun 2026 08:30 PM",
  "subject": "Welcome, {{name}}",
  "template_alias": "welcome",
  "template_key": "2d6f.6c2b6a1e0f3a5b7c.k1.0a1b2c3d-4e5f-6789-abcd-ef0123456789",
  "template_name": "Welcome"
}
```

### Delete agent

Permanently delete an agent, with its templates and Send Mail tokens.

**Inputs**

- Agent (`mailagent_key`, text, required): The agent. Its key from 'List agents' works too.

**Outputs**: The deleted agent.

- `deleted` (true/false): Always true.
- `mailagent_key` (text): The deleted agent's key.
- `message` (text): ZeptoMail's confirmation.

**Example output**

```json
{
  "deleted": true,
  "mailagent_key": "1ac36788bcb06e03",
  "message": "Mail Agent deleted successfully."
}
```

### Delete template

Permanently delete a template.

**Inputs**

- Agent (`mailagent_key`, text, required): The agent. Its key from 'List agents' works too.
- Template (`template_key`, text, required): The template. Its key from 'List templates' works too.

**Outputs**: The deleted template.

- `deleted` (true/false): Always true.
- `message` (text): ZeptoMail's confirmation.
- `template_key` (text): The deleted template's key.

**Example output**

```json
{
  "deleted": true,
  "message": "Template deleted successfully.",
  "template_key": "2d6f.6c2b6a1e0f3a5b7c.k1.0a1b2c3d-4e5f-6789-abcd-ef0123456789"
}
```

### Get domain

Get a domain with the DKIM and bounce DNS records it needs.

**Inputs**

- Domain (`domain_key`, text, required): The domain. Its key from 'List domains' works too.

**Outputs**: A sending domain with the DNS records it needs.

- `associated_mailagents` (list): The agents the domain is added to.
- `cname` (object): The bounce CNAME record.
- `dkim` (object): The DKIM TXT record.
- `domain_key` (text): The domain's key.
- `domain_name` (text): The domain name.
- `is_restricted_senders` (true/false): Whether only listed sender addresses may send.
- `status` (text): verified or unverified.
- `verified` (true/false): Whether ZeptoMail has verified the domain.

**Example output**

```json
{
  "associated_mailagents": [
    "Transactional"
  ],
  "cname": {
    "cname_record": "cluster89.zeptomail.com",
    "host": "bounce-zem.mail.example.com",
    "status": "verified"
  },
  "dkim": {
    "host": "12345._domainkey.mail.example.com",
    "public_key": "k=rsa; p=MIGfMA0GCSqGSIb3DQEB...",
    "selector": "12345",
    "status": "verified"
  },
  "domain_key": "d5e1c4b2a3f60718",
  "domain_name": "mail.example.com",
  "is_restricted_senders": false,
  "status": "verified",
  "verified": true
}
```

### Get email log

Get one email's log: its delivery, bounces, opens and clicks. A log can take a few seconds to appear after sending.

**Inputs**

- Email reference (`email_reference`, text, required): The request id a send step returned, or an email reference from 'List email logs'.

**Outputs**: An email's log.

- `email_delivery_details` (object): Delivery events by outcome.
- `email_info` (object): The email's details.
- `email_reference` (text): The email's reference; pass it to 'Get email log'.
- `email_tracking_details` (object): Open and click counts, when tracking is on.
- `from_address` (text): The sender's address.
- `processed_time` (text): When ZeptoMail processed it.
- `request_id` (text): The id the send step returned.
- `status` (text): The email's status.
- `subject` (text): The subject.

**Example output**

```json
{
  "email_delivery_details": {
    "delivered": [
      {
        "recipient": "carol@example.com",
        "time": "2026-06-04T20:40:02Z"
      }
    ]
  },
  "email_info": {
    "email_reference": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
    "mailagent_key": "1ac36788bcb06e03",
    "processed_time": "2026-06-04T20:40:00Z",
    "status": "delivered",
    "subject": "Your order has shipped",
    "to": [
      {
        "address": "carol@example.com",
        "name": "Carol"
      }
    ]
  },
  "email_reference": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
  "from_address": "orders@mail.example.com",
  "processed_time": "2026-06-04T20:40:00Z",
  "request_id": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
  "status": "delivered",
  "subject": "Your order has shipped"
}
```

### Get template

Get a template, including its HTML body.

**Inputs**

- Agent (`mailagent_key`, text, required): The agent. Its key from 'List agents' works too.
- Template (`template_key`, text, required): The template. Its key from 'List templates' works too.

**Outputs**: An email template.

- `created_time` (text): When the template was created.
- `htmlbody` (text): The HTML body (only returned when reading one template).
- `modified_time` (text): When the template was last changed.
- `sample_merge_info` (object): Sample merge values, by merge tag.
- `subject` (text): The subject; {{name}} merge tags are filled when sending.
- `template_alias` (text): The template's alias, an alternative to the key.
- `template_key` (text): The template's key; use it to send with the template.
- `template_name` (text): The template's name.

**Example output**

```json
{
  "created_time": "04 Jun 2026 08:30 PM",
  "htmlbody": "<p>Hello {{name}}</p>",
  "modified_time": "04 Jun 2026 08:30 PM",
  "subject": "Welcome, {{name}}",
  "template_alias": "welcome",
  "template_key": "2d6f.6c2b6a1e0f3a5b7c.k1.0a1b2c3d-4e5f-6789-abcd-ef0123456789",
  "template_name": "Welcome"
}
```

### List agents

List the account's agents, each a separate sending stream.

**Inputs**: None.

**Outputs**

- `count` (number): How many agents are on this page.
- `items` (list): The agents.

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "created_time": "04 Jun 2026 08:19 PM",
      "description": "Order and account emails",
      "mailagent_key": "1ac36788bcb06e03",
      "mailagent_name": "Transactional",
      "status": "active"
    }
  ]
}
```

### List domains

List the account's sending domains and whether each is verified.

**Inputs**

- Verified only (`verified_only`, true/false): Optional. Only domains ZeptoMail has verified. Default: `false`.

**Outputs**

- `count` (number): How many domains are on this page.
- `items` (list): The domains.

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "associated_mailagents": [
        "Transactional"
      ],
      "domain_key": "d5e1c4b2a3f60718",
      "domain_name": "mail.example.com",
      "is_restricted_senders": false,
      "status": "verified"
    }
  ]
}
```

### List email logs

Find sent emails and what happened to them. Logs are kept for 60 days.

**Inputs**

- Agent (`mailagent_key`, text): Optional. Only this agent.
- Request id (`request_id`, text): Optional. The request id a send step returned.
- Client reference (`client_reference`, text): Optional. Your own reference, searchable in the email logs.
- Subject (`subject`, text): Optional. Only emails with this subject.
- From address (`from_address`, text): Optional. Only emails from this address.
- Recipient (`recipient`, text): Optional. Only emails to this address (To, Cc or Bcc).
- Sent after (`sent_after`, date and time): Optional. Only emails sent after this time (UTC).
- Sent before (`sent_before`, date and time): Optional. Only emails sent before this time (UTC).
- Outcome (`outcomes`, list): Optional. Only emails with these outcomes. One or more of: `delivered`, `hard_bounce` (Hard bounce), `soft_bounce` (Soft bounce), `failed`.
- Page size (`limit`, number): Optional. How many to return, 1 to 100. Default 50. From 1 to 100.
- Offset (`offset`, number): Optional. How many to skip: the next_offset of the previous page. At least 0.

**Outputs**

- `count` (number): How many email logs are on this page.
- `has_more` (true/false): Whether another page is probably available.
- `items` (list): The email logs.
- `next_offset` (number): Pass as 'Offset' to fetch the next page; empty on the last.

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "items": [
    {
      "email_delivery_details": {
        "delivered": [
          {
            "recipient": "carol@example.com",
            "time": "2026-06-04T20:40:02Z"
          }
        ]
      },
      "email_info": {
        "email_reference": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
        "mailagent_key": "1ac36788bcb06e03",
        "processed_time": "2026-06-04T20:40:00Z",
        "status": "delivered",
        "subject": "Your order has shipped",
        "to": [
          {
            "address": "carol@example.com",
            "name": "Carol"
          }
        ]
      },
      "email_reference": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
      "from_address": "orders@mail.example.com",
      "processed_time": "2026-06-04T20:40:00Z",
      "request_id": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
      "status": "delivered",
      "subject": "Your order has shipped"
    }
  ],
  "next_offset": null
}
```

### List suppressions

List the email addresses or domains ZeptoMail will not send to.

**Inputs**

- List (`suppression_type`, text): Email addresses (the default) or whole domains. One of: `email` (Email addresses), `domain` (Domains). Default: `email`.
- Search (`search`, text): Optional. Only entries matching this text.
- Agent (`mailagent_key`, text): Optional. Only this agent.
- From date (`date_from`, date): Optional. Only entries added on or after this date.
- To date (`date_to`, date): Optional. Only entries added on or before this date.
- Page size (`limit`, number): Optional. How many to return, 1 to 100. Default 50. From 1 to 100.
- Offset (`offset`, number): Optional. How many to skip: the next_offset of the previous page. At least 0.

**Outputs**

- `count` (number): How many suppressed entries are on this page.
- `has_more` (true/false): Whether another page is probably available.
- `items` (list): The suppressed entries.
- `next_offset` (number): Pass as 'Offset' to fetch the next page; empty on the last.

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "items": [
    {
      "action": "suppress",
      "category": "manual",
      "description": "Hard bounce",
      "mailagent_keys": [
        "1ac36788bcb06e03"
      ],
      "modified_time": "01 Mar 2026 04:44 PM",
      "value": "bounced@example.com"
    }
  ],
  "next_offset": null
}
```

### List templates

List an agent's email templates.

**Inputs**

- Agent (`mailagent_key`, text, required): The agent. Its key from 'List agents' works too.
- Page size (`limit`, number): Optional. How many to return, 1 to 100. Default 50. From 1 to 100.
- Offset (`offset`, number): Optional. How many to skip: the next_offset of the previous page. At least 0.

**Outputs**

- `count` (number): How many templates are on this page.
- `has_more` (true/false): Whether another page is probably available.
- `items` (list): The templates.
- `next_offset` (number): Pass as 'Offset' to fetch the next page; empty on the last.

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "items": [
    {
      "created_time": "04 Jun 2026 08:30 PM",
      "modified_time": "04 Jun 2026 08:30 PM",
      "subject": "Welcome, {{name}}",
      "template_alias": "welcome",
      "template_key": "2d6f.6c2b6a1e0f3a5b7c.k1.0a1b2c3d-4e5f-6789-abcd-ef0123456789",
      "template_name": "Welcome"
    }
  ],
  "next_offset": null
}
```

### Remove suppressions

Let ZeptoMail send to email addresses or domains again.

**Inputs**

- List (`suppression_type`, text): Email addresses (the default) or whole domains. One of: `email` (Email addresses), `domain` (Domains). Default: `email`.
- Values (`values`, text, required): Email addresses or domains, comma-separated.

**Outputs**: What was removed from the suppression list.

- `message` (text): ZeptoMail's confirmation.
- `removed` (list): The values removed.
- `suppression_type` (text): email or domain.

**Example output**

```json
{
  "message": "Suppression entry deleted successfully.",
  "removed": [
    "bounced@example.com"
  ],
  "suppression_type": "email"
}
```

### Send batch email

Send the same email to many recipients, each getting their own copy that does not show the others.

**Inputs**

- From address (`from_address`, text, required): The sender's address. It must be on a domain verified in the agent whose Send Mail token is connected.
- From name (`from_name`, text): Optional. The sender's name.
- To (`to`, text, required): Recipients, comma-separated; each gets a separate email. Up to 500.
- Subject (`subject`, text, required): The subject, up to 500 characters.
- HTML body (`html_body`, text): The HTML body. Give this, a plain-text body, or both.
- Plain-text body (`text_body`, text): Optional. The plain-text body.
- Cc (`cc`, text): Optional. Cc recipients.
- Bcc (`bcc`, text): Optional. Bcc recipients.
- Reply-to (`reply_to`, text): Optional. Where replies go, comma-separated.
- Client reference (`client_reference`, text): Optional. Your own reference, searchable in the email logs.
- Track opens (`track_opens`, true/false): Optional. Track opens; blank uses the agent's setting.
- Track clicks (`track_clicks`, true/false): Optional. Track link clicks; blank uses the agent's setting.
- Attachments (`attachments`, list): Optional. Files as [{"name": "invoice.pdf", "mime_type": "application/pdf", "content": "<Base64 data>"}]. Up to 60, 15 MB in all.

**Outputs**: ZeptoMail's acceptance of the email.

- `code` (text): ZeptoMail's result code, e.g. EM_104.
- `message` (text): ZeptoMail's message, normally OK.
- `request_id` (text): The request id; pass it to 'Get email log' as the email reference, or to 'List email logs' as the request id.
- `results` (list): One result per accepted request.

**Example output**

```json
{
  "code": "EM_104",
  "message": "OK",
  "request_id": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
  "results": [
    {
      "code": "EM_104",
      "message": "Email request received"
    }
  ]
}
```

### Send batch template email

Send a template to many recipients, each with their own merge values.

**Inputs**

- Template (`template_key`, text): The template's key, from 'List templates' or 'Create template'. It must belong to the agent whose Send Mail token is connected. Leave blank to use a template alias instead.
- Template alias (`template_alias`, text): Optional. The template's alias, instead of its key.
- From address (`from_address`, text, required): The sender's address. It must be on a domain verified in the agent whose Send Mail token is connected.
- From name (`from_name`, text): Optional. The sender's name.
- Recipients (`recipients`, list, required): Recipients with their own merge values: [{"address": "carol@example.com", "name": "Carol", "merge_info": {"name": "Carol"}}]. Plain comma-separated addresses work too. Up to 500.
- Cc (`cc`, text): Optional. Cc recipients.
- Bcc (`bcc`, text): Optional. Bcc recipients.
- Reply-to (`reply_to`, text): Optional. Where replies go, comma-separated.
- Track opens (`track_opens`, true/false): Optional. Track opens; blank uses the agent's setting.
- Track clicks (`track_clicks`, true/false): Optional. Track link clicks; blank uses the agent's setting.
- Attachments (`attachments`, list): Optional. Files as [{"name": "invoice.pdf", "mime_type": "application/pdf", "content": "<Base64 data>"}]. Up to 60, 15 MB in all.

**Outputs**: ZeptoMail's acceptance of the email.

- `code` (text): ZeptoMail's result code, e.g. EM_104.
- `message` (text): ZeptoMail's message, normally OK.
- `request_id` (text): The request id; pass it to 'Get email log' as the email reference, or to 'List email logs' as the request id.
- `results` (list): One result per accepted request.

**Example output**

```json
{
  "code": "EM_104",
  "message": "OK",
  "request_id": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
  "results": [
    {
      "code": "EM_104",
      "message": "Email request received"
    }
  ]
}
```

### Send email

Send a transactional email through the agent whose Send Mail token is connected.

**Inputs**

- From address (`from_address`, text, required): The sender's address. It must be on a domain verified in the agent whose Send Mail token is connected.
- From name (`from_name`, text): Optional. The sender's name.
- To (`to`, text, required): Recipients, comma-separated: an address, or Name <address>. Up to 500.
- Subject (`subject`, text, required): The subject, up to 500 characters.
- HTML body (`html_body`, text): The HTML body. Give this, a plain-text body, or both.
- Plain-text body (`text_body`, text): Optional. The plain-text body.
- Cc (`cc`, text): Optional. Cc recipients.
- Bcc (`bcc`, text): Optional. Bcc recipients.
- Reply-to (`reply_to`, text): Optional. Where replies go, comma-separated.
- Client reference (`client_reference`, text): Optional. Your own reference, searchable in the email logs.
- Track opens (`track_opens`, true/false): Optional. Track opens; blank uses the agent's setting.
- Track clicks (`track_clicks`, true/false): Optional. Track link clicks; blank uses the agent's setting.
- Custom headers (`mime_headers`, object): Optional. Extra email headers, such as {"X-Order-Id": "A-100"}.
- Attachments (`attachments`, list): Optional. Files as [{"name": "invoice.pdf", "mime_type": "application/pdf", "content": "<Base64 data>"}]. Up to 60, 15 MB in all.

**Outputs**: ZeptoMail's acceptance of the email.

- `code` (text): ZeptoMail's result code, e.g. EM_104.
- `message` (text): ZeptoMail's message, normally OK.
- `request_id` (text): The request id; pass it to 'Get email log' as the email reference, or to 'List email logs' as the request id.
- `results` (list): One result per accepted request.

**Example output**

```json
{
  "code": "EM_104",
  "message": "OK",
  "request_id": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
  "results": [
    {
      "code": "EM_104",
      "message": "Email request received"
    }
  ]
}
```

### Send template email

Send an email built from a template, filling its {{merge tags}}.

**Inputs**

- Template (`template_key`, text): The template's key, from 'List templates' or 'Create template'. It must belong to the agent whose Send Mail token is connected. Leave blank to use a template alias instead.
- Template alias (`template_alias`, text): Optional. The template's alias, instead of its key.
- From address (`from_address`, text, required): The sender's address. It must be on a domain verified in the agent whose Send Mail token is connected.
- From name (`from_name`, text): Optional. The sender's name.
- To (`to`, text, required): Recipients, comma-separated: an address, or Name <address>. Up to 500.
- Merge values (`merge_info`, object): Optional. Values for the template's merge tags, such as {"name": "Carol"}.
- Cc (`cc`, text): Optional. Cc recipients.
- Bcc (`bcc`, text): Optional. Bcc recipients.
- Reply-to (`reply_to`, text): Optional. Where replies go, comma-separated.
- Client reference (`client_reference`, text): Optional. Your own reference, searchable in the email logs.
- Track opens (`track_opens`, true/false): Optional. Track opens; blank uses the agent's setting.
- Track clicks (`track_clicks`, true/false): Optional. Track link clicks; blank uses the agent's setting.
- Attachments (`attachments`, list): Optional. Files as [{"name": "invoice.pdf", "mime_type": "application/pdf", "content": "<Base64 data>"}]. Up to 60, 15 MB in all.

**Outputs**: ZeptoMail's acceptance of the email.

- `code` (text): ZeptoMail's result code, e.g. EM_104.
- `message` (text): ZeptoMail's message, normally OK.
- `request_id` (text): The request id; pass it to 'Get email log' as the email reference, or to 'List email logs' as the request id.
- `results` (list): One result per accepted request.

**Example output**

```json
{
  "code": "EM_104",
  "message": "OK",
  "request_id": "2d6f.6c2b6a1e0f3a5b7c.m1.11111111-2222-3333-4444-555555555555",
  "results": [
    {
      "code": "EM_104",
      "message": "Email request received"
    }
  ]
}
```

### Update template

Change a template's name, subject or HTML body. Fields left blank keep their current value.

**Inputs**

- Agent (`mailagent_key`, text, required): The agent. Its key from 'List agents' works too.
- Template (`template_key`, text, required): The template. Its key from 'List templates' works too.
- Template name (`template_name`, text): Optional. The new name.
- Subject (`subject`, text): Optional. The new subject.
- HTML body (`html_body`, text): Optional. The new HTML body.

**Outputs**: An email template.

- `created_time` (text): When the template was created.
- `htmlbody` (text): The HTML body (only returned when reading one template).
- `modified_time` (text): When the template was last changed.
- `sample_merge_info` (object): Sample merge values, by merge tag.
- `subject` (text): The subject; {{name}} merge tags are filled when sending.
- `template_alias` (text): The template's alias, an alternative to the key.
- `template_key` (text): The template's key; use it to send with the template.
- `template_name` (text): The template's name.

**Example output**

```json
{
  "created_time": "04 Jun 2026 08:30 PM",
  "htmlbody": "<p>Hello {{name}}</p>",
  "modified_time": "04 Jun 2026 08:30 PM",
  "subject": "Welcome, {{name}}",
  "template_alias": "welcome",
  "template_key": "2d6f.6c2b6a1e0f3a5b7c.k1.0a1b2c3d-4e5f-6789-abcd-ef0123456789",
  "template_name": "Welcome"
}
```
