Idempotent batch apply of offline mutations (LWW, delete-wins)

Authenticate every request with Authorization: Bearer <token> — a JWT or API token.

Download OpenAPI JSON
Overview
POST/sync/push

Idempotent batch apply of offline mutations (LWW, delete-wins)

Create a record in push.

Auth: bearerAuth — calls run as the authenticated user.

Request body

application/json · optional

  • deviceIdstring
  • opsSyncPushOp[]
Example
{
  "deviceId": "string",
  "ops": [
    {
      "opId": "string",
      "resource": "string",
      "rowId": "string",
      "type": "upsert",
      "baseVersion": "string",
      "data": {}
    }
  ]
}
Responses
200

Per-op results + watermark

  • resultsSyncPushResult[]
  • watermarkstring
Example
{
  "results": [
    {
      "opId": "string",
      "status": "applied",
      "reason": "string",
      "current": {},
      "newVersion": "string"
    }
  ],
  "watermark": "string"
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/sync/push" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "deviceId": "string",
  "ops": [
    {
      "opId": "string",
      "resource": "string",
      "rowId": "string",
      "type": "upsert",
      "baseVersion": "string",
      "data": {}
    }
  ]
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/sync/push", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"deviceId\": \"string\",\n  \"ops\": [\n    {\n      \"opId\": \"string\",\n      \"resource\": \"string\",\n      \"rowId\": \"string\",\n      \"type\": \"upsert\",\n      \"baseVersion\": \"string\",\n      \"data\": {}\n    }\n  ]\n}",
});
const data = await res.json();