---
title: "Generate DKIM Key"
method: POST
path: "/api/v1/add/dkim"
tags: ["DKIM"]
---

# Generate DKIM Key

`POST /api/v1/add/dkim`

Using this endpoint you can generate new DKIM keys.

## Request body

- object
  - `dkim_selector` string — the DKIM selector default dkim
  - `domains` string — a list of domains for which a dkim key should be generated
  - `key_size` number — the key size (1024, 2048, 3072 or 4096)

## Response `200`

OK

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

## Other responses

- `401` — Unauthorized

## Changes

- **2020-07-18** `a4989850a0e0` — 1 warning, 1 info
  - removed the request property `domain`
  - added the new optional request property `domains`
- **2020-06-07** `47523aca063a` — 1 warning, 1 info
  - removed the request property `domains`
  - added the new optional request property `domain`

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