Replace the email domain
<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Moves the app's email sending to a different domain it already owns.
A current domain that is already sending keeps sending until the new one verifies, so mail keeps going out while DNS propagates. A current domain that never finished setup isn't sending, and nothing sends until the new domain verifies. During the changeover List email domains returns both.
The new domain has the same requirements as Enable email sending for a domain. It has to be connected, ready, and different from the current one. Sending the domain already in use is rejected.
This works only when the app has exactly one email domain. A replacement that's still in flight leaves two, and this call is rejected until that clears. Base44 tries to remove the old domain once the new one verifies, but that doesn't happen on every path and can fail quietly. When a replacement is rejected, read List email domains and clear the extra domain with Disable email sending for a domain.
Path parameters
ID of the app whose email domains you want to work with.
ID of the app whose email domains you want to work with.
Request body
Example request
{
"domain": "mail.example.com",
"sender_name": "Nordwind Furniture",
"from_email": "no-reply@mail.example.com"
}Response
The new domain's setup started. The old one keeps sending until it verifies.
Example response
{
"domain": "mail.example.com",
"status": "pending_domain_verification",
"email_domain_id": "68b1c0d4e7b91d003c45a1f2",
"dns_records": [
{
"name": "em1234.mail.example.com",
"status": "pending",
"ttl": 300,
"type": "CNAME",
"value": "u1234567.wl123.sendgrid.net"
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.