Batch requests
documentedBatch multiple API requests in a single call.
POST /batchBatchingno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://api.mailerlite.com/api/v2/batch" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-MailerLite-ApiKey: {{MAILERLITE_API_KEY}}" \
-d '{"requests":[{"method":"GET","path":"api/v2/subscribers?limit=5"},{"method":"POST","path":"api/v2/subscribers","body":{"email":"{{$email}}","name":"{{$name}}","fields":{"city":"{{$city}}","country":"{{$country}}","custom_field_1":"{{$custom_field_1}}"},"status":"subscribed"}}]}'