Problem
An owner can turn off an email domain on the Domains page, or disconnect it. HQBase then stops
receiving and sending mail for every mailbox on that domain.
A client of the v1 Mail API cannot see this. GET /api/v1/mailboxes returns each mailbox with an
addresses list. Each address has mailDomainId, but nothing tells the client whether that domain
is active. The mailbox itself still shows isActive: true, receiveEnabled: true, and
sendEnabled: true.
The result: native clients (for example, the Herald macOS client) keep showing mailboxes on a
turned-off domain as normal. The user can pick one as a sender, and the send then fails on the
server.
Why the admin API does not help
The domain switch lives in the admin API (GET/PATCH /api/domains). The v1 OpenAPI document says:
"Administrative APIs are not part of this contract." The admin API uses a browser session cookie
and owner or admin role. A v1 client uses an OAuth token with mail:* scopes and cannot call it.
Members cannot call it at all. So v1 clients have no supported way to learn the domain state.
Proposal
Add one boolean to each v1 MailboxAddress:
{
"id": "mbx_…",
"mailboxId": "mbx_…",
"mailDomainId": "dom_…",
"address": "team@example.com",
"displayName": "Team",
"receiveEnabled": true,
"sendEnabled": true,
"isPrimary": true,
"domainEnabled": false
}
domainEnabled is the value of mail_domains.is_enabled for the address's domain. It is false
when the owner turns the domain off, and also when the owner disconnects the domain (disconnect sets
is_enabled = 0).
Compatibility
- The v1 document says additive fields may be added within v1 and clients must ignore unknown
response fields. This is one new field. No field changes or goes away.
- v2, the MCP tools, and the admin
/api/mailboxes list stay unchanged.
- The server already checks
is_enabled = 1 before it delivers or sends mail, so the new field
only exposes a state the server already enforces.
Open question
v2 Mailbox has the same gap (it has mailDomainId but no domain state). I kept this change to v1
because that is what our client uses today. I can add the same field to v2 in this change or in a
follow-up if you prefer.
I have the change ready and will open it as a PR with a spec-first companion in hqbase-site.
Problem
An owner can turn off an email domain on the Domains page, or disconnect it. HQBase then stops
receiving and sending mail for every mailbox on that domain.
A client of the v1 Mail API cannot see this.
GET /api/v1/mailboxesreturns each mailbox with anaddresseslist. Each address hasmailDomainId, but nothing tells the client whether that domainis active. The mailbox itself still shows
isActive: true,receiveEnabled: true, andsendEnabled: true.The result: native clients (for example, the Herald macOS client) keep showing mailboxes on a
turned-off domain as normal. The user can pick one as a sender, and the send then fails on the
server.
Why the admin API does not help
The domain switch lives in the admin API (
GET/PATCH /api/domains). The v1 OpenAPI document says:"Administrative APIs are not part of this contract." The admin API uses a browser session cookie
and owner or admin role. A v1 client uses an OAuth token with
mail:*scopes and cannot call it.Members cannot call it at all. So v1 clients have no supported way to learn the domain state.
Proposal
Add one boolean to each v1
MailboxAddress:{ "id": "mbx_…", "mailboxId": "mbx_…", "mailDomainId": "dom_…", "address": "team@example.com", "displayName": "Team", "receiveEnabled": true, "sendEnabled": true, "isPrimary": true, "domainEnabled": false }domainEnabledis the value ofmail_domains.is_enabledfor the address's domain. It isfalsewhen the owner turns the domain off, and also when the owner disconnects the domain (disconnect sets
is_enabled = 0).Compatibility
response fields. This is one new field. No field changes or goes away.
/api/mailboxeslist stay unchanged.is_enabled = 1before it delivers or sends mail, so the new fieldonly exposes a state the server already enforces.
Open question
v2
Mailboxhas the same gap (it hasmailDomainIdbut no domain state). I kept this change to v1because that is what our client uses today. I can add the same field to v2 in this change or in a
follow-up if you prefer.
I have the change ready and will open it as a PR with a spec-first companion in hqbase-site.