Notifications
Send email
Send a transactional email on behalf of a project using the project's dedicated sending domain.
Either html or text (or both) must be provided as the email body. Omit from to send from the project's default sender. from can pick one of the project's verified senders (Hosting > Email) or, on a verified domain, set a display name; any other value is ignored and reported in warning.
Up to 10 attachments can be included; each attachment is fetched from its url and streamed for delivery. Recipients (to, cc, bcc): the secret key may email anyone, a signed-in user or a signed-out caller only the project owner.
post/api/notifications/{project_id}/email
Request
- Base URLhttps://core.blink.new
- URLhttps://core.blink.new/api/notifications/{project_id}/email
- AuthHTTP bearer
Path parameters
project_idstring required
Example:my-project-123
Unique identifier for the project
Request body
Example request
{
"subject": "Welcome to our service!",
"html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>",
"text": "Welcome! Thanks for signing up.",
"from": "support@mail.yourdomain.com",
"replyTo": "support@example.com",
"attachments": [
{
"filename": "report.pdf",
"type": "application/pdf",
"url": "https://example.com/files/report.pdf"
}
]
}Response
Email sent successfully
Example response
{
"success": true,
"messageId": "<20231201120000.1.ABC123@abc12345.blink-email.com>",
"from": "noreply@abc12345.blink-email.com",
"to": [
"user@example.com"
],
"subject": "Welcome to our service!",
"timestamp": "2023-12-01T12:00:00.000Z",
"warning": "\"from\" \"noreply@example.com\" is not a verified sender for this project, so it was ignored and the email was sent from the project's default sender. Add the sender in Hosting > Email, or omit \"from\"."
}Changes
No recorded changes to this operation across all 1 revision of this API.