---
title: "Update domain"
method: POST
path: "/api/v1/edit/domain"
tags: ["Domains"]
---

# Update domain

`POST /api/v1/edit/domain`

You can update one or more domains per request. You can also send just attributes you want to change.
Example: You can add domain names to items list and in attr object just include `"active": "0"` to deactivate domains.

## Request body

- object
  - `attr` object
    - `active` boolean — is domain active or not
    - `aliases` number — limit count of aliases associated with this domain
    - `backupmx` boolean — relay domain or not
    - `defquota` number — predefined mailbox quota in `add mailbox` form
    - `description` string — Description of domain
    - `gal` boolean — is domain global address list active or not, it enables shared contacts accross domain in SOGo webmail
    - `mailboxes` number — limit count of mailboxes associated with this domain
    - `maxquota` number — maximum quota per mailbox
    - `quota` number — maximum quota for this domain (for all mailboxes in sum)
    - `relay_all_recipients` boolean — if not, them you have to create "dummy" mailbox for each address to relay
    - `relay_unknown_only` boolean — Relay non-existing mailboxes only. Existing mailboxes will be delivered locally.
    - `relayhost` number — id of relayhost
    - `rl_frame` 's' | 'm' | 'h' | 'd'
    - `rl_value` number — rate limit value
    - `tags` string[] — tags for this Domain
  - `items` string[] — contains list of domain names you want update

## Response `200`

OK

- object[]
  - `log` unknown[] — contains request object
    - unknown
  - `msg` unknown[]
    - unknown
  - `type` 'success' | 'danger' | 'error'

## Other responses

- `401` — Unauthorized

## Changes

- **2022-07-19** `106c373e9790` — 2 breaking, 5 info
  - the `items` request property type/format changed from `object`/`` to `array`/``
  - removed the media type `*/*` for the response with the status `200`
  - added the new optional request property `attr/relay_unknown_only`
  - added the new optional request property `attr/rl_frame`
  - …3 more
- **2021-03-24** `a17bc9bfa1c5` — 1 warning
  - removed the request property `attr/lang`
- **2020-06-07** `47523aca063a` — 2 breaking, 4 warning, 2 info
  - the `items` request property type/format changed from `array`/`` to `object`/``
  - removed the media type `application/json` for the response with the status `200`
  - removed the request property `attr/relay_unknown_only`
  - removed the request property `attr/rl_frame`
  - …4 more

[Change history](https://skmtc.dev/mailcow/apis/mailcow-api/changes/api/v1/edit/domain/post.md)

---

[API](https://skmtc.dev/mailcow/apis/mailcow-api.md) · [All operations](https://skmtc.dev/mailcow/apis/mailcow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mailcow/mailcow-api/revisions/ae01d1d7886a/schema)
