Skip to content

Batch API

Use POST /api/batch to group multiple record mutations into a single transactional HTTP request.

Terminal window
curl -X POST http://localhost:3000/api/batch \
-H "Authorization: Bearer <JWT>" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{ "method": "POST", "url": "/api/collections/posts/records", "body": { "title": "First" } },
{ "method": "PATCH", "url": "/api/collections/posts/records/123", "body": { "published": true } }
]
}'
  • Sub-requests are strictly restricted to /api/collections/... paths (no path traversal, no nested /api/batch).
  • Client IP and authentication context are preserved accurately on every sub-request.