We are currently focussed on making SunnyBox the best AI enhanced email automation platform in the market. Our documentation will vastly improve over time. Right now we provide OpenAPI documentation.

OpenAPI Documentation Sign up to Sunnybox.

Table of contents

Getting Started #

Sunnybox has three main components you can make use of to get started. There are Providers, API Keys and Streams. You also have access to the Dashboard showing you your usage stats.

Providers #

Message providers form the core infrastructure of your hub, facilitating the retrieval and transmission of messages on your behalf.

To initiate the process, integrate a provider. You have the flexibility to integrate multiple providers as per your requirements. At present, we only support IMAP; however, support for additional providers is in our development roadmap.

Message Providers

API Keys #

Message providers form the core infrastructure of your hub, facilitating the retrieval and transmission of messages on your behalf.

Copy your API Key and use it in your applications to access your messages. You can also use it to access your messages directly our OpenAPI docs. In the OpenAPI docs click on Authorize and paste your API Key in the field. You can also create more API keys for different applications and restrict access specifying READ, WRITE and DELETE permissions.

API Keys

Streams for Webhooks #

Streams are used for Webhooks. You can group Message Providers to Streams and assign a Webhook URL.

Whenever a new message arrives it gets forwarded to the specified Webhook URL. The URL has to be HTTPS. You can optionally provide Basic Auth credentials.

Streams for Webhooks

Dashboard #

The Dashboard gives you a quick usage overview showing you your total API Calls, Active Providers, API keys and Streams. More analytics will be added later on.


Accessing the API #

After you have set up and enabled your first provider, it is available via our API. In this section you learn how to access the API via our Swagger documentation and via your own Apps. Visit our OpenAPI docs and click on authorize. Then paste in an API Key you created in the API Keys section of the admin panel. Now your requests are authenticated and you can access your resources via our API. Every endpoint is documented and you can find the input and outputs as well as an example response in the OpenAPI documentation together with an example of how to access using curl. Because Sunnybox adheres to the OpenAPI specification you can simply generate the client for you favorite programming language using the official OpenAPI Generator.

API Structure #

The API is structured into four categories: Health, Providers, Messages and Streams.

Health #

This is the endpoint you should call to check if the API is available.

IMAP Providers #

Under this endpoint you can manage your IMAP providers. You can create, read, update and delete providers. Please remember that in order to use a provider you have to enable it. Enabling is done via the Providers endpoint.

Messages #

Under this endpoint you can manage your messages. Here you can read, send and delete messages. Further you can extract attachments from messages.

Threads #

The threads endpoint lets you page through email threads showing the whole message tree of messages and replies.

Providers #

Sunnybox will support more providers in the future. Generic actions that will be supported by all providers are listed here. Currently you can view, activate and deactivate your providers here.