POST /marketplace/messaging/send-email — e-mail transacional com template ou HTML inline
fromSenderId.fromEmail.fromEmail e fromSenderId, a API usa o remetente padrão do provedor de mensagens (variáveis de ambiente no servidor, ex.: MS_PROVIDER_FROM_EMAIL / MS_PROVIDER_FROM_NAME, com fallback como SENDGRID_FROM_* ou noreply@gueno.com + Güeno). Comportamento esperado, não é erro.
{{placeholders}}. Padrão {}.templateId (canal email). Sem htmlBody/textBody. subject opcional como fallback.
Modo inline: subject obrigatório; htmlBody e/ou textBody. Sem templateId.
{ "success": false, "error": "<mensagem em inglês>" }. Corpos inválidos podem retornar outro formato (ex.: Zod) com 400. Mensagens de negócio em error são em inglês.
| Situação | HTTP | Exemplo de error |
|---|---|---|
| Integração Email inativa | 400 | Email integration is not active. Enable Email (global_sender_email) in Applications (Marketplace) for this organization. |
MS_PROVIDER_URL não configurado | 400 | MS_PROVIDER_URL is not configured on the server. Configure the messaging provider to send email. |
| Custo > 0 sem saldo/pack | 400 | Insufficient balance for this send (cost … credits). … |
| Envio OK, falha ao cobrar | 400 | Insufficient balance to record billing for this send. … |
templateId + corpo inline | 400 | Use either templateId + templateParams, or htmlBody/textBody only — not both. |
| Sem template nem corpo | 400 | Provide templateId or htmlBody/textBody. |
Inline sem subject | 400 | subject is required when not using a template. |
| Template inexistente / outra org | 404 | Template not found or not accessible for this organization. |
| Canal do template ≠ email | 400 | Template channel is "<channel>"; email is required. |
| Assunto vazio após variáveis | 400 | The template has no subject or it is empty after replacing variables. … |
fromSenderId e fromEmail | 400 | Send only one of fromSenderId or fromEmail, not both. |
fromSenderId inválido | 400 | fromSenderId does not match a sender for this organization. … |
| Domínio não registrado | 400 | Domain "…" is not registered in Güeno. … |
| Domínio não verificado | 400 | Domain "…" is not verified yet. … |
| Remetente não cadastrado | 400 | Sender "…" is not configured. … |
Assunto vazio após {{…}} | 400 | Subject is empty after replacing variables. |
| Corpo vazio após render | 400 | htmlBody or textBody is empty after rendering. |
| Sem org na sessão | 401 | { "error": "Organization ID not found" } |
success e error; o provedor pode responder falha com 200 e success: false.