Documentation Index
Fetch the complete documentation index at: https://docs.fluxomail.com/llms.txt
Use this file to discover all available pages before exploring further.
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
| Header | Type | Required | Description |
|---|
| Authorization | string | yes | Bearer <api_key> or x-api-key |
| Idempotency-Key | string | no | Unique per logical request (recommended) |
Body
| Parameter | Type | Required | Description |
|---|
| to | string | yes | Recipient email |
| subject | string | yes | Subject line |
| content | string | yes | Text body (used to generate plain text) |
| htmlContent | string | no | HTML body (tracking auto-injected) |
| policyKey | string | no | Policy to apply (e.g., transactional, bulk) |
| idempotencyKey | string | no | Idempotency 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())