@xem.email/sdk. For anything the SDK does not cover yet, such as analytics, call the API directly with fetch.
Both need an API key. Create one in Settings → API keys and keep it in an environment variable, never in code.
Install
Send an email
Send a saved template
Schedule, reply-to and test sends
Self-hosted installs
Point the SDK at your own API:Call the API with fetch
Every endpoint accepts the API key in theX-API-Key header. This example sends an email with a requestId, so a retry after a network error cannot send it twice:
requestId for a different message returns 409.
Read campaign analytics
Handle errors
See Error handling and Rate limiting for details.
