Disconnect ads from an account
Disconnects ads from a social account without removing the posting connection. **Same-token platforms** (metaads, linkedinads, pinterestads): Sets an `adsOptOut` flag. The posting account and OAuth token are preserved. Reconnecting ads clears the flag. **Separate-token platforms** (tiktokads, xads): Clears the ads-specific metadata (marketing API tokens). The posting account stays intact. **Standalone platforms** (googleads): Do not use this endpoint. Use `DELETE /v1/accounts/{accountId}` instead, since Google Ads accounts are standalone.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
The SocialAccount ID (parent posting account for same-token/separate-token platforms)
The ads platform to disconnect
"metaads" | "linkedinads" | "pinterestads" | "tiktokads" | "xads"Response Body
application/json
application/json
application/json
curl -X POST "https://zernio.com/api/v1/accounts/string/disconnect-ads" \ -H "Content-Type: application/json" \ -d '{ "adsPlatform": "tiktokads" }'{
"message": "tiktokads disconnected successfully"
}{
"error": "Unauthorized"
}{
"error": "Not found"
}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.