Install
You can use Sendlib via REST or SMTP. This guide uses REST.
Get an API key
Create an API key in the dashboard and export it:
export SENDLIB_API_KEY=... Send an email
curl -X POST https://api.sendlib.com/v1/transmissions \ -H "Authorization: Bearer $SENDLIB_API_KEY" \ -H "Idempotency-Key: 0d6c2a6f-3f3c-4d4a-9c1a-2f7f9c1a1f0b" \ -H "Content-Type: application/json" \ -d '{ "recipients": [{"email": "user@example.com"}], "content": { "subject": "Hello from Sendlib", "text": "If you're reading this, your integration works." }, "options": {"mail_type": "transactional"} }'
Observe outcomes
Configure a webhook and start ingesting events.
