Read the receiving overview
/v1/inbound/overviewEvery route mail can take, with its rules and endpoints, in one read. One page of routes (addresses, agent inboxes, address patterns, explicit routes and catch-alls) merged and ordered by host, kind and address, each resolved to the rules that run on it and where its mail goes. Also returns counts per kind, the rules, up to 100 endpoints and 100 inbound webhooks, and the domains. Members and scoped keys see only their addresses. With an MCP sign-in (approval), it requires an owner or admin, like the other receiving reads.
Needs Inboxes: read for the address or inbox.
Example
import { createClient } from '@nightmail/sdk/client';
import { getInboundOverview } from '@nightmail/sdk';
const client = createClient({
baseUrl: 'https://nightmail.dev',
auth: scheme => scheme.scheme === 'bearer'
? process.env.NIGHTMAIL_API_KEY
: undefined,
});
const result = await getInboundOverview({
client,
throwOnError: true,
});
console.log(result.data);curl --request GET \
--url 'https://nightmail.dev/v1/inbound/overview' \
--header "Authorization: Bearer $NIGHTMAIL_API_KEY"Parameters
kindquery · stringComma-separated kinds to list: address (a receiving address, including temporary ones), inbox (an agent inbox), route (an explicit route for an address that has no inbox of its own), pattern (an address wildcard rule or a pattern route), catch_all (a *@host route, or the domain default for unknown recipients). Default: every kind.
originquery · stringFilters address rows only: api (created on purpose) or auto (created by a catch-all). Other kinds are unaffected.
domainquery · stringReceiving host, e.g. reply.acme.com.
qquery · stringMatches the address, an alias or the display name.
cursorquery · stringlimitquery · integerResponses
200Success
InboundOverviewcountsrequiredobjectRoutes per kind, after the domain and q filters and before kind and origin.
counts.addressrequiredintegercounts.autorequiredintegerAddresses a catch-all created (origin auto).
counts.routerequiredintegercounts.patternrequiredintegercounts.catch_allrequiredintegercounts.inboxrequiredintegerroutesrequiredobjectroutes.datarequiredobject[]routes.nextCursorrequiredstring or nullrulesrequiredobject[]Every rule in the config, in the order it was saved.
rules[].keyrequiredstringrules[].callsrequiredstring[]Endpoint names it can call.
rules[].deliversrequiredstring[]Inbox keys it can deliver to.
rules[].decisionsrequiredstring[]The names of the AI decisions it asks for.
rules[].questionsrequiredstring[]The question each of those decisions asks the AI, in the same order: testRules takes scores keyed by these.
rules[].attachedTorequiredstring[]Address IDs or addresses it runs on.
rules[].addressesrequiredstring[]attachedTo as addresses: an inbox ID reads as its primary address.
rules[].reciperequiredobjectrules[].enabledrequiredbooleanFalse when it is turned off: it keeps its addresses and doesn’t run.
rules[].lastMatchedAtrequiredstring or nullWhen it last took an action on received mail, among the workspace’s last 1,000 received emails; null if it didn’t.
ritualsrequiredobject[]Deprecated: rules, with omens for decisions.
rituals[].keyrequiredstringrituals[].callsrequiredstring[]Endpoint names it can call.
rituals[].deliversrequiredstring[]Inbox keys it can deliver to.
rituals[].omensrequiredstring[]The names of the AI decisions it asks for.
rituals[].questionsrequiredstring[]The question each of those decisions asks the AI, in the same order: testRules takes scores keyed by these.
rituals[].attachedTorequiredstring[]Address IDs or addresses it runs on.
rituals[].addressesrequiredstring[]attachedTo as addresses: an inbox ID reads as its primary address.
rituals[].reciperequiredobjectrituals[].enabledrequiredbooleanFalse when it is turned off: it keeps its addresses and doesn’t run.
rituals[].lastMatchedAtrequiredstring or nullWhen it last took an action on received mail, among the workspace’s last 1,000 received emails; null if it didn’t.
endpointsrequiredobject[]At most 100 endpoints (by name) and 100 inbound webhooks.
endpoints[].idrequiredstringEndpoint ID: mwh_… for a webhook, con_… for Slack, Discord or a forward.
endpoints[].sourcerequiredstringendpoint: a named endpoint, which rules call (listEndpoints). inbound_webhook: a webhook without a name (listInboundWebhooks lists every webhook, named or not).
endpoints[].namerequiredstringendpoints[].typerequiredstringendpoints[].statusrequiredstringendpoints[].targetrequiredstringWhere it delivers; URLs are write-only (last four characters).
endpoints[].callrequiredstring or nullHow a rule calls an endpoint; null for an inbound webhook.
endpoints[].eventTypesrequiredstring[]Events a webhook subscribes to; empty for a route-only webhook and for Slack, Discord and forward endpoints.
endpoints[].routesrequiredintegerRoutes that name it.
endpoints[].rulesrequiredstring[]Rules that call it.
endpoints[].ritualsrequiredstring[]Deprecated: rules.
endpointsTruncatedrequiredbooleanTrue when the workspace has more endpoints or inbound webhooks than listed. Read them all with listEndpoints and listInboundWebhooks, following nextCursor until it is null.
domainsrequiredobject[]Every domain with its receiving status, including domains that only send.
domains[].idrequiredstringNightmail domain ID.
domains[].namerequiredstringReceiving host: the domain, or the subdomain it receives at.
domains[].domainrequiredstringThe domain itself. Hosted, an address on it or any of its subdomains turns receiving on there (createInboundAddress).
domains[].hostsrequiredstring[]Every host the domain receives at, or is being set up to (name is its first); addresses can be created at each.
domains[].statusrequiredstringdomains[].catchAllrequiredstringmanagerequiredbooleanFalse for members and scoped keys: they see their addresses, without routes, rules, endpoints or domains.
versionrequiredintegerThe routing and rules version this overview was read at: send it as If-Match to setInboundAddressFlow.
400, 401, 403, 404, 409, 413, 422, 429, 500, 503Request failed; use error.code and requestId to diagnose.
ApiErrorerrorrequiredobjecterror.coderequiredstringerror.messagerequiredstringerror.requestIdrequiredstringerror.fieldstringerror.retryablerequiredbooleanerror.resetAtstringNext capacity change for a Hosted rolling send limit.
error.detailsobject[]Every problem found, when there is more than one part, such as rule diagnostics with rule, line, column, message and hint, or a measurement, such as CONTENT_TOO_LARGE_TO_SCREEN with screenedBytes and limitBytes (and index in a batch).
error.requiredobjectOn a 403 permission refusal: what the request needs that this credential lacks. The Nightmail-Required-Permission header says the same.