---
title: "Create domain policy"
method: POST
path: "/api/v1/add/domain-policy"
tags: ["Domain antispam policies"]
---

# Create domain policy

`POST /api/v1/add/domain-policy`

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

## Request body

- object
  - `domain` string — domain name to which policy is associated to
  - `object_from` string — exact address or use wildcard to match whole domain
  - `object_list` 'wl' | 'bl'

## Response `200`

OK

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

## Other responses

- `401` — Unauthorized

---

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