Hosted services
Send an email
Send an HTML email with optional attachments from the platform's sending address.
POST
https://cloud.generalinput.com/v1/platform/send-emailAuthenticationRequires
platform:use on a platform API key. A CLI session always passes.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 | Recipient 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@example.com","subject":"Weekly report","htmlBody":"<p>Attached.</p>","attachments":[{"filename":"report.csv","contentType":"text/csv","contentBase64":"aWQsbmFtZQo="}]}'