API Reference
Facebook LoginGETLogin dialog
Campaigns

Update a campaign

POST/v27.0/{campaign_id}
Base URL: https://meta-ads.mimicr.dev · provider: https://graph.facebook.com

Updates a campaign or changes its status. Status rules: ARCHIVED can only go to DELETED; a DELETED object only accepts a new name. Pausing or archiving a parent makes its children inherit CAMPAIGN_PAUSED/ADSET_PAUSED/ARCHIVED/DELETED. Edits other than name on a DELETED campaign return 1487566. Requires ads_management and a role on the ad account. Disabled or closed accounts (status 2, 101) answer (#200) The ad account is disabled.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Path parameters

campaign_idstringrequired

ID of the campaign.

Example: "120200539998049712"

Body

application/x-www-form-urlencoded
namestring

Name of the campaign (emoji allowed).

Example: "Gás em casa"
objectivestring

Campaign objective. Legacy objectives (LINK_CLICKS, MESSAGES, CONVERSIONS, …) return (#100) Objective <X> is invalid.

OUTCOME_APP_PROMOTIONOUTCOME_AWARENESSOUTCOME_ENGAGEMENTOUTCOME_LEADSOUTCOME_SALESOUTCOME_TRAFFIC
statusstring

ACTIVE, PAUSED, ARCHIVED or DELETED.

ACTIVEPAUSEDARCHIVEDDELETED
special_ad_categoriesstring[]

Special ad categories; [] when none. Required on create.

CREDITEMPLOYMENTFINANCIAL_PRODUCTS_SERVICESHOUSINGISSUES_ELECTIONS_POLITICSNONEONLINE_GAMBLING_AND_GAMING
buying_typestring

AUCTION (default). RESERVED is not simulated (501).

daily_budgetinteger

Campaign daily budget in the minor unit. Setting a budget at both campaign and ad set level returns 1885621.

lifetime_budgetinteger

Campaign lifetime budget in the minor unit.

bid_strategystring

Bid strategy of a campaign with budget.

COST_CAPLOWEST_COST_WITHOUT_CAPLOWEST_COST_WITH_BID_CAPLOWEST_COST_WITH_MIN_ROAS
is_adset_budget_sharing_enabledboolean

Required (true or false) when the campaign has no campaign budget; otherwise 100/4834011.

spend_capinteger

Spend cap in the minor unit; 922337203685478 removes it.

execution_optionsstring[]

["validate_only"] runs every validation and returns {"success":true} without writing.

validate_only

Responses

200OK.
successbooleanrequired

true when the change was applied.

400Error in the Graph envelope: 100 invalid status, 100/1487566 deleted campaign, 613/4841018 one edit per object every 30 s (sandbox toggle objectEditInterval, off by default).
errorobjectrequired
Show child attributes
messagestringrequired

Description of the error.

Example: "(#100) The parameter special_ad_categories is required"
typestringrequired

OAuthException for most codes (the Marketing API uses it for validation too), GraphMethodException for unknown objects, FacebookApiException for transient errors. In Mimicr, routes outside the integration core answer MimicrNotSimulated with HTTP 501.

Example: "OAuthException"
codeintegerrequired

Error code (100 invalid parameter, 190 invalid token, 200 permission, 2635 deprecated version, 613/17/80004 rate limits, …).

Example: 100
error_subcodeinteger

Error subcode with more detail (1885272 budget too low, 463 token expired, …).

Example: 1885272
is_transientboolean

Whether retrying the same request may succeed. Present on every Marketing API error; true for codes 1 and 2.

error_user_titlestring

Title of the error, to show to people.

error_user_msgstring

Message of the error, to show to people.

error_dataobject

Extra data. blame_field_specs lists the params that caused a validation error.

Show child attributes
blame_field_specsstring[][]
fbtrace_idstringrequired

Internal support identifier of the request.

Example: "AbCdEf12345"