email notification api endpoint 400 — Missing fields: { "error": "Missing required fields: to, subject, message" } 500 — Send failure: { "error": "Failed to send email" }
email notification api endpoint
400 — Missing fields: { "error": "Missing required fields: to, subject, message" }
500 — Send failure: { "error": "Failed to send email" }
{
"to": "user@example.com",
"message": "<p>Your HTML email body</p>",
"subject": "Your email subject"
}
{
"job_id": "a1b2c3d4-...",
"message_id": "SES-message-id"
}
Send your requests to the following URL using the specified HTTP method.
POST https://eranol.com/api/v1/notifications/emailInclude the following headers with every request. Your API key is required for authentication.
Send the following JSON payload in the request body. Adjust the values to match your use case.
{
"to": "user@example.com",
"message": "<p>Your HTML email body</p>",
"subject": "Your email subject"
}Use the following cURL command to make a request to this API endpoint. Replace YOUR_API_KEY with your actual API key from the dashboard.
curl -X POST "https://eranol.com/api/v1/notifications/email" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"user@example.com","message":"<p>Your HTML email body</p>","subject":"Your email subject"}'Below is an example of a successful JSON response from this endpoint.
{
"job_id": "a1b2c3d4-...",
"message_id": "SES-message-id"
}A successful request will return one of the following HTTP status codes.