---
title: "Edit MailAgent"
method: PUT
path: "/mailagents/{mailagentkey}"
tags: ["agents"]
---

# Edit MailAgent

`PUT /mailagents/{mailagentkey}`

## Request

- Base URL: `https://cpaas.zoho.com/v1.1`
- URL: `https://cpaas.zoho.com/v1.1/mailagents/{mailagentkey}`
- 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.UPDATE`
  - OAuth 2
    - Authorization code: `https://accounts.zoho.com/oauth/v2/auth`
    - Token URL: `https://accounts.zoho.com/oauth/v2/token` scopes: `Zeptomail.MailAgents.ALL`

Update the name or description of an existing Mail Agent.

## Path parameters

- `mailagentkey` string, required

## Request body

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

## Response `200`

Mail Agent updated successfully.

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

## Other responses

- `400`: Bad Request

---

[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)
