03 Jun 2025 by Bijan

Introducing the Streams API: Powerful Email Workflow Management

We’re excited to announce the launch of our new Streams API endpoints! This powerful addition to SunnyboxAI enables you to programmatically manage email streams, giving you complete control over how your email providers are organized and how messages flow through your system.

What are Streams?

Streams are logical groupings of email providers that allow you to organize and route email messages efficiently. Whether you’re building a customer support system, managing multiple email accounts, or creating complex email workflows, streams provide the flexibility you need.

Key Features

Full CRUD Operations

The new API provides complete Create, Read, Update, and Delete operations for streams:

Webhook Integration

Each stream is configured with a webhook URL to receive real-time notifications when new messages arrive. We support secure HTTPS webhooks with optional Basic Authentication for added security.

Provider Association

Easily associate multiple email providers with a stream. This allows you to:

Flexible Updates

Our PATCH endpoint supports partial updates, meaning you only need to send the fields you want to change. Want to update just the webhook URL? No problem:

{
  "stream": {
    "callbackUrl": "https://your-new-webhook.com/endpoint"
  }
}

Example Usage

Creating a new stream with providers:

curl -X POST https://api.sunnybox.io/api/v1/streams \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "stream": {
      "name": "Customer Support",
      "description": "All customer support email accounts",
      "callbackUrl": "https://myapp.com/webhooks/support",
      "basicAuth": true,
      "basicUser": "webhook_user",
      "basicPassword": "secure_password",
      "providerIds": [1, 2, 3]
    }
  }'

Developer-Friendly Features

JSON:API Format

All responses follow the JSON:API specification, providing a consistent and predictable structure with proper error handling and relationship management.

OpenAPI Documentation

Our API is fully documented with OpenAPI 3.1 specification. Use your favorite API client or code generator to integrate quickly.

What’s Next?

This is just the beginning! We’re planning to add more features to streams, including:

Get Started Today

The Streams API is available now for all SunnyboxAI users. Check out our API documentation for complete details and start building amazing email integrations today!

Have questions or feedback? We’d love to hear from you at [email protected]

Happy streaming! 🚀

Cheers Bijan

Back to the Blog