---
title: "Add MailAgent"
method: POST
path: "/mailagents"
tags: ["agents"]
---

# Add MailAgent

`POST /mailagents`

## Request

- Base URL: `https://cpaas.zoho.com/v1.1`
- URL: `https://cpaas.zoho.com/v1.1/mailagents`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://accounts.zoho.com/oauth/v2/auth`
    - Token URL: `https://accounts.zoho.com/oauth/v2/token` scopes: `Zeptomail.MailAgents.CREATE`
  - OAuth 2
    - Authorization code: `https://accounts.zoho.com/oauth/v2/auth`
    - Token URL: `https://accounts.zoho.com/oauth/v2/token` scopes: `Zeptomail.MailAgents.ALL`

Create a new Mail Agent in your CPaaS account. You can create up to 50 agents per account.

## Request body

- object
  - `mailagent_name` string, required: Name for the Mail Agent. Must be unique within the account.
  - `description` string: Description or purpose of the Mail Agent.

## Response `200`

Mail Agent created successfully.

- object
  - `data` Mailagent
    - `mailagent_name` string
    - `created_time` string
    - `description` string
    - `mailagent_key` string
    - `status` string
  - `status` string

## Other responses

- `400`: Bad Request — e.g. name already exists or max agent limit reached.

---

[API](https://skmtc.dev/zoho/apis/zoho-cpaas.md) - [All operations](https://skmtc.dev/zoho/apis/zoho-cpaas/llms.txt) - [OpenAPI document](https://skmtc.dev/zoho/apis/zoho-cpaas/revisions/f0858a38e8b0?raw)
