Optional client-generated key (UUIDv4 recommended). When present, the gateway deduplicates retries within a 24-hour window and returns the original response. Strongly recommended for all send operations so that network retries never produce duplicate messages.
HTML-formatted message body. Either body_html or body_text is required. When both are supplied, the email is sent as a multipart/alternative message and clients select the best representation.
Every response also carries standard rate-limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID for support traceability.
curl -X POST \ https://data.leadlex.com/functions/v1/api-gateway/v1/email/send \ -H "Authorization: Bearer wbk_your_api_key_here" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 7e0b7c0e-5b2f-4b17-bf2a-4d7e7e33d9f1" \ -d '{ "to": "jane@example.com", "subject": "Follow-up on our meeting", "body_html": "<p>Hi Jane, thanks for meeting with us today.</p>", "contact_id": "123e4567-e89b-12d3-a456-426614174000" }'