Metaads

Learn how to use Metaads with Composio

Overview

Enum

METAADS

Description

Meta Ads Marketing API Integration

This tool provides access to Meta’s Marketing API for managing ad campaigns, ad sets, ads, and custom audiences, as well as retrieving insights and analytics.

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to ads_read,ads_management
api_token
stringRequired

Actions

Upload an image for use in meta ad creatives using the marketing api. the image can later be referenced by its hash when creating ad creatives.

Action Parameters

ad_account_id
stringRequired
image
objectRequired
name
string

Action Response

data
object
successful
boolean
error

Create a new ad within an ad set using the meta marketing api. supports various ad formats including image, video, carousel, and collection ads.

Action Parameters

ad_set_id
stringRequired
name
stringRequired
status
stringDefaults to PAUSED
creative
objectRequired
tracking_specs
array
bid_amount
integer

Action Response

data
object
successful
boolean
error

Get insights data for a meta ads object (ad account, campaign, ad set, or ad) using the meta marketing api. supports various metrics, breakdowns, and filtering options with flexible date ranges.

Action Parameters

object_id
stringRequired
level
stringDefaults to account
fields
arrayDefaults to ['impressions', 'clicks', 'spend']
date_preset
string
time_range
object
action_attribution_windows
arrayDefaults to ['7d_click', '1d_view']
breakdowns
array
filtering
array
sort
array

Action Response

data
array
paging
successful
boolean
error

Create a new ad set within a campaign using the meta marketing api. supports detailed targeting options, budgets, and optimization goals.

Action Parameters

campaign_id
stringRequired
name
stringRequired
optimization_goal
stringRequired
billing_event
stringRequired
bid_amount
integerRequired
daily_budget
number
lifetime_budget
number
start_time
string
end_time
string
status
stringDefaults to PAUSED
targeting
objectRequired

Action Response

data
object
successful
boolean
error

Preview ad creative

Action Parameters

creative_id
stringRequired
thumbnail_width
integerDefaults to 150
thumbnail_height
integerDefaults to 120

Action Response

data
object
successful
boolean
error

Create a new custom audience using the meta marketing api. supports various types of custom audiences including customer lists, website visitors, and app users.

Action Parameters

account_id
stringRequired
name
stringRequired
subtype
stringRequired
description
string
customer_file_source
string
content_type
string
customer_file
array
rule
object
prefill
booleanDefaults to True
retention_days
integer

Action Response

data
object
successful
boolean
error

Delete ad creative

Action Parameters

creative_id
stringRequired

Action Response

data
object
successful
boolean
error

Get ad creative

Action Parameters

creative_id
stringRequired
fields
arrayDefaults to ['id', 'name', 'status', 'object_story_spec']

Action Response

data
object
successful
boolean
error

Retrieve ad sets from a meta ad account using the marketing api. returns information about the ad sets including their status, targeting, and other properties.

Action Parameters

ad_account_id
stringRequired
fields
arrayDefaults to ['name', 'id', 'status']
effective_status
array
date_preset
string
time_range_since
string
time_range_until
string
is_completed
boolean
updated_since
integer
limit
integerDefaults to 50

Action Response

data
array
paging_next
paging_previous
total_count
successful
boolean
error

Pause an advertising campaign using the meta marketing api. this stops the campaign from delivering ads but allows it to be resumed later. all child ad sets and ads will also be paused with an effective status of campaign paused.

Action Parameters

campaign_id
stringRequired

Action Response

data
object
successful
boolean
error

Create a new advertising campaign using the meta marketing api. supports various campaign objectives, budgets, and bidding strategies.

Action Parameters

account_id
stringRequired
name
stringRequired
objective
stringRequired
status
stringDefaults to PAUSED
special_ad_categories
array
bid_strategy
stringDefaults to LOWEST_COST_WITHOUT_CAP
daily_budget
number
lifetime_budget
number

Action Response

data
object
successful
boolean
error

Resume a paused advertising campaign using the meta marketing api. this sets the campaign status to active so it can deliver ads again. note that child ad sets and ads that were previously active will also resume delivery, but those that were individually paused will remain paused.

Action Parameters

campaign_id
stringRequired

Action Response

data
object
successful
boolean
error

Update an existing advertising campaign using the meta marketing api. allows modification of campaign properties like name, status, budget, and bidding strategy. only the fields that need to be updated should be included in the request.

Action Parameters

campaign_id
stringRequired
name
string
status
string
bid_strategy
string
daily_budget
number
lifetime_budget
number
special_ad_categories
array
spend_cap
number

Action Response

data
object
successful
boolean
error

Delete an advertising campaign using the meta marketing api. this marks the campaign as deleted, which prevents it from delivering ads. note that deleted campaigns are not permanently removed from meta’s systems and can still be viewed in reports.

Action Parameters

campaign_id
stringRequired

Action Response

data
object
successful
boolean
error

Create a new ad creative using the meta marketing api. ad creatives are reusable visual and interactive elements that define how your ad looks and behaves: - can be used in multiple ads - support various formats (image, video, carousel) - include text, media, and call-to-action buttons - must follow meta’s ad policies

Action Parameters

account_id
stringRequired
name
stringRequired
creative
objectRequired

Action Response

data
object
successful
boolean
error

Update ad creative

Action Parameters

creative_id
stringRequired
name
string
status
string

Action Response

data
object
successful
boolean
error