The Bubble API is a way to have your app interact with the outside world (other services). This is different from accessing data from other services, which is done via plugins (or the API connector). You can use the API to run events on some given webhooks. This can be useful in several cases
- You want to send an email whenever a credit card fails for a subscription with Stripe. You can define an API workflow that does this in the Bubble editor, and get Stripe to trigger this workflow via the Workflow API when a charge fails.
- You want to get the new things created in the database every week. You can write a script that fetches the new things via the Data API.
- You want to handcode a native iOS app (or an iWatch app) in Swift. You can use both the Workflow and the Data API to fetch data, login users, run workflows from your app coded in Swift.
The API workflow is also the tool you'll use to set up scheduled workflows in your app. Scheduled and recurring workflows do not involve external services, but will require you set up some API workflows that will be triggered in the background by your app. You can see the relevant section below for this particular use case.
Lastly, an option that the API offers is to open your app to other developers. You can start having other developers build apps that connect with our app, read data, or that lets users authenticate with your app's credentials, as Facebook lets developers use a 'Login with Facebook' button.
In other words, What the Bubble API will let you do is:
- Let another service/server programmatically read your Bubble app's database. This is useful if you're building yourself another system that should share the same database, or if you want to expose data to other developers.
- Let another service/server programmatically trigger some workflows in your Bubble app. This is useful if you want the external world to trigger some actions in your app.
As soon as you want the external world to do something with your app (run workflows or read data), the Bubble API is the right tool. On the other hand, If you want your app to read external data or trigger some action on another system (like fetching a Facebook profile picture or sending a SMS with Twilio), the Bubble API is not the right tool. Instead, you should use a plugin or the API connector, or build a new plugin to add this new service.