You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**profileUrl**|**String**| Full profile URL for the connected account on its platform. |[optional]|
16
16
|**isActive**|**Boolean**||[optional]|
17
17
|**followersCount**|**BigDecimal**| Follower count (only included if user has analytics add-on) |[optional]|
18
18
|**followersLastUpdated**|**OffsetDateTime**| Last time follower count was updated (only included if user has analytics add-on) |[optional]|
19
-
|**adsStatus**|[**AdsStatusEnum**](#AdsStatusEnum)| Ads connection status for this account. - `connected`: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - `not_connected`: Platform supports ads but requires a separate ads OAuth. Use `GET /v1/connect/{platform}/ads` to connect. - `not_available`: Platform does not support ads (e.g., YouTube, Reddit, Bluesky). |[optional]|
19
+
|**parentAccountId**|**String**| Reference to the parent posting SocialAccount. Set for ads accounts that share or derive from a posting account's OAuth token. null for standalone ads (Google Ads) and all posting accounts. |[optional]|
20
+
|**enabled**|**Boolean**| Whether the user explicitly activated this account. false means the account was created as a side effect (e.g., posting account auto-created when user connected ads first). Posting UI and scheduler ignore accounts with enabled: false. |[optional]|
21
+
|**adsStatus**|[**AdsStatusEnum**](#AdsStatusEnum)|**Deprecated.** With the new ads account model, ads accounts are separate SocialAccount documents. Check for accounts with ads platform values (metaads, linkedinads, pinterestads, tiktokads, xads, googleads) instead. Legacy behavior: - `connected`: Ads are ready to use (same-token platforms like Meta/LinkedIn, or separate ads token is present). - `not_connected`: Platform supports ads but requires a separate ads OAuth. Use `GET /v1/connect/{platform}/ads` to connect. - `not_available`: Platform does not support ads (e.g., YouTube, Reddit, Bluesky). |[optional]|
20
22
|**metadata** | **Object** | Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - `qualityRating`: Phone number quality rating from Meta (`GREEN`, `YELLOW`, `RED`, or `UNKNOWN`) - `nameStatus`: Display name review status (`APPROVED`, `PENDING_REVIEW`, `DECLINED`, or `NONE`). Messages cannot be sent until the display name is approved by Meta. - `messagingLimitTier`: Maximum unique business-initiated conversations per 24h rolling window (`TIER_250`, `TIER_1K`, `TIER_10K`, `TIER_100K`, or `TIER_UNLIMITED`). Scales automatically as quality rating improves. - `verifiedName`: Meta-verified business display name - `displayPhoneNumber`: Formatted phone number (e.g., \"+1 555-123-4567\") - `wabaId`: WhatsApp Business Account ID - `phoneNumberId`: Meta phone number ID | [optional] |
21
23
|**profilePicture**|**String**||[optional]|
22
24
|**currentFollowers**|**BigDecimal**| Current follower count |[optional]|
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.
180
+
**Deprecated.**Ads accounts are now standalone SocialAccount documents. Use `DELETE /v1/accounts/{accountId}`instead, passing the ads account's own ID. This endpoint is kept for backward compatibility. It soft-deletes the ads SocialAccount identified by `accountId` (which must be an ads account, not a posting account). The parent posting account is left untouched.
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.
255
+
**Deprecated.**Ads accounts are now standalone SocialAccount documents. Use `DELETE /v1/accounts/{accountId}`instead, passing the ads account's own ID. This endpoint is kept for backward compatibility. It soft-deletes the ads SocialAccount identified by `accountId` (which must be an ads account, not a posting account). The parent posting account is left untouched.
Unified ads connection endpoint. Handles all platforms through a single route: **Same-token platforms** (facebook, instagram, linkedin, pinterest): If a posting account already exists, returns `alreadyConnected: true` immediately (no extra OAuth needed). If not, starts the normal OAuth flow, and the resulting account supports both posting and ads. **Separate-token platforms** (tiktok, twitter): Requires an existing posting account (`accountId` param). If ads are already connected, returns `alreadyConnected: true`. Otherwise, starts the platform-specific marketing API OAuth flow. **Ads-only platforms** (googleads): If a Google Ads account exists, returns `alreadyConnected: true`. Otherwise, starts the Google Ads OAuth flow. Use the `adsStatus` field from `GET /v1/accounts` to check which accounts need ads connection.
230
+
Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Same-token platforms** (facebook, instagram, linkedin, pinterest): Creates an ads SocialAccount (`metaads`, `linkedinads`, `pinterestads`) with a copied OAuth token from the parent posting account. If the ads account already exists, returns `alreadyConnected: true`. No extra OAuth needed. **Separate-token platforms** (tiktok, twitter): Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (`tiktokads`, `xads`) with its own token. Requires an existing posting account (`accountId` param). If the ads account already exists, returns `alreadyConnected: true`. **Standalone platforms** (googleads): Starts the Google Ads OAuth flow and creates a standalone ads SocialAccount (`googleads`) with no parent. If the account already exists, returns `alreadyConnected: true`. Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., `metaads`, `tiktokads`) in `GET /v1/accounts`.
|**platform**|**String**| Platform to connect ads for. Only platforms with ads support are accepted. |[enum: facebook, instagram, linkedin, tiktok, twitter, pinterest, googleads]|
278
278
|**profileId**|**String**| Your Zernio profile ID ||
279
-
|**accountId**|**String**| Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and ads-only platforms. |[optional]|
279
+
|**accountId**|**String**| Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and standalone platforms. |[optional]|
|**headless**|**Boolean**| Enable headless mode (same-token platforms only) |[optional][default to false]|
282
282
@@ -309,7 +309,7 @@ public class Example {
309
309
310
310
Connect ads for a platform
311
311
312
-
Unified ads connection endpoint. Handles all platforms through a single route: **Same-token platforms** (facebook, instagram, linkedin, pinterest): If a posting account already exists, returns `alreadyConnected: true` immediately (no extra OAuth needed). If not, starts the normal OAuth flow, and the resulting account supports both posting and ads. **Separate-token platforms** (tiktok, twitter): Requires an existing posting account (`accountId` param). If ads are already connected, returns `alreadyConnected: true`. Otherwise, starts the platform-specific marketing API OAuth flow. **Ads-only platforms** (googleads): If a Google Ads account exists, returns `alreadyConnected: true`. Otherwise, starts the Google Ads OAuth flow. Use the `adsStatus` field from `GET /v1/accounts` to check which accounts need ads connection.
312
+
Unified ads connection endpoint. Creates a dedicated ads SocialAccount for the specified platform. **Same-token platforms** (facebook, instagram, linkedin, pinterest): Creates an ads SocialAccount (`metaads`, `linkedinads`, `pinterestads`) with a copied OAuth token from the parent posting account. If the ads account already exists, returns `alreadyConnected: true`. No extra OAuth needed. **Separate-token platforms** (tiktok, twitter): Starts the platform-specific marketing API OAuth flow and creates an ads SocialAccount (`tiktokads`, `xads`) with its own token. Requires an existing posting account (`accountId` param). If the ads account already exists, returns `alreadyConnected: true`. **Standalone platforms** (googleads): Starts the Google Ads OAuth flow and creates a standalone ads SocialAccount (`googleads`) with no parent. If the account already exists, returns `alreadyConnected: true`. Ads accounts appear as regular SocialAccount documents with ads platform values (e.g., `metaads`, `tiktokads`) in `GET /v1/accounts`.
|**platform**|**String**| Platform to connect ads for. Only platforms with ads support are accepted. |[enum: facebook, instagram, linkedin, tiktok, twitter, pinterest, googleads]|
363
363
|**profileId**|**String**| Your Zernio profile ID ||
364
-
|**accountId**|**String**| Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and ads-only platforms. |[optional]|
364
+
|**accountId**|**String**| Existing SocialAccount ID. Required for separate-token platforms (tiktok, twitter). Ignored for same-token and standalone platforms. |[optional]|
0 commit comments