---
title: "Enable email sending for a domain"
method: POST
path: "/api/apps/{app_id}/custom-email-domains"
---

# Enable email sending for a domain

`POST /api/apps/{app_id}/custom-email-domains`

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Turns on email sending from a domain the app already owns, so your app's email comes from your own address instead of Base44's.

The domain has to be connected to the app first, and ready. A domain you brought yourself must be verified, and one bought through Base44 must have finished propagating. Until then the call fails, and the message says which requirement is missing.

An app sends emails from one domain at a time. If one is already set up, this call is rejected whatever state that domain is in. Disable it first, or use [Replace the email domain](/api-reference/replace-the-email-domain), which keeps the current domain sending while the new one verifies.

Email isn't live when this returns. The domain still needs DNS records in place, and who publishes them depends on who runs its DNS:

- When Base44 runs the DNS, it writes the records itself and the domain moves toward verification on its own.
- When you run the DNS, publish the records yourself. The domain waits at `pending_user_dns_configuration` until they resolve.

Either way the records come back in `dns_records`, so you can pass them to whoever manages the domain's DNS.

Poll [List email domains](/api-reference/list-email-domains) until `configuration_status` reads `active`, which is when mail starts sending.

Turning a domain back on after you disabled it skips the DNS and verification steps. It returns to the state it was in, so a domain that was already sending resumes at once.

## Path parameters

- `app_id` string, required — ID of the app whose email domains you want to work with.

## Request body

- CreateEmailDomainRequest — Request to create email domain configuration.
  - `domain` string, required — Domain to send mail from. It has to already be connected to this app.
  - `sender_name` string, required — Name recipients see in the From line.
  - `from_email` string, email, required — Address mail is sent from. Its domain has to be the `domain` you're enabling.

## Response `200`

Setup started. Read `status` and `dns_records`.

- CreateEmailDomainResponse — Response for creating email domain configuration.
  - `domain` string, required — The domain that was enabled.
  - `status` string, required — Where setup got to. Only `active` sends mail. The `pending_` values mean setup is still in progress, and the `failed_` values mean it stopped and you can start it again with [Retry email domain setup](/api-reference/retry-email-domain-setup).
  - `email_domain_id` string, required — ID of this app's email configuration. It identifies the configuration, not the individual domain.
  - `external` boolean — Whether you brought the domain yourself (`true`) or bought it through Base44 (`false`).
  - `dns_records` EmailDnsRecordResponse[], nullable — Records to publish for this domain. They come back even when Base44 publishes them for you, so you can pass them to whoever manages the domain's DNS.
    - `type` string, required — Record type. Either `CNAME`, `TXT` or `MX`.
    - `name` string, required — Host the record goes on.
    - `value` string, required — Value to publish.
    - `ttl` integer — Time to live to publish the record with, in seconds.
    - `status` string, nullable — Whether Base44 can see the record yet. Either `pending`, `verified` or `failed`. The value is `null` before the first check.
  - `provider_id` string, nullable — Identifier for the registrar the domain sits with, when Base44 knows it.

## Other responses

- `400` — This domain can't send mail.
- `401` — Missing or invalid credentials.
- `402` — This workspace's plan doesn't include custom domains.
- `403` — You don't have access to this app, you used a workspace API key, or the email domain is suspended. A suspended domain says why in the message.
- `404` — This domain isn't connected to this app, or the app doesn't exist.
- `409` — This app already has an email domain set up, whether or not it's sending yet. Disable it first, or use [Replace the email domain](/api-reference/replace-the-email-domain).
- `412` — The domain isn't ready yet. It still needs verifying, or its DNS hasn't finished propagating.
- `422` — The request body is missing a required field or has an invalid value.
- `429` — Rate limit exceeded. This endpoint allows 10 requests per minute.

## Changes

- **2026-09-01** `d8572ad3094a` — 1 breaking
  - removed the media type `application/json` for the response with the status `422`
- **2026-08-26** `f2727732ced1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/idealspot/apis/base44-app-management-api/changes/api/apps/:app_id/custom-email-domains/post.md)

---

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