Skip to main content
Endpoint: POST /api/v1/emails/send-global Same as “Send email”, plus records global_endpoint_sends usage. Use to separate analytics for this path.
BASE=https://api.fluxomail.com
curl -X POST "$BASE/api/v1/emails/send-global" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: send-$(uuidgen)" \
  -d '{
    "to": "user@example.com",
    "subject": "Hello",
    "content": "Hi there",
    "htmlContent": "<p>Hi there</p>"
  }'
Headers and body are identical to “Send email”. Headers
HeaderTypeRequiredDescription
AuthorizationstringyesBearer <api_key> or x-api-key
Idempotency-KeystringnoUnique per logical request (recommended)
Body
ParameterTypeRequiredDescription
tostringyesRecipient email
subjectstringyesSubject line
contentstringyesText body (used to generate plain text)
htmlContentstringnoHTML body (tracking auto-injected)
policyKeystringnoPolicy to apply (e.g., transactional, bulk)
idempotencyKeystringnoIdempotency key when header cannot be set
Response
{
  "sendId": "sends_...",
  "status": "sent",
  "messageId": "..."
}
Response headers
  • X-Request-Id: unique id for this request
  • Idempotency-Key: echoes idempotency key used (when provided)
  • Idempotency-Replayed: true when a previous result is returned
  • X-RateLimit-* headers when a per-minute cap is configured
Status codes
  • 200 success
  • 401 invalid API key
  • 403 missing scope send_email
  • 429 per‑minute rate limit exceeded (see Retry-After)
  • 500 provider/internal error
Examples Example (Node)
import crypto from 'crypto';

await fetch('https://api.fluxomail.com/api/v1/emails/send-global', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${process.env.FLUXOMAIL_API_KEY}`,
    'Idempotency-Key': `send-${crypto.randomUUID()}`
  },
  body: JSON.stringify({
    to: 'user@example.com',
    subject: 'Hello',
    content: 'Hi there',
    htmlContent: '<p>Hi there</p>'
  })
});
Example (Python)
import os, uuid, requests

r = requests.post(
  'https://api.fluxomail.com/api/v1/emails/send-global',
  headers={
    'Authorization': f"Bearer {os.environ['FLUXOMAIL_API_KEY']}",
    'Idempotency-Key': f"send-{uuid.uuid4()}"
  },
  json={
    'to': 'user@example.com',
    'subject': 'Hello',
    'content': 'Hi there',
    'htmlContent': '<p>Hi there</p>'
  }
)
print(r.status_code, r.json())