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.
Don't migrate without webhooks
If you cut over sending but keep the old event pipeline, you'll be blind to delivery outcomes. Webhooks are the canonical stream for production behavior.
Examples
SendGrid Mail Send → SendLib transmission:
bash
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