Send
Send emails, send document emails, and receive webhooks.
|
Endpoints
| POST | /api/v1/mail/send | Send an email |
| POST | /api/v1/mail/send-document | Send a document email |
| POST | /api/v1/mail/webhooks/sendgrid | Receive SendGrid webhook |
POST
/api/v1/mail/sendSend an email
Authentication required— Include session cookie or Bearer token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
to | string | Required | Recipient email address |
subject | string | Required | Subject |
sender_name | string | Optional | Sender name |
sender_email | string | Optional | Sender email address |
reply_to | string | Optional | Reply-to email address |
html_body | string | Optional | HTML body |
text_body | string | Optional | Text body |
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/mail/send" \
-H "Cookie: better-auth.session_token=<token>"POST
/api/v1/mail/send-documentSend a document email
Send a document email with PDF attachment.
Authentication required— Include session cookie or Bearer token
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/mail/send-document" \
-H "Cookie: better-auth.session_token=<token>"POST
/api/v1/mail/webhooks/sendgridReceive SendGrid webhook
Receive delivery events (delivered, bounced, etc.) from SendGrid.
Code Examples
curl -X POST "https://api.blueai.jp/api/v1/mail/webhooks/sendgrid" \
-H "Cookie: better-auth.session_token=<token>"