Enqueue an asynchronous SMTP send-test
Enqueues a send-test email via the transactional outbox and returns `204` IMMEDIATELY — there is NO synchronous SMTP in the request path. The scheduler delivers using the tenant's resolved SMTP client and writes the outcome to the `last_test_*` fields surfaced by `GET /v1/admin/settings/smtp`, which the UI polls. Caller must hold `tenant.settings.secrets.write`. Plan 2026-06-16-per-tenant-settings §2.6 / T103. The request body is OPTIONAL. Supply `recipient` to direct the test message to a specific mailbox (useful when verifying a freshly configured relay); when omitted the destination falls back to the tenant's SMTP username, else the operator From address.
Enqueues a send-test email via the transactional outbox and returns
204 IMMEDIATELY — there is NO synchronous SMTP in the request path.
The scheduler delivers using the tenant's resolved SMTP client and writes
the outcome to the last_test_* fields surfaced by GET /v1/admin/settings/smtp, which the UI polls. Caller must hold
tenant.settings.secrets.write. Plan 2026-06-16-per-tenant-settings
§2.6 / T103.
The request body is OPTIONAL. Supply recipient to direct the test
message to a specific mailbox (useful when verifying a freshly
configured relay); when omitted the destination falls back to the
tenant's SMTP username, else the operator From address.
Authorization
bearerAuth JWT Bearer access token. Clock skew tolerance is ±60 seconds.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/admin/settings/smtp/test" \ -H "Content-Type: application/json" \ -d '{ "recipient": "[email protected]" }'{
"error": "bad_request",
"message": "malformed request",
"request_id": "req_01abc128"
}{
"error": "unauthenticated",
"message": "missing or invalid bearer token",
"request_id": "req_01abc123"
}{
"error": "permission_denied",
"message": "caller does not hold the required permission",
"request_id": "req_01abc124"
}{
"error": "not_found",
"message": "the requested resource was not found",
"request_id": "req_01abc125"
}Was this page helpful?