RevKeenDocs

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 integration
  • GET /integrations/{provider} — Get integration status
  • POST /integrations/{provider}/test — Test integration credentials
  • POST /integrations/{provider}/sync — Trigger manual sync
  • GET /integrations — List all integrations
  • PUT /integrations/{provider}/status — Update integration status
  • PUT /integrations/{provider}/sync-toggle — Toggle integration sync
  • PUT /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.

POST
/integrations/{provider}/activate
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

provider*string

Legacy configurable integration provider (practicehub, wodify, terminal).

Value in"practicehub" | "wodify" | "terminal"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

Stuck on an error response? Ask the RevKeen assistant to explain it.
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",
    "is_active": true,
    "sync_enabled": true,
    "status": "connected",
    "last_sync_at": "2019-08-24T14:15:22Z",
    "last_sync_error": "string",
    "sync_health": "healthy",
    "provider_state": {
      "consecutive_errors": 0,
      "last_error_at": "string",
      "last_sync_at": "string",
      "mode": "string"
    },
    "sync_interval": {
      "has_repeatable_job": true,
      "interval_ms": 0,
      "next_run": "2019-08-24T14:15:22Z"
    },
    "configuration": {
      "property1": null,
      "property2": null
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "error": "Bad request"
}
{
  "error": "Unauthorized"
}
{
  "error": "Conflict"
}