Move account to a different profile
Moves a connected social account to a different profile owned by the same user. The target profile must belong to the same user as the account. For API keys restricted to specific profiles, BOTH the source account's current profile AND the target profile must be in the key's allowed set. Calls with a target profile outside the key's scope return 403.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Target profile ID (must be a valid ObjectId and owned by the same user as the account).
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.accounts.moveAccountToProfile({ path: { accountId: 'account_abc123', }, body: { profileId: 'profile_abc123', },});console.log(data);{
"message": "Account updated successfully",
"profileId": "65f1a2b3c4d5e6f7a8b9c0d1"
}{
"error": "Unauthorized"
}Disconnect account DELETE
Disconnects and removes a connected social account.
Get OAuth connect URL GET
Initiate an OAuth connection flow. Returns an authUrl to redirect the user to. Standard flow: Zernio hosts the selection UI, then redirects to your redirect_url. Headless mode (headless=true): user is redirected to your redirect_url with OAuth data for custom UI. Use the platform-specific selection endpoints to complete.