Skip to content

Send Email

Send a single transactional email.

POST /api/v1/email/send

Request body

Field Type Required Description
to string Yes Recipient email address
to_name string No Recipient display name
subject string Yes* Email subject line. *Not required if template_id is provided (uses template subject).
template_id integer No ID of a saved email template
body string Yes* Raw HTML body. *Required if template_id is not provided.
variables object No Key/value pairs to replace {{variable}} placeholders in subject and body
from_name string No Sender display name (overrides store default)
sender_id integer No ID of a verified sender from your account (see List Senders)

Example — HTML body

curl -X POST https://admin.notifybulk.com/api/v1/email/send \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "[email protected]",
    "to_name": "Jane Doe",
    "subject": "Your order has shipped",
    "body": "<h1>Good news!</h1><p>Your order #1042 is on its way.</p>",
    "from_name": "Acme Store"
  }'
import requests

requests.post(
    'https://admin.notifybulk.com/api/v1/email/send',
    headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
    json={
        'to': '[email protected]',
        'to_name': 'Jane Doe',
        'subject': 'Your order has shipped',
        'body': '<h1>Good news!</h1><p>Your order #1042 is on its way.</p>',
    }
)
await fetch('https://admin.notifybulk.com/api/v1/email/send', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    to: '[email protected]',
    to_name: 'Jane Doe',
    subject: 'Your order has shipped',
    body: '<h1>Good news!</h1><p>Your order #1042 is on its way.</p>',
  }),
});

Example — using a template with variables

{
  "to": "[email protected]",
  "template_id": 3,
  "variables": {
    "name": "Jane",
    "order_id": "1042",
    "tracking_url": "https://track.example.com/abc123"
  }
}

Placeholders like {{name}}, {{order_id}}, and {{tracking_url}} in the template subject and body will be replaced automatically.


Example — specific sender

{
  "to": "[email protected]",
  "subject": "Welcome!",
  "body": "<p>Thanks for signing up.</p>",
  "sender_id": 2
}

Use GET /senders to get the list of valid sender_id values.


Response

{
  "success": true,
  "message_id": "msg_xxxxxxxxxxxxxxxxxx"
}
Field Type Description
success boolean true on success
message_id string Provider message ID for tracking (may be null for some providers)

Sender resolution

The from address is resolved in this order:

  1. sender_id if provided and valid
  2. Verified domain for the store ([email protected])
  3. Platform default sender

Error responses

HTTP Error message Cause
400 "to" is required Missing recipient
400 "to" must be a valid email address Invalid email format
400 Provide either "template_id" or "body" No content provided
400 "subject" is required Missing subject when no template
402 No email credits remaining No email credits left
404 Template not found Invalid template_id
451 Content blocked by moderation filter Subject or body flagged

Open and click tracking

All emails sent via the API include automatic open and click tracking. Opens are tracked via a transparent 1×1 pixel; clicks are tracked via redirect. You can view these metrics in Marketing → Email Metrics.