Campaign Tools
Tools for managing Facebook advertising campaigns.
Campaign Tools
Tools for reading, starting, and pausing Facebook advertising campaigns, plus managing budgets and campaign names.
get_campaign
Retrieve full configuration details for a single Facebook campaign by its ID, including objective, status, spending cap, and bid strategy.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
campaign_id | string | - |
Example
get_campaigns
Retrieve configuration details for up to 50 Facebook campaigns in a single request. More efficient than calling get_campaign for each individually.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
campaign_ids | number[] | - |
next_page_url | string | undefined | - |
list_campaigns
List all Facebook campaigns in an ad account with optional filtering by status, objective, or date range.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
Example
pause_campaign
Pause a currently active Facebook campaign, stopping delivery of all its ad sets and ads simultaneously. Can be reactivated without recreating the campaign structure.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
object_id | string | - |
Active Campaigns Only
Only campaigns with ACTIVE status can be paused.
Example
start_campaign
Activate a paused Facebook campaign by setting its delivery status to ACTIVE. Use this to resume delivery without changing the campaign's configuration.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
entity_id | string | - |
Paused Campaigns Only
Only campaigns with PAUSED status can be started. May fail if the campaign has billing or policy issues.
Example
set_campaign_budget
Set the budget for a Facebook campaign to a specific amount. Used for Campaign Budget Optimization (CBO) campaigns.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
entity_id | string | - |
amount | number | - |
Example
increase_campaign_budget
Increase the budget of a Facebook campaign by a specified amount or percentage.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
entity_id | string | - |
amount | number | - |
Example
decrease_campaign_budget
Decrease the budget of a Facebook campaign by a specified amount or percentage.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
entity_id | string | - |
amount | number | - |
Example
add_text_to_campaign_name
Add text to a Facebook campaign name by prepending or appending.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
entity_id | string | - |
text | string | - |
position | "prefix" | "suffix" | - |
separator | string | undefined | - |
Example
remove_text_from_campaign_name
Remove specific text from a Facebook campaign name.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
entity_id | string | - |
text | string | - |
position | "prefix" | "suffix" | "anywhere" | - |
case_sensitive | boolean | undefined | - |
Example
replace_text_in_campaign_name
Replace one substring with another in a Facebook campaign name.
Parameters
| Prop | Type | Default |
|---|---|---|
account_id | string | - |
entity_id | string | - |
text_name_from | string | - |
text_name_to | string | - |