Skip to main content
PATCH
/
v1
/
models
/
{model}
/
{id}
Update a record
curl --request PATCH \
  --url https://api.abloatai.com/v1/models/{model}/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {},
  "readAt": 123,
  "claim": "<string>",
  "idempotencyKey": "<string>"
}
'
{
  "object": "<string>",
  "clientTxId": "<string>",
  "serverTxId": "<string>",
  "success": true,
  "lastSyncId": 123,
  "ops": 123,
  "missingIds": [
    "<string>"
  ],
  "notifications": [
    {
      "object": "<string>",
      "model": "<string>",
      "id": "<string>",
      "readAt": 123,
      "observedSyncId": 123,
      "conflictingFields": [
        "<string>"
      ],
      "currentValues": {},
      "writtenBy": "<string>",
      "group": "<string>"
    }
  ],
  "error": {
    "code": "<string>",
    "message": "<string>",
    "field": "<string>",
    "requiredCapability": {
      "can": "<string>",
      "model": "<string>",
      "syncGroup": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

API key (sk_live_…) or a scoped capability/ephemeral token. The same header carries both — the server discriminates by token shape.

Headers

Idempotency-Key
string

Replay-safe identifier; derive it from the business event, not a random value. Same key + same body returns the same receipt; same key + different body returns 409.

Path Parameters

model
string
required

The model name from your pushed schema (e.g. tasks). The HTTP model API is generated from your own schema — these paths are generic over every model you define.

id
string
required

The record id.

Body

application/json
data
object
required

The model’s fields, as defined in your schema. Shape varies per model; system fields (id, createdAt, updatedAt, organizationId, createdBy) are server-managed.

onStale
enum<string> | null

Conflict policy when the write is based on a stale snapshot. reject (default) fails with AbloStaleContextError; overwrite is blind last-writer-wins; notify holds the write and returns the current value so you can re-apply.

Available options:
reject,
overwrite,
notify,
null
readAt
integer | null

Sync watermark the write was based on. Enables stale-state detection.

claim
string | null

Claim id this write is bound to (held across a slow read→write gap).

idempotencyKey
string

Alternative to the Idempotency-Key header.

Response

Commit receipt.

object
string
required
Allowed value: "commit_receipt"
clientTxId
string
required
serverTxId
string
required
success
boolean
required
status
enum<string>
required
Available options:
confirmed,
rejected
lastSyncId
integer
ops
integer
missingIds
string[]

Ids of any UPDATE/DELETE that matched zero rows (omitted when nothing missed).

notifications
object[]

Held-write advisories from onStale: "notify".

error
object