Mapping
SendGrid and Sendlib share similar primitives, but the naming differs. Here's the 80/20 mapping to get you migrated quickly.
| SendGrid | Sendlib |
|---|---|
| Mail Send API | Transmissions (/v1/transmissions) |
| API Keys (scopes) | API keys with scopes (least privilege) |
| Event Webhook | Webhooks (/v1/webhooks) |
| Suppressions (global) | Suppressions (/v1/suppressions) |
| Templates | Templates (/v1/templates) |
| Verified Sender / Domain Authentication | Sending domains verification |
Migration checklist
- Verify sending domain (SPF + DKIM) before you flip traffic.
- Create scoped keys per environment (dev/stage/prod).
- Move sending traffic first, then move event ingestion.
- Validate suppressions are enforced (hard bounces, complaints, unsubscribes).
- Add idempotency for create-style endpoints to prevent duplicates.
Examples
SendGrid Mail Send → Sendlib transmission:
curl -X POST https://api.sendlib.com/v1/transmissions \
-H "Authorization: Bearer $SENDLIB_API_KEY" \
-H "Idempotency-Key: sendgrid-migration:test-1" \
-H "Content-Type: application/json" \
-d '{
"recipients": [{"email": "user@example.com"}],
"content": {
"subject": "Hello",
"text": "Migrated from SendGrid"
}
}'Next
- Send mail: Transmissions
- Stream outcomes: Webhooks
- Store reusable content: Templates
- Prevent duplicates: Idempotency
