---
title: "Set webmail GEO for a domain"
method: POST
path: "/v1/webmail-geo/domains"
tags: ["Webmail GEO"]
---

# Set webmail GEO for a domain

`POST /v1/webmail-geo/domains`

## Request

- Base URL: `https://developers.servera.lt`
- URL: `https://developers.servera.lt/v1/webmail-geo/domains`
- Auth: HTTP bearer

Enable/disable + configure webmail login GEO-restriction for one of your domains.

## Request body

- WebmailGeoCfg
  - `domain` string, required: One of your cPanel mail domains.
  - `enabled` boolean
  - `mode` string: 'whitelist' (allow only) or 'blacklist' (block).
  - `countries` string[]: ISO-2 country codes, e.g. ['LT','LV'].
  - `fail_open` boolean: Allow unknown/private IPs (recommended).

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/servera/apis/servera-developers-api-2.md) · [All operations](https://skmtc.dev/servera/apis/servera-developers-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/servera/apis/servera-developers-api-2/revisions/2e744791e77f?raw)
