Send an email
Email a member of the workspace from the platform's sending address. Prefer notifications.
https://cloud.generalinput.com/v1/platform/send-emailplatform:use on a platform API key. A CLI session always passes.to must be an active member of the key's workspace; any other address is refused with a 422. To reach a member, prefer notifications, which also reach their inbox and phone and respect their settings. To email anyone else, send from the user's own connected mailbox (Gmail, Outlook, Yahoo, AOL, iCloud, or IMAP).
Emails go out from mail@fromgeni.com. The inbox is not monitored, so do not ask recipients to reply. HTML body only; there is no plain-text fallback.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
to | string | yes | A workspace member's address. |
subject | string | yes | |
htmlBody | string | yes | The body as HTML. |
attachments | object[] | no | See below. Each at most 10 MB. |
Each attachment:
| Field | Type | Required | Notes |
|---|---|---|---|
filename | string | yes | report.pdf |
contentType | string | yes | MIME type, application/pdf. |
contentBase64 | string | yes | The file, base64-encoded. |
Response
{ "messageId": "a8c1…" }The provider's message id, for tracking.
Deliverability
A recipient's first email from mail@fromgeni.com may land in spam. When you tell someone you emailed them, ask them to check spam and add the address to their contacts so later sends reach the inbox.
Example
curl -s -X POST https://cloud.generalinput.com/v1/platform/send-email \
-H "Authorization: Bearer $GI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"ada@acme.com","subject":"Weekly report","htmlBody":"<p>Attached.</p>","attachments":[{"filename":"report.csv","contentType":"text/csv","contentBase64":"aWQsbmFtZQo="}]}'