Skip to main content
BlueAI
Home/Mail/Send

Send

Send emails, send document emails, and receive webhooks.

|

Endpoints

POST/api/v1/mail/sendSend an email
POST/api/v1/mail/send-documentSend a document email
POST/api/v1/mail/webhooks/sendgridReceive SendGrid webhook
POST/api/v1/mail/send

Send an email

Authentication requiredInclude session cookie or Bearer token

Request Body

NameTypeRequiredDescription
to
stringRequiredRecipient email address
subject
stringRequiredSubject
sender_name
stringOptionalSender name
sender_email
stringOptionalSender email address
reply_to
stringOptionalReply-to email address
html_body
stringOptionalHTML body
text_body
stringOptionalText 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-document

Send a document email

Send a document email with PDF attachment.

Authentication requiredInclude 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/sendgrid

Receive 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>"