Api reference
Update sync state
Update or create sync state for a specific resource type. Used by worker after sync jobs.
Related endpoints
GET /sync-state/{source}/{merchantId}— Get sync states for integration
Common errors
401 unauthenticated— missing, malformed, or revoked API key.403 permission_denied— key lacks the required scope, or the resource belongs to a different merchant.
Idempotency
Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.
x-api-key<token>
Your RevKeen API key (powered by Unkey). Get it from Dashboard > Settings > API Keys. Use rk_sandbox_* for test mode and rk_live_* for production.
In: header
Path Parameters
source*string
Integration source (e.g., practicehub, wodify)
merchantId*string
Merchant ID
Format
uuidresourceType*string
Resource type (e.g., members, products, payments)
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://api.revkeen.com/v2/sync-state/practicehub/00000000-0000-0000-0000-000000000000/members" \ -H "x-api-key: $REVKEEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "lastSyncAt": "2026-01-01T00:00:00Z", "lastSyncStatus": "idle", "lastSyncError": null, "cursor": null, "itemsSynced": 0 }'{
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
"provider": "string",
"resourceType": "string",
"lastSyncAt": "2019-08-24T14:15:22Z",
"lastSyncStatus": "idle",
"lastSyncError": "string",
"cursor": "string",
"itemsSynced": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
},
"created": true
}Empty
Empty