Prerequisites: a StackOne API key, and a connector profile enabled for the provider you’re connecting.
Create a session
Call the Connect Sessions endpoint from your backend. Two fields are required:origin_owner_id: your identifier for the customer’s organizationorigin_owner_name: a human-readable name for that organization, stored against the account
New or existing account
Theorigin_owner_id + origin_owner_name + provider combination decides whether a new account is created or an existing one is updated:
Use
multiple: true when one customer needs several separate accounts for the same provider. It has no effect when account_id is set.
To list a customer’s linked accounts later, filter GET /accounts by origin_owner_id — see Multi-Tenant Accounts.
Target a specific connector profile
Passingprovider alone uses the project’s default connector profile for that provider, which is right for most cases. To route a session to a specific profile (multiple profiles per provider, or migrating users to a new connector version), pass its connector_profile_id. Get the ID from GET /connector_profiles:
Filtering connectors
Control which connectors appear in the Hub by configuring the connect session on your backend. You can specify aprovider or categories property when creating the connect session to control which connectors appear in the Hub:
provider: Opens the Hub directly at the credential entry screen for a specific connector, bypassing the connector listingcategories: Filters the Hub to show only connectors from specified categories (e.g.,hris,ats)
provider keys from GET /actions. Each connector in the response carries a key, which is the value to pass here.
Next steps
Account Linking
Embed the Hub, or share an Auth Link, to consume the token you just created.
Handle Account Events
React to accounts being linked, updated, or disconnected.
Multi-Tenant Accounts
Keep each customer’s linked accounts separate with
origin_owner_id.Connect Sessions API
Every request field and response shape.