Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@ All notable changes to this project are documented here. The format follows
website secret and test, destinations, keywords, articles), with `BlogParams`, every `Blog*`
model and constant class, and `WebhookEvents.ARTICLE_PUBLISHED`. Articles are ordinary posts
now; `blogs()` (remote articles on a connected site) is unchanged.
- `ads()` drops the endpoints the API no longer serves: the account tree (`accountTree`),
campaign, ad set and network ad CRUD and duplication (`createCampaign`, `campaign`,
`updateCampaign`, `deleteCampaign`, `duplicateCampaign`, and the `AdSet` and `NetworkAd`
equivalents), creatives (`creatives`, `createCreative`, `creative`, `deleteCreative`), product
catalogs with their products, feeds, feed uploads and product sets, and the Ad Library
(`library`). Their models and params go with them (`AdAccountTree`, `AdCampaign`, `AdSet`,
`NetworkAd`, `AdCreative`, `ProductCatalog`, `CatalogProduct`, `ProductFeed`, `ProductSet`,
`AdLibraryPage`, `CreateAdCampaignParams`, `CreateAdCreativeParams`, `CatalogProductParams` and
the rest). `create`, `boost`, `bulkSetStatus`, insights, audiences and lead forms are
unchanged.
- `googleAds()` drops recommendations, the optimization score, keywords, keyword ideas and
metrics, search terms, negative keyword lists, assets and Performance Max asset groups, with
their `Google*` models and params. Bid strategies, the ad schedule, Local Services leads,
conversions and `query` are unchanged.
- `AdProvider.capabilities()` no longer carries `creatives`, `catalogs`, `adLibrary` or
`smartPlus`.

## [0.4.0] - 2026-10-18

Expand Down
18 changes: 7 additions & 11 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,13 @@ anything unwrapped.
`setStatus` and `delete` also need the `publish` scope, and a boost or ad starts paused unless
`paused` is false. Say both in the javadoc of anything new that spends.
- `googleAds` (scope `ads`) covers `/v1/ads/google/*` plus the GAQL passthrough at
`POST /v1/ads/insights/query`: recommendations, the optimization score, keywords, keyword
ideas, search terms, bid strategies, the ad schedule, negative keyword lists, assets,
Performance Max asset groups, Local Services leads and conversions. A connection on another
network answers 400, so this is the one resource that is not network-agnostic. Campaigns, ad
groups, ads, audiences, insights, labels, change history, experiments and conversion value
rules are all on `ads` and work on Google through the shared routes — do not duplicate them
here. `GoogleAdsScope` carries the connection and the customer, and renders snake_case on a
query and camelCase in a body, because the API takes it both ways. An object id is
`<customerId>~<kind>~<id>`: a Google resource name has slashes and cannot ride in a path
segment. Applying a recommendation changes what the live account serves or bids, so it needs
`publish`; dismissing one only hides it.
`POST /v1/ads/insights/query`: bid strategies, the ad schedule, Local Services leads and
conversions. A connection on another network answers 400, so this is the one resource that is
not network-agnostic. Ads, audiences and insights are on `ads` and work on Google through the
shared routes; do not duplicate them here. `GoogleAdsScope` carries the connection and the
customer, and renders snake_case on a query and camelCase in a body, because the API takes it
both ways. An object id is `<customerId>~<kind>~<id>`: a Google resource name has slashes and
cannot ride in a path segment.

## API Contract

