Sync
Two-way checkpoint sync for local → server + server → local deltas.
Client SDK uses these endpoints for background delta sync. Conflicts are resolved server-wins — if the server has a newer last_synced_at than the incoming change's client_timestamp, the client gets a conflict record and keeps the server value.
Source: apps/api/src/routes/client/sync.ts.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /client/sync | Push local changes. |
| GET | /client/sync | Pull remote changes since a checkpoint. |
POST /client/sync
Request (SyncPushInput)
Response 200
Errors
500 SYNC_FAILED.
Try it:
POST
client auth/client/synccurl -X POST 'https://api.amba.dev/client/sync'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
GET /client/sync
Pull up to 100 changes newer than the supplied checkpoint.
Query
| Param | Required | Description |
|---|---|---|
entity_type | yes | The entity kind to sync (must be a simple identifier; LIKE metacharacters are escaped). |
checkpoint_token | no | Opaque token from a prior response. Omitting = full sync from epoch. |
Response 200
Errors
400 INVALID_INPUT—entity_typemissing.500 SYNC_FAILED.
Try it:
GET
client auth/client/synccurl -X GET 'https://api.amba.dev/client/sync'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl: