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
application/json
application/json
Stuck on an error response? Ask the RevKeen assistant to explain it.
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",
"merchant_id": "500924a8-3f5e-4c00-beb8-2efcde988aea",
"provider": "string",
"resource_type": "string",
"last_sync_at": "2019-08-24T14:15:22Z",
"last_sync_status": "idle",
"last_sync_error": "string",
"cursor": "string",
"items_synced": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
},
"created": true
}{
"error": "Unauthorized"
}{
"error": "Forbidden"
}