With Batch RESTful APIs you can easily send custom data and push notifications to take advantage of Batch’s advanced features from your own systems. There are 7 APIs you can use to cover your needs: engaging with your users, sending custom user data and being GDPR-compliant.
All Batch engagement channels: Mobile push, Web push and In-App messages can be completely used remotely via our APIs.
- The Transactional API is made for 1-to-1 or 1-to-few interactions. It allows you to send push notifications to a specific list of user IDs (push token, Advertising IDs or Custom User IDs) based on events in your back-end (e.g. "You have a new friend request").
- The Push Campaigns API is made for 1-to-many interactions. It allows you to send push notifications in mass to your users according to targeting criteria (using your custom data or Batch generated data) or with your own segmentation engine with Custom Audiences.
- The In-App campaigns API allows you to send customized In-App messages to your users, the targeting method being quite close to the Campaigns API.
You probably want to send Batch some custom data for campaign targeting and message personnalisation purposes. Our APIs enables you to send us data at three different scale: the app, a group of users and a single user.
- The App Data API allows you to send custom data you associated to your application. This is particularly useful if you need app-level in your campaigns, such as dates or attributes (e.g. Quick! Premium subscription discount will end in 3 days)
- The Custom Audience API allows you to send Batch specific lists of user IDs for your push and In-App campaign targeting. Your own segmentation will then be available on the dashboad as a Custom Audience.
- The Custom Data API to send custom data on specific custom user IDs (iOS/Android) to improve your campaign targetings and personnalization with your own custom data.
Being GDPR-compliant, Batch let you make requests to fetch and/or delete user data from our database. Our GDPR API allows you to make those requests and regain control of Batch's collected user data.
Batch let you make requests to get data from our database. Our EXPORT API allows you to make those requests and get back data concerning to your audience.
Take a look at this guide if you want to know more on how to use our APIs.
Before sending your first notification with Batch REST API, make sure you have:
- Your Batch REST API key.
- Your app API key or your website SDK API key.
- At least a Developer plan for the Push Campaigns API.
- At least a Startup plan for the Custom Data API.
You will find these IDs in your app settings, on Batch dashboard (⚙️ Settings → General). Please note you need to be the manager of the account to see the REST API key.
You will need to use the same api keys and headers for both the campaigns or the transactional API. Here is an example of a valid request syntax:
curl -H "Content-Type: application/json" -H "X-Authorization: BATCH_REST_API_KEY" -X POST -d
curl -H "Content-Type: application/json" -H "X-Authorization: BATCH_REST_API_KEY" -X GET
BATCH_REST_API_KEYis your REST API key. It goes in the
BATCH_API_KEYis you app API key or the SDK API key of your website. It is the one that goes in the URL.