POST /marketplace/messaging/send-email — transactional email with optional template or inline HTML
alerts@example.com). Must be a configured sender for the org; domain must be verified. Mutually exclusive with fromSenderId.fromEmail.fromEmail and fromSenderId, the platform uses the default sender configured for the messaging provider (environment on the server, typically MS_PROVIDER_FROM_EMAIL / MS_PROVIDER_FROM_NAME, with fallbacks such as SENDGRID_FROM_* or noreply@gueno.com + Güeno). That is not an error.
{{placeholders}} in subject, htmlBody, textBody, or in a stored template. Values may be strings, numbers, or booleans (coerced for rendering). Default {}.htmlBody or textBody in this mode.
templateId.
{{variables}} replaced via templateParams.{{variables}}.{{variables}}.htmlBody or textBody.
MessageDeliveryService / provider response.
{ "success": false, "error": "<English message>" } unless noted. All error strings are in English. Invalid JSON bodies may return a different shape from the validator (e.g. Zod field issues) at 400.
| Situation | Typical status | Example error (or note) |
|---|---|---|
| Email integration off for the org | 400 | Email integration is not active. Enable Email (global_sender_email) in Applications (Marketplace) for this organization. |
| Messaging provider URL not set (server) | 400 | MS_PROVIDER_URL is not configured on the server. Configure the messaging provider to send email. |
| Cost > 0 and no pack quota / credits | 400 | Insufficient balance for this send (cost … credits). Add tokens… (see response for full text) |
| Send succeeded but billing failed | 400 | Insufficient balance to record billing for this send. Current balance (…) is below required (…). … |
Both templateId and inline body | 400 (validation) | Use either templateId + templateParams, or htmlBody/textBody only — not both. |
| Neither template nor body | 400 (validation) | Provide templateId or htmlBody/textBody. |
Inline mode without subject | 400 (validation) | subject is required when not using a template. |
| Template UUID wrong / other org | 404 | Template not found or not accessible for this organization. |
| Template exists but not email channel | 400 | Template channel is "<channel>"; email is required. |
| Template + empty subject after render | 400 | The template has no subject or it is empty after replacing variables. Send subject in the request body or set the subject on the template. |
Both fromSenderId and fromEmail | 400 | Send only one of fromSenderId or fromEmail, not both. |
Unknown fromSenderId | 400 | fromSenderId does not match a sender for this organization. Check Settings → Email → Senders. |
fromEmail domain not in Güeno | 400 | Domain "…" is not registered in Güeno. Add and verify it under Settings → Email → Domains before using sender "…". |
| Domain not verified | 400 | Domain "…" is not verified yet. Complete DNS records and click Verify under Settings → Email → Domains. |
| Verified domain but sender row missing | 400 | Sender "…" is not configured. Add it under Settings → Email → Senders (domain "…" is already verified). |
Empty inline subject after {{…}} | 400 | Subject is empty after replacing variables. |
| Empty body after render | 400 | htmlBody or textBody is empty after rendering. |
| No session org | 401 | { "error": "Organization ID not found" } (no success field) |
{ "success": false, "error": "…" } (e.g. provider rejection) at 200 or an error status depending on implementation—inspect success and error on every response.