← Documentation home
POST
/hyax-api/v1/email/sendSend transactional email
Requires email marketing configured for the team. At least one of `html` or `text` is required. Suppressed recipients (BOUNCED / COMPLAINED) return 422.
Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.
Request body
| Field | Required | Description |
|---|---|---|
| to | Yes | Recipient email |
| subject | Yes | |
| html | No | HTML body (required if no `text`) |
| text | No | Plain text body (required if no `html`) |
Request examples
Same request in cURL, Node.js (fetch), and PHP (ext-curl).
curl -X POST 'https://platform.hyax.com/hyax-api/v1/email/send' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"to": "[email protected]",
"subject": "Order shipped",
"html": "<h1>Thanks for your order!</h1><p>Your order is on the way.</p>",
"text": "Thanks for your order! Your order is on the way."
}'Example response
Shape varies by data; values are illustrative.
{
"success": true,
"data": {
"id": "msg_provider_id",
"to": "[email protected]",
"subject": "Order shipped"
}
}