Enable email sending for a domain
<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 mail leaves as your 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. Either way you get a 412 until it is, and the message says which.
What happens next depends on who runs the domain's DNS. When Base44 can write the records itself it does, and the domain moves toward verification on its own. Otherwise you get the records to publish in dns_records, and the domain waits at pending_user_dns_configuration until they resolve. Records are always returned, so you can show them either way.
An app sends from one domain at a time. If one is already set up you get a 409, whatever state it is in, so disable it first or use Replace the email domain, which keeps sending going while the new domain verifies.
Turning a domain back on after you disabled it is the exception: it comes back in the state it was in, so a domain that was sending resumes at once.
Otherwise sending is not live when this returns. Read status, and poll List email domains until configuration_status reads active.
This endpoint is limited to 10 requests per minute.
<Note>configuration_status moves through pending_dns_configuration, pending_user_dns_configuration, pending_domain_verification and then active. The three failed_ values mean setup stopped and you can retry with Retry email domain setup. Only active sends mail.</Note>
<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403.</Note>
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": "example.com",
"sender_name": "Nordwind Furniture",
"from_email": "no-reply@example.com"
}Response
Setup started. Read status and dns_records.
Example response
{
"domain": "example.com",
"status": "pending_user_dns_configuration",
"email_domain_id": "68b1c0d4e7b91d003c45a1f2",
"external": true,
"dns_records": [
{
"name": "em1234.example.com",
"status": "pending",
"ttl": 300,
"type": "CNAME",
"value": "u1234567.wl123.sendgrid.net"
}
],
"provider_id": "godaddy"
}Changes
Changed in 1 of the 11 revisions of this API.1
- ○
endpoint added
endpoint-added
- ○