Skip to main content
PATCH
/
v1
/
models
/
attachment
/
{id}
Update attachment
curl --request PATCH \
  --url https://api.abloatai.com/v1/models/attachment/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "intent": "<string>",
  "readAt": 123,
  "idempotencyKey": "<string>"
}
'
{
  "object": "commit_receipt",
  "clientTxId": "<string>",
  "serverTxId": "<string>",
  "success": true,
  "lastSyncId": 123,
  "ops": 123,
  "error": {
    "code": "<string>",
    "message": "<string>",
    "field": "<string>",
    "requiredCapability": {
      "scope": "<string>",
      "constraints": {},
      "issuer": "<string>",
      "ttlSeconds": 123,
      "nonce": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

API key (sk_live_…) or a scoped capability 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.

Path Parameters

id
string
required

Record id.

Body

application/json
data
object

Field payload for attachment mutations. Send the full entity on CREATE (its required fields must be present); send only changed fields on UPDATE.

id
string | null

Client-chosen id on create (server generates one when omitted).

intent
string | null

Claim id this write is bound to.

onStale
enum<string> | null

Conflict policy (default reject).

Available options:
reject,
force,
flag,
merge,
null
readAt
integer | null

Sync watermark the write was based on.

idempotencyKey
string

Alternative to the Idempotency-Key header.

Response

Commit receipt.

object
enum<string>
required
Available options:
commit_receipt
clientTxId
string
required
serverTxId
string
required
success
boolean
required
status
enum<string>
required
Available options:
confirmed,
rejected
lastSyncId
integer
ops
integer
error
object