API reference · version 1.0.0Fusio · public API
Loading the address list…
Addresses in this part
A short list of addresses. Click an address and we show it to you above.
- get/v1/meta-ads/overviewShow the Meta ads overviewReturns how your Meta campaigns did in a range of days: impressions, reach, link clicks, results and spend from Meta, and the visits, leads and clients Fusio saw from them.
- get/v1/meta-ads-campaignsList Meta ad campaignsReturns everything about your Meta campaigns at once: your settings and budget, a count, and all campaigns with their ad sets and ads.
- post/v1/meta-ads-campaignsCreate a Meta ad campaignCreates a draft campaign with one empty ad set and answers 201 with it. Nothing goes to Meta.
- post/v1/meta-ads-campaigns/bulk-deleteRemove many Meta campaigns at onceRemoves draft campaigns with their ad sets and ads. All of them must be drafts; when one is not, nothing is removed and you get 403. When AI builds the campaign right now, you get 409 with payload.error meta_generation_running.
- post/v1/meta-ads-campaigns/brief-picksLet AI pick a goal and page for MetaReads your brief and picks with AI the goal, the page of your website and what should count as a result. Nothing is saved; use the picks when you call meta-ads-campaigns.generate. The same brief gives the same picks for an hour.
- post/v1/meta-ads-campaigns/generateLet AI build a Meta campaignMakes a draft Meta campaign and lets AI build it in the background: it picks the goal and the page, plans the ad sets and their targeting, writes the ads and adds pictures. The answer is 202 with the campaign and the job; follow the job with meta-ads-operations.show. Nothing goes to Meta.
- post/v1/meta-ads-campaigns/{metaAdsCampaign}/generate/retryLet AI try a failed Meta campaign againStarts the AI building of a Meta campaign again after it failed or stopped. The answer is 202 with the campaign and the new job. When the share of the monthly budget is more than what is left, it is lowered to what is left.
- put/v1/meta-ads-campaigns/{metaAdsCampaign}Change a Meta ad campaignChanges only the fields you send and returns the campaign. Nothing goes to Meta.
- delete/v1/meta-ads-campaigns/{metaAdsCampaign}Remove a Meta ad campaignRemoves a draft campaign with its ad sets and ads. Only a draft can go; otherwise you get 403. When AI builds the campaign right now, you get 409 with payload.error meta_generation_running.
- post/v1/meta-ads-campaigns/{metaAdsCampaign}/approveApprove a Meta ad campaignApproves a draft campaign and returns it. Nothing goes to Meta yet.
- delete/v1/meta-ads-campaigns/{metaAdsCampaign}/approveTake back the approval of a Meta campaignTurns an approved campaign back into a draft and returns it, so you can change it again. Only an approved campaign can go back; otherwise you get 403.
- get/v1/meta-ads-campaigns/{metaAdsCampaign}/meta-ads/preflightCheck a Meta campaign before you upload itChecks an approved campaign before it is uploaded to Meta. Nothing is uploaded and Meta is not asked.
- post/v1/meta-ads-campaigns/{metaAdsCampaign}/meta-ads/deployUpload a campaign to MetaUploads an approved campaign to Meta and returns the deployment. The upload runs in the background: pictures and videos, the form, the campaign, its ad sets and ads. Follow it with meta-ads-deployments.show. It ends as paused, failed or reconciliation_required. For reconciliation_required, use…
- get/v1/meta-ads-deployments/{metaAdsDeployment}Show a Meta deploymentShows the deployment of a campaign in Meta: its state, the waiting changes and every ad set and ad with what Meta found. It only reads what Fusio stored and does not ask Meta. To read Meta again, use meta-ads-deployments.sync.
- post/v1/meta-ads-deployments/{metaAdsDeployment}/syncRead a Meta deployment again from MetaReads the campaign, its ad sets and ads from Meta and returns the deployment. It saves the state, Meta's check of each ad and what Meta found wrong. Nothing changes in Meta. Fusio also does this by itself every hour.
- post/v1/meta-ads-deployments/{metaAdsDeployment}/applyUpload changes to MetaUploads to Meta what you changed in the Fusio campaign since the last upload: texts, pictures, ad sets, ads, the budget and the form. It returns the deployment. Check hasUnsynchronizedChanges and canApplyChanges first.
- post/v1/meta-ads-deployments/{metaAdsDeployment}/reconcileMake Fusio match Meta again after a broken uploadUse it when status is reconciliation_required: an upload stopped and Fusio does not know what Meta saved. Fusio looks for the campaign by its Fusio label, links the campaign, ad sets and ads it finds and takes their state from Meta. It returns the deployment.
- post/v1/meta-ads-deployments/{metaAdsDeployment}/statusStart or pause a Meta campaign, ad set or adStarts or pauses one part of the campaign in Meta and returns the deployment. Fusio reads Meta first, so it works with the newest state.
- patch/v1/meta-ads-deployments/{metaAdsDeployment}/live-settingsChange the budget or end date of a running Meta campaignChanges the budget of the campaign or of its ad sets, or the end date, in Fusio and in Meta at once. It returns the deployment. Send only what changes.
- post/v1/meta-ads-campaigns/{metaAdsCampaign}/duplicateCopy a Meta ad campaignMakes a draft copy of a campaign with its ad sets and ads, and answers 201 with the copy. Nothing goes to Meta.
- post/v1/meta-ads-campaigns/{metaAdsCampaign}/ad-setsAdd an ad set to a Meta campaignAdds an ad set to a draft campaign and answers 201 with the whole campaign. Nothing goes to Meta.
- put/v1/meta-ads-ad-sets/{metaAdsAdSet}Change a Meta ad setChanges only the fields you send and returns the whole campaign. A list you send replaces the old one. Nothing goes to Meta.
- delete/v1/meta-ads-ad-sets/{metaAdsAdSet}Remove a Meta ad setRemoves the ad set with its ads and returns the whole campaign.
- post/v1/meta-ads-ad-sets/{metaAdsAdSet}/audience-estimateEstimate how many people a Meta ad set reachesAsks Meta how many people the targeting of the ad set reaches, saves the answer to the ad set and returns it.
- post/v1/meta-ads-ad-sets/{metaAdsAdSet}/targets/suggestLet AI suggest targeting for a Meta ad setLooks up targeting at Meta for your topics and lets AI pick the best ones for the ad set. Nothing is added to the ad set; add the targeting you like with meta-ads-ad-sets.update. When Meta finds nothing, the list is empty and no credits are spent.
- post/v1/meta-ads-ad-sets/{metaAdsAdSet}/ads/generateLet AI add new ads to a Meta ad setLets AI think of new ad ideas for the ad set in the background, write their texts and add pictures. The new ads differ from the ones the ad set already has. The answer is 202 with no content; the new ads show up in meta-ads-campaigns.index.
- post/v1/meta-ads-ad-sets/{metaAdsAdSet}/adsAdd an ad to a Meta ad setAdds an ad to an ad set of a draft campaign and answers 201 with the whole campaign. The files are files you uploaded to Fusio. Nothing goes to Meta.
- put/v1/meta-ads-ads/{metaAdsAd}Change a Meta adChanges only the fields you send and returns the whole campaign. Nothing goes to Meta.
- delete/v1/meta-ads-ads/{metaAdsAd}Remove a Meta adRemoves the ad and returns the whole campaign.
- post/v1/meta-ads-ads/{metaAdsAd}/texts/suggestLet AI suggest texts for a Meta adAsks AI for new texts of one kind for the ad. Nothing is saved; add the texts you like with meta-ads-ads.update.
- post/v1/meta-ads-ads/{metaAdsAd}/images/generateLet AI add pictures to a Meta adLets AI find or draw pictures for the ad in the background. The answer is 202 with no content; generationStatus of the ad in meta-ads-campaigns.index shows how it goes.
- get/v1/meta-ads-lead-formsList Meta lead formsReturns your lead forms for Meta campaigns with the objective leads and the destination instant_form, newest first.
- post/v1/meta-ads-lead-formsCreate a Meta lead formCreates a lead form and answers 201 with it. The form goes to Meta only with a campaign that uses it.
- get/v1/meta-ads-lead-forms/{metaAdsLeadForm}Show a Meta lead formReturns one lead form with its questions.
- put/v1/meta-ads-lead-forms/{metaAdsLeadForm}Change a Meta lead formChanges the lead form and returns it. Send all questions every time; they replace the old ones.
- delete/v1/meta-ads-lead-forms/{metaAdsLeadForm}Remove a Meta lead formRemoves a lead form. When a campaign still uses it, you get 422 and nothing is removed.
- get/v1/meta-ads-leads/gridList leads from Meta forms in a tableReturns the leads from your Facebook and Instagram forms page by page, ready for a table, newest first. Filter them by status (pending, ingested, rejected or failed) and sort them by createdAt (when Fusio received the lead) or leadCreatedAt (when the person filled in the form). Use filter, sort,…
- post/v1/meta-ads-leads/{metaAdsLead}/retryLoad a lead from Meta againTries again to load a lead in the status rejected or failed. Fix the cause from lastError first. Fusio reads the lead from Meta again, so this works only for 90 days after the form was filled in.
- get/v1/meta-ads-targeting/searchFind Meta targeting optionsAsks Meta for interests, behaviors, demographics, places or languages for the targeting of an ad set.
- get/v1/meta-ads-audiencesList your Meta audiencesAsks Meta for the custom and lookalike audiences of your ad account.
- get/v1/meta-ads-postsList your Facebook or Instagram postsAsks Meta for the newest posts of your Facebook page or Instagram profile, so you can make an ad from one.
- get/v1/meta-ads-operations/{metaAdsOperation}Show a Meta ads jobReturns how a background job goes. Ask again until status is completed or failed. A job of another company gives 404.