Skip to main content

Push events to server

Submits a batch of events for the tenant. When a direct postgres URL is available, the batch runs transactionally — all events commit or none are applied.

Request​

Method: POST
Path: /api/sync/push

Authentication: Not required

Request Body​

Content Type: application/json

Schema: See component schemas below

Responses​

200 - Batch applied​

400 - Invalid payload​

404 - Tenant not found​

422 - Batch rolled back; no events applied​

Examples​

cURL​

curl -X POST \
-H "Content-Type: application/json" \
http://localhost:3000/api/sync/push \
-d '{"example": "data"}'

JavaScript​

const response = await fetch('http://localhost:3000/api/sync/push', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
// Request data
}),
});

const data = await response.json();
console.log(data);

This documentation is automatically generated from the OpenAPI specification.