Send one email (from an app)
For an app's own server code only: await env.HYPAMOON.sendEmail({ to, subject, text }) does this call, POST env.HYPAMOON_API + "/app-emails" without an Authorization header; Hypamoon adds the app's key, and any other key gets 403 (other keys use POST /emails with messages:write). The same rules as POST /emails, for the app's project: the Mail module on, recipients (to, cc, bcc) that the project knows (a user of the app, a form submission, a document, a chat conversation) or that the owner confirmed, attachments, the daily and per-minute limits per recipient, and the content check. In the app, an attachment's content may be a Uint8Array (like the result of env.HYPAMOON.renderPdf); the wrapper sends it as base64. from is optional: without it the email comes from noreply@ on the project's verified sending domain (the oldest one). No signed-in user is needed, so a scheduled job can send too. With a test key nothing is sent (status simulated).
Request
- Base URL: https://api.hypamoon.com/api/v1
- URL: https://api.hypamoon.com/api/v1/app-emails
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: data:write)
Headers
Optional. The same key returns the same email instead of sending it again.
Request body
Response
The same Idempotency-Key as before: the original email, and nothing is sent again.
Changes
No recorded changes to this operation across all 1 revision of this API.