Skip to main content
Integrators on a Business or Enterprise plan can onboard their clients’ social accounts under sub-profiles. Using the MCP Server, an agent creates a sub-profile, targets it, and mints a single sign-on linking URL the client opens to connect their accounts.

Flow

1

Create a sub-profile

Call create_profile (account-level — no profileKey). It returns a profile key for the new sub-profile.
2

Target the sub-profile

Use the returned profile key on subsequent calls — either via the Profile-Key header on the connection or as a per-call profileKey argument. See Connect & Setup for precedence.
3

Mint a social-linking URL

Call generate_jwt_social_linking_url to mint a single sign-on linking URL. The JWT signing key and onboarding domain are derived server-side — the caller supplies no X-Ayrshare-* headers and no private key or domain.
4

Client links their accounts

The client opens the URL and authorizes (OAuths) their social accounts. The connected accounts are linked to the sub-profile.

Requirements

generate_jwt_social_linking_url requires a profileKey. If none resolves, the call returns 400 with the message “Profile Key is required…”.A social-linking domain must be provisioned for your account. This is available on the Business and Enterprise plans.

Error states

ConditionResponse
No provisioned domain400 — “No social-linking domain is provisioned for this account (available on Business/Enterprise plans).”
No signing key400 — “No signing key found for this account’s social-linking domain.”

Next steps

Connect & Setup

Authentication and profile targeting.

Tool Catalog

The 27 tools grouped by domain, with scope and purpose.