---
title: "Connect integration"
method: POST
path: "/integrations/connect"
tags: ["Integrations"]
---

# Connect integration

`POST /integrations/connect`

Connects an API-key / webhook-secret integration: polar, paddle, dodo, whop, creem, chargebee, clerk, posthog, or affonso. Credentials are validated against the provider where possible, stored encrypted, and never returned. Payment providers queue their initial revenue backfill; Affonso queues its affiliate backfill; PostHog can optionally import event history. The response includes the webhookUrl to configure at the provider with the same secret. Reconnecting replaces stored credentials. OAuth and app-install providers (Stripe, Shopify, Supabase, GitHub, WooCommerce, Meta) return a 400 pointing at the dashboard. Requires the integrations:manage scope.

## Request body

- object
  - `provider` 'polar' | 'paddle' | 'dodo' | 'whop' | 'creem' | 'chargebee' | 'clerk' | 'posthog' | 'affonso', required — Provider to connect.
  - `webhookSecret` string, required — Signing secret of the webhook created at the provider. For Chargebee, the webhook's basic-auth credentials as username:password.
  - `apiKey` string — Provider API key. Required for every provider except clerk and posthog.
  - `providerAccountId` string — Provider account id: Paddle seller ID, Dodo business ID, Whop company ID, Creem store ID, or Chargebee site name. Polar resolves it from the API key.
  - `settings` object — PostHog only. Event delivery scope.
    - `syncAllEvents` boolean
    - `eventAllowlist` string[]
  - `historyImport` object — PostHog only. Imports the project's event history after connecting.
    - `region` 'us' | 'eu', required
    - `projectId` string, required — Numeric PostHog project ID.
    - `personalApiKey` string, required — PostHog personal API key with query read access.

## Response `200`

Integration connected

- object
  - `success` boolean
  - `integration` IntegrationSummary
    - `id` string
    - `provider` string
    - `name` string — Display name for the provider, falling back to the raw provider id.
    - `category` 'payments' | 'ecommerce' | 'auth' | 'analytics' | 'ads' | 'affiliate' | 'cms' | 'developer', nullable — Provider category, or null for a provider with no catalog entry.
    - `providerAccountId` string — Provider-side account identifier, such as a Shopify shop domain or Stripe acct_ ID.
    - `isActive` boolean
    - `syncEnabled` boolean
    - `syncStatus` string, nullable
    - `lastSyncAt` string, date-time, nullable
    - `lastSyncError` string, nullable
    - `totalCustomersSynced` integer
    - `totalEventsSynced` integer
    - `connectedAt` string, date-time
    - `disconnectedAt` string, date-time, nullable
    - `details` object — Allowlisted non-secret metadata. Never contains credentials.
    - `lastSyncSkipped` IntegrationSyncSkipSummary — Summary of records a store import could not bring in normally. A store with real order history often carries a few addresses on domains that have since been shut down; those are reported here instead of failing the whole import.
      - `total` integer — Every affected record, including any beyond the stored sample.
      - `suppressed` integer — Imported, but the address cannot receive email, so the profile is stored as bounced and sends stay suppressed. Order history still attaches to it.
      - `skipped` integer — Not imported at all.
      - `truncated` boolean — True when more records were affected than `records` holds.
      - `records` object[] — Sample of the affected records, up to 50.
        - `email` string, nullable
        - `outcome` 'suppressed' | 'skipped'
        - `reasonCode` string
        - `reason` string
  - `webhookUrl` string — URL to configure in the provider's webhook settings with the same secret.
  - `revenueSyncQueued` boolean — Payment providers only. Whether the initial revenue backfill was queued.
  - `backfillQueued` boolean — Affonso only. Whether the affiliate backfill was queued.
  - `history` object — PostHog only. Outcome of the optional history import request.
    - `requested` boolean
    - `queued` boolean
    - `error` string, nullable

## Other responses

- `400` — Missing or invalid fields, or a provider that requires the dashboard
- `401` — The Sequenzy API key is missing or invalid
- `403` — The Sequenzy API key lacks integrations:manage or company access
- `409` — The provider account is already connected to another workspace

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/versions/af1cf9620482/schema)
