Get the saved welcome screen
The workspace's saved welcome screen settings, shared by the whole team. With showByDefault on, every GET /v1/connect/{platform} made with your API key shows the welcome screen before the platform's authorization screen, without welcome=true or any branding parameter. Connects started from the Zernio dashboard always show it, with this branding when saved.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Responses
Success· the request worked
Errors· the request failed
Connect ads for a platform
Starts connecting a platform's ads account, giving you a dedicated ads connection to manage campaigns without touching posting accounts. It creates a dedicated ads SocialAccount for the specified platform. Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., metaads, tiktokads) in GET /v1/accounts. ### Meta business login (opt-in) Set `loginMode=business` for `facebook` or `instagram` to use Facebook Login for Business and a Business Integration System User token. No posting account is created or required. This mode always returns an authUrl. It returns 503 when the server has no META_ADS_CONFIG_ID. Complete the dialog in a browser. The callback creates or reconnects only the metaads account, preserving its ID and history. Non-empty successful subscription results replace subscribedAdAccountIds to remove stale grants; an empty result leaves routing unchanged. #### Reconnecting A reconnect is accepted when the new grant shares at least one ad account with the existing connection, so re-running the dialog can add, drop or swap ad accounts. The existing connection's ad accounts are its scopedAdAccountIds plus the previous grant, or the ad accounts its old token can read when neither is stored. - A grant with zero overlap is refused before changing the account and redirects with `error=invalid_field_value` and `error_reason=reconnect_mismatch` (disconnect and connect again to switch). - When the previous ad accounts cannot be read at all, it redirects with `error=reconnect_required`. On an accepted reconnect the scope is rebuilt from the new grant: - `adAccountIds` passed on the re-auth become the scope. - Otherwise a stored scope keeps its ad accounts that are still granted, plus any granted for the first time. - An unscoped connection follows the new grant. #### Page selection Pass `pageId` to select a granted Page for creatives and lead forms. API integrations otherwise reuse the previous Page or the sole granted Page. Multiple Pages without a selection return 400 with available Page IDs for API integrations; restart with pageId. Dashboard session logins use the sole current grant automatically, or open the existing Facebook Page picker for several grants, including reconnects. Selection completes the Meta Ads connection. #### Result redirects Success redirects with connected=metaads, profileId and accountId. Every failure after Meta's dialog redirects to redirect_url (or the dashboard) with `error`, `platform=metaads`, `error_message`, `request_id` and `stage`, plus `is_user_fixable` and `error_reason` when known. `error` is the API error code: - `invalid_field_value`, with `error_reason`: - `no_pages_granted`: no Page ticked - `page_not_granted`: pageId not in the grant - `ad_accounts_not_granted` - `reconnect_mismatch`: the grant shares no ad account with the existing connection - `reconnect_required`, `ads_addon_required`, `payment_required` and the profile gates of GET /v1/connect/{platform} - `invalid_state` with `error_reason=state_expired`: after the 30-minute window - `connection_failed`: Meta refuses the code (e.g. a replayed callback) - `meta_ads_authorization_denied`: a denial in the dialog, with the `platform_error*` params Only a state that cannot be decrypted at all still answers 400 JSON, since it names no redirect_url. #### Tokens Business login reports metadata.tokenType=system-user in GET /v1/accounts. An absent Meta expires_in leaves tokenExpiresAt absent; no personal-token re-exchange occurs. Subsequent classic requests can change the ad-account scope using the business token. force=true (or disconnecting the business connection first) switches the profile to the standard Facebook login; the ads account is then held by the user token. ### Same-token platforms (facebook, instagram, linkedin, pinterest) The ads SocialAccount (metaads, linkedinads, pinterestads) reuses the OAuth token of the parent posting account, but only when: - an active parent exists, and - for facebook and instagram, its stored token carries ads_management and ads_read (linkedin and pinterest need no extra scope). In that case no extra OAuth happens and the response is alreadyConnected: true. When no such parent exists, or the scopes are missing, the endpoint returns an authUrl and a full OAuth round trip is required. Errors: - 400 RECONNECT_REQUIRED: a parent exists but carries no token usable for ad accounts - 403 ADS_ADDON_REQUIRED: no ads add-on (independently of the branch) - 402 PAYMENT_REQUIRED: the billing gate is closed (independently of the branch) #### Meta Ads needs a Facebook Page Connecting Meta Ads (via facebook or instagram) requires a Facebook Page. Not because the ad account is read through a Page, but because both parent posting accounts are: - the facebook flow only offers Pages you manage - the instagram flow with loginMethod=facebook_login only offers Instagram accounts linked to one of those Pages Without a Page there is no parent account to inherit a token from. A user who manages no Facebook Page cannot complete this connection, and the facebook flow ends with error=no_facebook_pages. ### Separate-token platforms (tiktok, twitter) Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (tiktokads, xads) with its own token. If the ads account already exists, returns alreadyConnected: true. - twitter (X Ads): accountId is REQUIRED. There's no ads-only mode, because tweets need to be authored by a real X user. - tiktok: accountId is OPTIONAL. #### TikTok with or without accountId - With accountId, the new tiktokads account links to that posting account (parentAccountId set), so Spark Ads + standalone ads using the posting TT_USER identity become available. - Without accountId, ads-only mode kicks in: the new tiktokads account has parentAccountId=null and standalone ads use a synthetic CUSTOMIZED_USER ("Brand Identity"). Spark Ads are unavailable because TikTok requires a posting account for them. The Brand Identity is configured separately via PATCH /v1/connect/tiktok-ads (or inline on POST /v1/ads/create via the brandIdentity field). ### Standalone platforms (googleads) Starts the Google Ads OAuth flow and creates a standalone ads SocialAccount (googleads) with no parent. - If the account already exists and has at least one discovered Google Ads customer account, returns alreadyConnected: true. - When the profile's accounts are already one per ad account of a single Google login, it also returns alreadyConnected: true and adds an account per new `adAccountIds` entry. Existing accounts are never de-scoped, and `accountId` is a reused account. - Accounts of several Google logins return an authUrl to sign in again. - When the existing connection has zero customer accounts (metadata.googleAdsCustomerIds is empty) or is flagged needsReconnection, it returns an authUrl instead. Completing it reconnects the same account (same accountId) and re-runs ad account discovery. Discovery includes the client accounts under every manager (MCC) the Google user can reach. It also includes Google Ads test accounts, which Google always reports with status CLOSED. When discovery finds no usable customer account, the callback saves nothing and redirects with `error=google_ads_no_ad_accounts`, `platform=googleads` and an `error_message`. The message names each customer the Google user can reach and why it was left out (for example CUSTOMER_NOT_ENABLED). Sign in with a Google user that has access to the ad account or to its manager account. When the user unticks the Google Ads permission on Google's consent screen, the callback saves nothing and redirects with `error=missing_google_permissions`, `platform=googleads`, `is_user_fixable=true` and `missing_scopes`. An existing connection whose token lacks that permission is flagged needsReconnection, and the health endpoints report "Google Ads permission not granted". This endpoint then returns an authUrl for it. ### Standalone platforms (redditads) Starts the Reddit Ads OAuth flow (Reddit permissions `adsread`, `adsedit` and `adsconversions`) and creates a standalone ads SocialAccount (redditads) with no parent, separate from any organic `reddit` posting account. It is reached only as `redditads` in the path. If an active Reddit Ads connection already exists on the profile, is not flagged needsReconnection and holds every one of those permissions, returns alreadyConnected: true. Otherwise it returns an authUrl; completing it reconnects the same account (same accountId). A connection authorized without `adsconversions` keeps managing ads, but: - the health endpoints list an issue asking to reconnect Reddit Ads and allow every permission - the Conversions API answers 403 `reconnect_required` - this endpoint returns an authUrl for it Discovery lists every Reddit ad account the Reddit user can reach. The callback redirects with `platform=redditads` and: - `error=reddit_ads_scope_not_granted`: the user unticks `adsread` or `adsedit` on Reddit's consent screen (nothing is saved) - `error=reddit_ads_no_ad_accounts`: the user reaches no Reddit ad account Without `redirect_url` the browser lands on the Zernio dashboard's ad account picker for the new connection. ### Standalone platforms (microsoftads) Starts the Microsoft Advertising OAuth flow and creates a standalone ads SocialAccount (microsoftads) with no parent. It is reached only as `microsoftads` in the path. Microsoft Advertising users sign in with a Microsoft account by default. A user who signs in to ads.microsoft.com with Google passes `identityProvider=google`, and the flow runs on Google's consent screen instead. If an active Microsoft Ads connection already exists on the profile, is not flagged needsReconnection and was signed in with the same identity provider, returns alreadyConnected: true. Otherwise it returns an authUrl; completing it reconnects the same account (same accountId). Discovery lists every Microsoft Advertising ad account the user can reach. The callback redirects with `platform=microsoftads` and: - `error=microsoft_ads_scope_not_granted`: the user declines the Microsoft Advertising permission (nothing is saved) - `error=microsoft_ads_unknown_user`: the account that signed in is not a Microsoft Advertising user, for example a Google user connecting without `identityProvider=google` (nothing is saved) - `error=microsoft_ads_no_ad_accounts`: the user reaches no Microsoft Advertising ad account Without `redirect_url` the browser lands on the Zernio dashboard's ad account picker for the new connection.
Save the welcome screen
Replaces the workspace's welcome screen settings: a field left out is cleared. Only the account owner or a full-access team member can save, and not with a profile-scoped API key. Parameters sent on a connect call still win over these values for that call.