Expand Down
50 changes: 18 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ long failed = client.posts().stream(PostListParams.create().workspaceId(workspac
| `broadcasts()` | `list`, `get`, `create`, `update`, `delete`, `send`, `cancel`, `recipients` |
| `sequences()` | `list`, `get`, `create`, `update`, `delete`, `enroll`, `unenroll`, `enrollments` |
| `knowledge()` | `list`, `create`, `createText`, `createUrl`, `createFile`, `update`, `delete`, `sync`, `search` |
| `ads()` | `list`, `external`, `boostable`, `connections`, `sources`, `authorizeMeta`, `deleteConnection`, `boost`, `create`, `refresh`, `setStatus`, `delete`, `accountTree`, `createCampaign`, `campaign`, `updateCampaign`, `deleteCampaign`, `duplicateCampaign`, `createAdSet`, `adSet`, `updateAdSet`, `deleteAdSet`, `duplicateAdSet`, `createNetworkAd`, `networkAd`, `updateNetworkAd`, `deleteNetworkAd`, `duplicateNetworkAd`, `bulkSetStatus`, `creatives`, `createCreative`, `creative`, `deleteCreative`, `estimateReach`, `insights`, `adInsights`, `audiences`, `createAudience`, `audience`, `updateAudience`, `deleteAudience`, `addAudienceUsers`, `searchTargeting`, `leadForms`, `createLeadForm`, `leadForm`, `archiveLeadForm`, `leads`, `leadsFeed`, `leadPages`, `subscribeLeadPage`, `unsubscribeLeadPage`, `goals`, `catalogs`, `createCatalog`, `catalog`, `updateCatalog`, `deleteCatalog`, `catalogProducts`, `writeCatalogProducts`, `productFeeds`, `createProductFeed`, `deleteProductFeed`, `feedUploads`, `startFeedUpload`, `productSets`, `createProductSet`, `updateProductSet`, `deleteProductSet`, `reachFrequency`, `createReachFrequency`, `reachFrequencyPrediction`, `reserveReachFrequency`, `cancelReachFrequency`, `library`, `partnershipCreators`, `requestPartnership`, `revokePartnership`, `accountActivity`, `labels`, `createLabel`, `updateLabel`, `deleteLabel`, `applyLabel`, `studies`, `createStudy`, `study`, `deleteStudy`, `iosCampaignLimits`, `highDemandPeriods`, `createHighDemandPeriod`, `deleteHighDemandPeriod`, `valueRuleSets`, `createValueRuleSet`, `deleteValueRuleSet`, `uploadConversions`, `sendPixelConversions`, `listConversionBatches`, `pixels`, `createPixel`, `pixel`, `updatePixel`, `sharePixel`, `pixelStats`, `eventMatchQuality`, `customConversions`, `createCustomConversion`, `customConversion`, `updateCustomConversion`, `deleteCustomConversion` |
| `ads()` | `list`, `external`, `boostable`, `connections`, `sources`, `authorizeMeta`, `deleteConnection`, `boost`, `create`, `refresh`, `setStatus`, `delete`, `bulkSetStatus`, `estimateReach`, `insights`, `adInsights`, `audiences`, `createAudience`, `audience`, `updateAudience`, `deleteAudience`, `addAudienceUsers`, `searchTargeting`, `leadForms`, `createLeadForm`, `leadForm`, `archiveLeadForm`, `leads`, `leadsFeed`, `leadPages`, `subscribeLeadPage`, `unsubscribeLeadPage`, `goals`, `reachFrequency`, `createReachFrequency`, `reachFrequencyPrediction`, `reserveReachFrequency`, `cancelReachFrequency`, `partnershipCreators`, `requestPartnership`, `revokePartnership`, `accountActivity`, `labels`, `createLabel`, `updateLabel`, `deleteLabel`, `applyLabel`, `studies`, `createStudy`, `study`, `deleteStudy`, `iosCampaignLimits`, `highDemandPeriods`, `createHighDemandPeriod`, `deleteHighDemandPeriod`, `valueRuleSets`, `createValueRuleSet`, `deleteValueRuleSet`, `uploadConversions`, `sendPixelConversions`, `listConversionBatches`, `pixels`, `createPixel`, `pixel`, `updatePixel`, `sharePixel`, `pixelStats`, `eventMatchQuality`, `customConversions`, `createCustomConversion`, `customConversion`, `updateCustomConversion`, `deleteCustomConversion` |
| `inbox()` | `list`, `threads`, `conversations`, `unreadCount`, `accounts`, `platforms`, `markThreadRead`, `markConversationRead`, `refresh`, `update`, `editComment`, `reply`, `hide`, `unhide`, `delete`, `like`, `unlike`, `repost`, `unrepost`, `bookmark`, `unbookmark`, `vote`, `pin`, `unpin`, `react`, `startConversation`, `setTyping`, `listApprovals`, `approveReply`, `rejectReply` |
| `ads()` | `list`, `external`, `boostable`, `connections`, `sources`, `authorizeMeta`, `deleteConnection`, `boost`, `create`, `refresh`, `setStatus`, `delete`, `accountTree`, `createCampaign`, `campaign`, `updateCampaign`, `deleteCampaign`, `duplicateCampaign`, `createAdSet`, `adSet`, `updateAdSet`, `deleteAdSet`, `duplicateAdSet`, `createNetworkAd`, `networkAd`, `updateNetworkAd`, `deleteNetworkAd`, `duplicateNetworkAd`, `bulkSetStatus`, `creatives`, `createCreative`, `creative`, `deleteCreative`, `estimateReach`, `insights`, `adInsights`, `audiences`, `createAudience`, `audience`, `updateAudience`, `deleteAudience`, `addAudienceUsers`, `searchTargeting`, `leadForms`, `createLeadForm`, `leadForm`, `archiveLeadForm`, `leads`, `leadsFeed`, `leadPages`, `subscribeLeadPage`, `unsubscribeLeadPage` |
| `ads()` | `list`, `external`, `boostable`, `connections`, `sources`, `authorizeMeta`, `deleteConnection`, `boost`, `create`, `refresh`, `setStatus`, `delete`, `bulkSetStatus`, `estimateReach`, `insights`, `adInsights`, `audiences`, `createAudience`, `audience`, `updateAudience`, `deleteAudience`, `addAudienceUsers`, `searchTargeting`, `leadForms`, `createLeadForm`, `leadForm`, `archiveLeadForm`, `leads`, `leadsFeed`, `leadPages`, `subscribeLeadPage`, `unsubscribeLeadPage` |
| `whatsapp()` | `getProfile`, `updateProfile`, `requestDisplayName`, `setUsername`, `listTemplates`, `listTemplateLibrary`, `getTemplate`, `createTemplate`, `importTemplate`, `updateTemplate`, `deleteTemplate`, `listGroups`, `createGroup`, `getGroup`, `updateGroup`, `deleteGroup`, `getGroupInviteLink`, `resetGroupInviteLink`, `removeGroupParticipants`, `listBlocked`, `blockUsers`, `unblockUsers`, `getCommerceSettings`, `updateCommerceSettings`, `linkCatalog`, `listFlows`, `getFlow`, `createFlow`, `updateFlow`, `deleteFlow`, `uploadFlowJson`, `publishFlow`, `deprecateFlow`, `listFlowResponses`, `getEncryptionKeyStatus`, `setEncryptionKey`, `getAccountEvents`, `listSandboxSessions`, `createSandboxSession` |
| `ads()` | `list`, `external`, `boostable`, `connections`, `sources`, `providers`, `authorize`, `deleteConnection`, `boost`, `create`, `refresh`, `setStatus`, `delete`, `accountTree`, `createCampaign`, `campaign`, `updateCampaign`, `deleteCampaign`, `duplicateCampaign`, `createAdSet`, `adSet`, `updateAdSet`, `deleteAdSet`, `duplicateAdSet`, `createNetworkAd`, `networkAd`, `updateNetworkAd`, `deleteNetworkAd`, `duplicateNetworkAd`, `bulkSetStatus`, `creatives`, `createCreative`, `creative`, `deleteCreative`, `estimateReach`, `insights`, `adInsights`, `audiences`, `createAudience`, `audience`, `updateAudience`, `deleteAudience`, `addAudienceUsers`, `addAudienceCompanies`, `searchTargeting`, `leadForms`, `createLeadForm`, `leadForm`, `archiveLeadForm`, `leads`, `leadsFeed`, `leadPages`, `subscribeLeadPage`, `unsubscribeLeadPage`, `bidPricing`, `supplyForecast`, `conversionRules`, `createConversionRule`, `conversionRule`, `updateConversionRule`, `deleteConversionRule`, `attachConversionRule`, `detachConversionRule`, `conversionMetrics`, `sendConversionEvents` |
| `googleAds()` | `recommendations`, `optimizationScore`, `applyRecommendations`, `dismissRecommendations`, `keywords`, `createKeyword`, `updateKeyword`, `deleteKeyword`, `keywordIdeas`, `keywordMetrics`, `searchTerms`, `bidStrategies`, `createBidStrategy`, `adSchedule`, `setAdSchedule`, `negativeKeywordLists`, `createNegativeKeywordList`, `addNegativeKeywords`, `attachNegativeKeywordList`, `assets`, `createAsset`, `attachAsset`, `deleteAsset`, `assetGroups`, `createAssetGroup`, `updateAssetGroup`, `deleteAssetGroup`, `localServicesLeads`, `conversionActions`, `createConversionAction`, `uploadConversions`, `uploadConversionAdjustments`, `query` |
| `ads()` | `list`, `external`, `boostable`, `connections`, `sources`, `providers`, `authorize`, `deleteConnection`, `boost`, `create`, `refresh`, `setStatus`, `delete`, `bulkSetStatus`, `estimateReach`, `insights`, `adInsights`, `audiences`, `createAudience`, `audience`, `updateAudience`, `deleteAudience`, `addAudienceUsers`, `addAudienceCompanies`, `searchTargeting`, `leadForms`, `createLeadForm`, `leadForm`, `archiveLeadForm`, `leads`, `leadsFeed`, `leadPages`, `subscribeLeadPage`, `unsubscribeLeadPage`, `bidPricing`, `supplyForecast`, `conversionRules`, `createConversionRule`, `conversionRule`, `updateConversionRule`, `deleteConversionRule`, `attachConversionRule`, `detachConversionRule`, `conversionMetrics`, `sendConversionEvents` |
| `googleAds()` | `bidStrategies`, `createBidStrategy`, `adSchedule`, `setAdSchedule`, `localServicesLeads`, `conversionActions`, `createConversionAction`, `uploadConversions`, `uploadConversionAdjustments`, `query` |
| `googleBusiness()` | `getLocation`, `updateLocation`, `getAttributes`, `updateAttributes`, `getMenus`, `replaceMenus`, `getServices`, `replaceServices`, `listMedia`, `addMedia`, `deleteMedia`, `listPlaceActions`, `createPlaceAction`, `updatePlaceAction`, `deletePlaceAction`, `getVerificationOptions`, `startVerification`, `completeVerification`, `getPerformance`, `getSearchKeywords`, `assign` |
| `blogs()` | `listBlogs`, `listArticles`, `getArticle`, `createArticle`, `updateArticle`, `deleteArticle`, `listProducts`, `updateProduct` |
| `validate()` | `post`, `length`, `media`, `subreddit` |
Expand Down Expand Up @@ -464,22 +464,19 @@ client.ads().setStatus(boost.id(), workspace.id(), "active");
A boost or ad starts paused unless `paused(false)` is set, so nothing is spent until it is
resumed. `boost`, `create`, `setStatus` and `delete` need the `publish` scope as well as `ads`.

The campaigns, ad sets and ads already on an ad account are read live from Meta and addressed by
their Meta ids plus the connection:
Insights and bulk status changes address the network's own campaign, ad set and ad ids plus the
connection:

```java
AdAccountTree tree = client.ads().accountTree("act_123", connectionId);

AdInsightsReport week = client.ads().insights(
connectionId, tree.campaigns().get(0).id(),
connectionId, campaignId,
AdInsightsParams.of("2026-09-01", "2026-09-07").breakdown("age").daily(true));

client.ads().bulkSetStatus(BulkAdStatusParams.of(workspace.id(), connectionId, "paused")
.campaign(tree.campaigns().get(0).id()));
.campaign(campaignId));
```

Creating, updating, deleting and duplicating campaigns, ad sets and network ads, and
`bulkSetStatus`, need the `publish` scope as well as `ads`. `leadsFeed` pages with a cursor: pass
`bulkSetStatus` needs the `publish` scope as well as `ads`. `leadsFeed` pages with a cursor: pass
`nextCursor` back through `LeadsFeedParams.cursor(...)` until it is null.

### Tracking
Expand Down Expand Up @@ -509,41 +506,30 @@ List<EventMatchQuality> quality = client.ads().eventMatchQuality(pixel.id(), wor

### Google Ads

Campaigns, ad groups, ads, audiences, insights, labels, change history, experiments and
conversion value rules are all on `ads()` and dispatch by connection, so they work on Google
Ads, audiences and insights are on `ads()` and dispatch by connection, so they work on Google
through the same calls as any other network. What only Google has is on `googleAds()`:

```java
var scope = GoogleAdsScope.of(connectionId, "1234567890");

for (var recommendation : client.googleAds().recommendations(scope, List.of("KEYWORD"))) {
System.out.println(recommendation.type() + " -> " + recommendation.impact().potentialClicks());
for (var strategy : client.googleAds().bidStrategies(scope)) {
System.out.println(strategy.name() + " -> " + strategy.campaignCount());
}

client.googleAds().applyRecommendations(
GoogleAdsScope.of(connectionId, "1234567890").workspace(workspace.id()),
List.of("customers/1234567890/recommendations/ABC~1"));

var ideas = client.googleAds().keywordIdeas(
new GoogleKeywordIdeasParams(scope).seeds(List.of("running shoes")));
var report = client.googleAds().query(scope, "SELECT campaign.id, metrics.clicks FROM campaign");
```

Also here: `optimizationScore`, `keywords`, `createKeyword`, `updateKeyword`, `deleteKeyword`,
`keywordMetrics`, `searchTerms`, `bidStrategies`, `createBidStrategy`, `adSchedule`,
`setAdSchedule`, `negativeKeywordLists`, `createNegativeKeywordList`, `addNegativeKeywords`,
`attachNegativeKeywordList`, `assets`, `createAsset`, `attachAsset`, `deleteAsset`,
`assetGroups`, `createAssetGroup`, `updateAssetGroup`, `deleteAssetGroup`,
`localServicesLeads`, `conversionActions`, `createConversionAction`, `uploadConversions`,
`uploadConversionAdjustments`, and `query` for a raw read-only GAQL SELECT.
Also here: `createBidStrategy`, `adSchedule`, `setAdSchedule`, `localServicesLeads`,
`conversionActions`, `createConversionAction`, `uploadConversions` and
`uploadConversionAdjustments`.

An object id is `<customerId>~<kind>~<id>` — a Google resource name has slashes and cannot ride
in a URL path segment, so every id carries the account it belongs to. The customer has to be an
account the connection's grant reaches; any other answers 404. Amounts are in the account's
currency, in minor units.

Applying a recommendation changes what the live account serves or bids straight away, so it
needs `publish` as well as `ads`; dismissing one only hides it. A connection on another network
answers 400 on every call here.
A call that changes what the live account serves or bids needs `publish` as well as `ads`. A
connection on another network answers 400 on every call here.

## Validation

Expand Down
31 changes: 0 additions & 31 deletions src/main/java/com/fopost/sdk/model/AdAccountTree.java

This file was deleted.

15 changes: 0 additions & 15 deletions src/main/java/com/fopost/sdk/model/AdCampaign.java

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/java/com/fopost/sdk/model/AdCreative.java

This file was deleted.

19 changes: 0 additions & 19 deletions src/main/java/com/fopost/sdk/model/AdLibraryEntry.java

This file was deleted.

6 changes: 0 additions & 6 deletions src/main/java/com/fopost/sdk/model/AdLibraryPage.java

This file was deleted.

Loading
Loading