Activate integration
Activate an external integration for the authenticated merchant. Validates the supplied credentials against the provider, stores them via KMS envelope encryption, seeds the sync-state cursor, and schedules the first incremental sync. Returns 409 if the merchant already has an active integration with this provider — call the deactivate endpoint first, or use /sync-toggle to resume a paused integration.
Related endpoints
POST /integrations/{provider}/deactivate— Deactivate integrationGET /integrations/{provider}— Get integration statusPOST /integrations/{provider}/test— Test integration credentialsPOST /integrations/{provider}/sync— Trigger manual syncGET /integrations— List all integrationsPUT /integrations/{provider}/status— Update integration statusPUT /integrations/{provider}/sync-toggle— Toggle integration syncPUT /integrations/{provider}/sync-interval— Update sync interval
Common errors
400 invalid_request— malformed payload or failed validation.401 unauthenticated— missing, malformed, or revoked API key.409 conflict— Idempotency-Key collision with a different body, or a concurrent state-transition conflict.
Idempotency
Pass an Idempotency-Key header (UUID v4 recommended) to make retries safe. Keys are valid for 24 hours; see the idempotency guide.
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
"practicehub" | "wodify" | "terminal"Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://api.revkeen.com/v2/integrations/practicehub/activate" \ -H "x-api-key: $REVKEEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "credentials": { "apiKey": "string", "baseUrl": "https://example.com", "appName": "RevKeen", "appEmail": "info@revkeen.com" } }'{
"success": true,
"data": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"provider": "practicehub",
"isActive": true,
"syncEnabled": true,
"status": "connected",
"lastSyncAt": "2019-08-24T14:15:22Z",
"lastSyncError": "string",
"syncHealth": "healthy",
"providerState": {
"consecutiveErrors": 0,
"lastErrorAt": "string",
"lastSyncAt": "string",
"mode": "string"
},
"syncInterval": {
"hasRepeatableJob": true,
"intervalMs": 0,
"nextRun": "2019-08-24T14:15:22Z"
},
"configuration": {
"property1": null,
"property2": null
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}