Getting Started

Quickstart

Send your first email in 5 minutes.

What you'll build

A single request to send mail, plus webhooks for delivery outcomes.

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:

bash
export SENDLIB_API_KEY=... 

Send an email

bash
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.

Pro tip

Don't poll. Webhooks + idempotency will keep you sane in production.