---
title: "Edit Domain"
method: PUT
path: "/domains/{domain_key}"
tags: ["domains"]
---

# Edit Domain

`PUT /domains/{domain_key}`

## Request

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

Update the details of an existing domain, including its name, subdomain prefix, and Mail Agent associations.

## Path parameters

- `domain_key` string, required

## Request body

- object
  - `new_sub_domain_prefix` string: Updated subdomain prefix.
  - `associate_mailagents` string[]: Array of Mail Agent keys to associate with this domain.
  - `unassociate_mailagents` string[]: Array of Mail Agent keys to unassociate from this domain.
  - `new_domain` string: Updated domain name.

## Response `200`

Domain updated successfully.

- object
  - `data` Domain
    - `dkim_status` string
    - `created_time` string
    - `domain_name` string
    - `domain_key` string
    - `sub_domain_prefix` string
    - `spf_status` string
    - `is_verified` boolean
  - `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)
