Onboard a customer
Create a profile for a new customer, let them connect their accounts with a link, and post for them.
This recipe is for agencies and products that post for their customers. It creates a profile per customer, sends a connect link, and waits for the account to arrive. The background is in Agencies and SaaS.
You need a key with access to all profiles (creating profiles needs it) and the scopes profiles:write and platform_invites:write.
1. Create the profile
Store your customer id in externalId, so you can find the profile without keeping our id.
curl -X POST https://feedhorizon.com/api/v1/profiles \
-H "Authorization: Bearer $FEEDHORIZON_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Soup Club", "timezone": "Europe/Berlin", "externalId": "cus_8812" }'A second profile with the same externalId answers 409 external_id_taken. To make the step safe to repeat, look first: GET /profiles?externalId=cus_8812.
2. Send a connect link
Create one link per platform the customer wants to connect.
curl -X POST https://feedhorizon.com/api/v1/platform-invites \
-H "Authorization: Bearer $FEEDHORIZON_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "profileId": "prof_…", "platform": "linkedin" }'The link works once and for 7 days. The customer signs in at the platform; they need no FeedHorizon account. Connect links shows what they see.
3. Wait for the account
When the customer is done, FeedHorizon sends account.connected:
{
"id": "evt_…",
"event": "account.connected",
"timestamp": "2026-11-10T08:00:00.000Z",
"data": {
"accountId": "acc_…",
"profileId": "prof_…",
"platform": "linkedin",
"displayName": "Soup Club"
}
}Find the customer by profileId, store the accountId, and show the account as connected in your app. Without a webhook, poll GET /accounts?profileId=… or check usedAt in GET /platform-invites?profileId=….
4. Post for the customer
Create posts in the customer's profile as usual, with platforms or the stored accountIds. See Post an image to several platforms.
Keep connections healthy
Some platforms end connections after a while, or the customer revokes access. Listen for:
account.expiring: the connection ends in 7 days and cannot be renewed automatically. Send the customer a new connect link.account.needs_reauth: the connection has stopped working. Posts to it fail withaccount_needs_reauthuntil the customer connects again, through a new connect link.
Reconnecting the same social account to the same profile keeps its account id, so the ids you stored stay valid.