Send email
send_emailSend a transactional email via Groundmail. Provide subject + html/text, or a published template_id / template_alias with optional variables. To test without delivering anything, send to a simulator address: delivered@, bounce@, block@, complaint@, suppressed@ or delayed@simulator.groundmail.dev (plus addressing like bounce+test1@ works); the result has test: true and webhooks fire as for real mail. Do not put payment card numbers, government ID numbers, health information or passwords in the content.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient email address. A …@simulator.groundmail.dev address simulates an outcome and never delivers | |
| from | No | Sender address (on a verified domain, or the sandbox sender). Optional when sender is set, the template has a sender, or the team has a default sender (list_senders); when set it wins | |
| html | No | HTML body. Do not combine with template_id or template_alias | |
| text | No | Plain-text body. Do not combine with template_id or template_alias | |
| sender | No | A saved sender's handle or id from list_senders (for example billing): sends as its name and address, and replies go to its reply-to unless reply_to is set. Ignored when from is set | |
| tenant | No | Send as this tenant: the send uses its domains, suppression list, pause switch and daily limit. Omit to send from the account as a whole. The tenant's external id (your id for that customer) or its Groundmail id | |
| subject | No | Subject line. Optional when using a published template | |
| category | No | transactional (default): sign-in codes, receipts, alerts. product: onboarding, lifecycle and notification email, with one-click unsubscribe. newsletter: opt-in newsletters, for approved accounts only (otherwise the send fails with newsletter_not_enabled), sent from separate IPs with one-click unsubscribe | |
| reply_to | No | Address that replies should go to | |
| variables | No | Template variables when using template_id or template_alias | |
| template_id | No | Published template UUID | |
| template_alias | No | Published template alias |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Email id (msg_…) | |
| test | No | Present and true on a test send (test key or simulator addresses): nothing was delivered | |
| status | Yes | Status after the request, for example queued or scheduled | |
| held_back | No | Present when Groundmail validation held some recipients back; the email went to the rest |