Skip to main content
POST
Connect Integration
Connect an integration whose setup only needs an API key and/or a webhook signing secret: Polar, Paddle, Dodo Payments, Lemon Squeezy, Whop, Creem, Chargebee, Clerk, PostHog, Segment, Affonso, or Attio. Credentials are validated against the provider where possible, stored encrypted, and never returned by any endpoint. Payment providers queue their initial revenue backfill automatically; Affonso queues its affiliate backfill; PostHog and Segment can optionally import their event history. Attio is outbound-only and returns an empty webhookUrl. For Lemon Squeezy, omit webhookSecret to create the signed webhook automatically, or supply it for manual setup. For other inbound providers, configure the returned webhookUrl with the same secret you passed here. Calling this for an already-connected provider replaces its stored credentials; Lemon Squeezy managed reconnections rotate the secret. OAuth and app-install providers (Stripe, Shopify, Supabase, GitHub, WooCommerce, Meta) cannot be connected here: their flows need a browser, so they return a 400 pointing at the dashboard. Use Integration Catalog to discover each connectable provider’s exact fields via connectFields. Requires an API key with the integrations:manage scope.

Request

string
required
One of polar, paddle, dodo, lemon_squeezy, whop, creem, chargebee, clerk, posthog, segment, affonso, attio.
string
Signing secret of the webhook you create at the provider, pointed at the returned webhookUrl. Optional for Lemon Squeezy managed provisioning and Attio, which is outbound-only; required for other providers. For Chargebee, pass the webhook’s basic-auth credentials as username:password. Lemon Squeezy manual secrets must be 16-40 characters. For Segment, the secret is your own choice and must be between 16 and 153 UTF-8 bytes.
string
Provider API key. Required for polar, paddle, dodo, lemon_squeezy, whop, creem, chargebee, affonso, and attio. Attio uses the workspace access token from Settings → Developers.
string
Provider account ID. Required for Paddle (seller ID), Dodo (business ID), Lemon Squeezy (numeric store ID), Whop (company ID, biz_...), Creem (store ID), and Chargebee (site name). Polar resolves it from the API key; Clerk, PostHog, Segment, and Affonso derive it.
object
PostHog and Segment: { syncAllEvents?: boolean, eventAllowlist?: string[] }. PostHog defaults to syncing every non-internal event. New Segment connections sync track and identify calls but skip automatic page and screen calls unless those names are explicitly allowlisted. Attio: { listMap?: Record<string, string>, syncCompanyFromDomain?: boolean }, where listMap is Sequenzy list id → Attio list UUID or api slug (syncCompanyFromDomain defaults to true). Mapping can also be set after connect with Update Attio List Mapping without the access token.
object
PostHog and Segment only: imports event history after connecting. PostHog: { region: "us" | "eu", projectId: string, personalApiKey: string } - the personal API key needs query read access and the whole project archive is imported. Segment: { region: "us" | "eu", spaceId: string, profileApiToken: string } - Segment has no bulk event export and its Profile API serves at most the last 14 days of a profile’s events, so the import walks your existing contacts and reads each one’s recent Unify history by email; contacts without a Segment profile are skipped.

Response fields

object
The connected integration, in the same shape as List Integrations. Credentials are never included.
string
URL to configure in the provider’s webhook settings with the same secret. Empty for Attio, which is outbound-only.
boolean
Payment providers only: whether the initial revenue backfill was queued.
string
Lemon Squeezy only: managed when Sequenzy installed the webhook, or manual when the caller supplied its signing secret.
boolean
Lemon Squeezy only: whether the API key and store are in test mode.
boolean
Affonso only: whether the affiliate backfill was queued.
object
PostHog and Segment only: {(requested, queued, error)} for the optional history import. The webhook connection succeeds even when queueing the import failed.

Responses