Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview
On this page

meta_create_campaign

Create a Meta campaign from a conversation. It always arrives paused.

Ask for a new campaign on a Meta advertiser, with its objective and its budget. AdCrunch creates it paused, so it spends nothing until you activate it. When each ad set has its own budget, ask for a campaign with no budget.

Create a sales campaign called Spring Prospecting on Northwind, with a daily budget of 50 euros.

The agent calls meta_create_campaign, then get_mutation_status, and you see the id of the new paused campaign. Change what runs on Meta walks the whole campaign, from the Page to the activation.

Reference

Available on: Meta

Create a campaign on a live Meta ad account. It is always created PAUSED and cannot be created active — nothing spends until you separately activate it with meta_set_status. Set at most one campaign budget: dailyBudget or lifetimeBudget. A campaign budget turns on Advantage campaign budget (CBO), and the ad sets of the campaign share it. When each ad set carries its own budget, for example one ad set for each Line Item, omit both budgets. Then adsetBudgetSharing lets the ad sets share part of their daily budgets, and it needs a bidStrategy. A campaign holds only the bid strategy: give the amount of a bid cap, a cost cap or a ROAS goal on each ad set with meta_create_adset. Runs asynchronously: returns a workflowId immediately — call get_mutation_status with it to get the new campaign’s id. Budgets are in whole units of the ad account currency: 10.5 is 10.50, never 1050.

Input

Argument Type Required Description
adsetBudgetSharing boolean no Let the ad sets share their budgets. Only when both campaign budgets are omitted; false when omitted. Each ad set can then share up to 20 % of its daily budget with the other ad sets of the campaign. Sharing works with daily budgets only. It needs a bidStrategy, and it locks that bid strategy for the life of the campaign. Sharing cannot be turned on later.
advertiserId string yes Advertiser account ID (acc_<id>). Must belong to the active organization — find one with list_advertisers.
bidStrategy one of LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS no How Meta bids. LOWEST_COST_WITHOUT_CAP (“Highest volume” in Ads Manager) gets the most results for the budget and takes no amount. LOWEST_COST_WITH_BID_CAP (“Bid cap”) takes bidCap. COST_CAP (“Cost per result goal”) takes costCap. LOWEST_COST_WITH_MIN_ROAS (“ROAS goal”) takes roasFloor, and needs the optimization goal VALUE. Give exactly the amount that the strategy takes, and no other amount. A higher bid cap, a higher cost cap or a lower ROAS floor can make an ad set spend its full budget, never more. On a campaign, give only the strategy. It applies when the campaign carries a budget, or when adsetBudgetSharing is true, which requires it. Give the amount of a bid cap, a cost cap or a ROAS goal on each ad set, with the same bidStrategy. Omit it to let Meta apply its default strategy.
dailyBudget number, more than 0 no Campaign-level daily budget in whole units of the ad account currency (10.5 is 10.50). Setting either budget turns on Advantage campaign budget. Set at most one of this or lifetimeBudget. When each ad set carries its own budget, omit both.
lifetimeBudget number, more than 0 no Campaign-level lifetime budget in whole units of the ad account currency (10.5 is 10.50). Set at most one of this or dailyBudget. When each ad set carries its own budget, omit both.
name string, at least 1 character yes Campaign name, as it will appear in Ads Manager. Use something the user would recognize.
objective one of OUTCOME_AWARENESS, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_TRAFFIC, OUTCOME_APP_PROMOTION yes What the campaign optimizes toward. This constrains which optimization goals its ad sets may use, so pick it from what the user actually wants (e.g. OUTCOME_SALES for purchases, OUTCOME_TRAFFIC for site visits).
specialAdCategories array of (one of NONE, EMPLOYMENT, HOUSING, CREDIT, ISSUES_ELECTIONS_POLITICS, ONLINE_GAMBLING_AND_GAMING, FINANCIAL_PRODUCTS_SERVICES) no Regulated categories this campaign falls under, which Meta requires you to declare — employment, housing, credit, politics, gambling, or financial products. Declaring one restricts targeting. Omit (or pass ["NONE"]) when none applies; do not guess, ask the user. Default: [].

Output

A successful call returns this object in structuredContent.

Field Type Always present Description
workflowId string yes The id of the change. The change has not reached Meta yet. Give this id to get_mutation_status to find out how the change ended.

Failure codes

A failed call has isError set, and structuredContent.error holds one of these codes. Errors describes the shape of a failed call.

  • not_found
  • provider_not_connected
  • missing_write_access
  • forbidden
  • invalid_request
  • internal_error

Scope

The token must hold mutation:write. Auth & scopes lists each scope.

Annotations

A client reads these hints. A hint that the tool does not declare has the default value of the MCP specification.

  • Writes. The tool can change data.
  • Destructive. The tool can make a change that you cannot undo. A client can ask you to confirm before it calls the tool.
  • Not idempotent. A second call with the same arguments can change more.
  • Open world. The tool reaches a system outside AdCrunch, such as an ad platform.

Example

The arguments:

{
  "advertiserId": "acc_1485443900032333",
  "dailyBudget": 50,
  "name": "Spring Prospecting",
  "objective": "OUTCOME_SALES"
}

The result, in structuredContent:

{
  "workflowId": "3f9c2b7e-8a41-4d6e-9b05-c1e7a2d4f860"
}

Was this page helpful?