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.
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.
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.
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:
You will find them in your app settings, on Batch dashboard (⚙️ Settings → General).
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 "@payload.json" "https://api.batch.com/1.1/BATCH_API_KEY/campaigns/create"
curl -H "Content-Type: application/json" -H "X-Authorization: BATCH_REST_API_KEY" -X GET "https://api.batch.com/1.1/BATCH_API_KEY/campaigns/stats/CAMPAIGN_TOKEN"
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.