Castly is a flexible, provider-agnostic notification service built in Rust.
Send messages via email, SMS, or messaging apps using a single API—no matter the underlying provider.
Castly is under active development. Expect breaking changes until the first stable release.
-
Multi-Provider Support
Integrate with providers like Mailgun, Mailjet, Twilio, and Telegram for email, SMS, or messaging.
Future-ready for push notifications (e.g., Firebase). -
Templated Notifications
Dynamic, customizable templates powered by Tera. -
Synchronous & Asynchronous Modes
- Synchronous – Send instantly via
/sendHTTP endpoint. - Asynchronous – (Coming soon) Consume messages from a queue.
- Synchronous – Send instantly via
-
Configurable via YAML
Works out-of-the-box and adaptable for Kubernetes deployments. -
Observability Built-In
Health checks (/health), structured logging, and distributed tracing via tracing.
| Name | Type | Value in request |
|---|---|---|
| Mailgun | mail_mailgun |
|
| Mailjet | mail_mailjet |
|
| Twilio | mail_twilio |
|
| Telegram | Messaging | telegram |
| Twilio | SMS | sms_twilio |
Send a Notification via API
Endpoint
POST /send
Headers
Content-Type: application/json
Example Request
{
"to": ["receiver@example.com"],
"from": "sender@example.com",
"subject": "Hello, World!",
"notification_type": "mail_mailgun",
"use_raw_text": {
"text": "Hello world!"
}
}