← Documentation home
POST/hyax-api/v1/email/send

Send 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

FieldRequiredDescription
toYesRecipient email
subjectYes
htmlNoHTML body (required if no `text`)
textNoPlain 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"
  }
}