---
title: "Create domain"
method: POST
path: "/api/v1/add/domain"
tags: ["Domains"]
---

# Create domain

`POST /api/v1/add/domain`

You may create your own domain using this action. It takes a JSON object containing a domain informations.

## Request body

- 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
  - `domain` string — Fully qualified domain name
  - `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)
  - `restart_sogo` number — restart SOGo to activate the domain in SOGo
  - `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.
  - `rl_frame` 's' | 'm' | 'h' | 'd'
  - `rl_value` number — rate limit value
  - `tags` string[] — tags for this Domain

## 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` — 1 breaking, 3 warning, 3 info
  - the response's body type/format changed from `object`/`` to `array`/`` for status `200`
  - removed the optional property `log` from the response with the `200` status
  - removed the optional property `msg` from the response with the `200` status
  - removed the optional property `type` from the response with the `200` status
  - …3 more
- **2021-03-24** `a17bc9bfa1c5` — 1 warning, 1 info
  - removed the request property `lang`
  - added the new optional request property `restart_sogo`
- **2020-12-22** `303aaf2409ca` — 1 info
  - added the new `d` enum value to the request property `rl_frame`
- **2020-06-07** `47523aca063a` — 2 breaking, 4 warning, 4 info
  - removed the enum value `d` of the request property `rl_frame`
  - the response's body type/format changed from `array`/`` to `object`/`` for status `200`
  - removed the request property `gal`
  - removed the request property `relay_unknown_only`
  - …6 more

[Change history](https://skmtc.dev/mailcow/apis/mailcow-api/changes/api/v1/add/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)
