Rank campaign performance
- Call
ad_accounts_list. - Choose the accounts, dates, conversion event, and attribution window.
- Use
insights_rankfor compact highest and lowest rankings. - Read the data-through date and warnings.
Create a draft rule
Callrules_schema, resolve accounts, and build the full rule definition. Supply a target filter, tasks with conditions and actions, and a schedule with time zone. Save as a draft with dry_run: true.
Read the rule back and run its current version in dry-run mode. Review decisions before activation. See Rules.
Prepare a Launcher batch
Calllauncher_discover, choose an account, and inspect saved creatives and templates. Upload or import media if you need new files.
Approve exact creative versions, resolve the selection, inspect an existing target where required, and preview the launch. Submit with one stable request key. Poll the launch and operation records, including partial failures.
Create Meta objects directly
Callactions_capabilities to check whether live changes are enabled. Creation and duplication tools default to dry_run: true; creation starts campaigns, ad sets, and ads paused.
For media, call media_uploads_create to open the upload picker when your client supports it. media_uploads_complete uploads one to ten selected files and returns a result for each file. Check those results before using the media.
For a signed upload without the picker, provide file metadata to media_uploads_create. Upload the file bytes using the returned URL, method, and headers before the URL expires. A successful upload saves the file in the workspace library. Use media_asset_id with Launcher tools or media_id with creatives_create.
Create a campaign, then an ad set, then an ad with the required parent IDs. Review dry-run results. Use a new request ID when changing the request from validation to live execution. Inspect the action result after execution.
Reuse a successful setup
Usecampaigns_duplicate, adsets_duplicate, or ads_duplicate to copy an existing Meta setup. Copies stay in the same account: an ad-set copy stays in its campaign, and an ad copy stays in its ad set. The copies start paused.
To use a setup in a different account, prepare a new launch with that account’s assets and compatible template settings. Check its currency, Pages, pixels, audiences, and permissions before submitting.
For successful Launcher tests, choose Promote successful tests and select the source ads. See Prepare and submit a launch.
Save a confirmed fact
Resolve the scope, then callmemory_remember only after an explicit save request or focused approval. Report the returned persistence state. Use memory_recall for relevant context and memory_get for an exact record.