facebook-ads-manager
ACTIONFacebook Ads API manager with OAuth — list campaigns, get insights, ad account info, and ads with creative details. Login to any Facebook/Instagram account.
Endpoints
· 23POST/adsCreate a new ad with creative. Supports Mode 1 (existing post), Mode 2 (fresh copy), and Mode 3 (image upload)
Input Schema
{
"type": "object",
"required": [
"name",
"adSetId",
"creative"
],
"properties": {
"name": {
"type": "string",
"description": "Ad name"
},
"status": {
"type": "string",
"description": "Ad status (default PAUSED)"
},
"adSetId": {
"type": "string",
"description": "Parent ad set ID"
},
"creative": {
"type": "object",
"properties": {
"body": {
"type": "string"
},
"link": {
"type": "string"
},
"pageId": {
"type": "string"
},
"headline": {
"type": "string"
},
"imageUrl": {
"type": "string"
},
"imageHash": {
"type": "string"
},
"objectStoryId": {
"type": "string"
},
"callToActionType": {
"type": "string"
}
},
"description": "Creative spec: {objectStoryId, pageId} for Mode 1; {body, headline, link, pageId, imageHash?, callToActionType?} for Mode 2; {imageUrl, ...} for Mode 3"
}
}
}POST/draftOne-shot creation of campaign, ad set, creative, and ad in sequence
Input Schema
{
"type": "object",
"required": [
"campaign",
"adSet",
"ad"
],
"properties": {
"ad": {
"type": "object",
"description": "Ad spec: {name, creative: {...}}"
},
"adSet": {
"type": "object",
"description": "Ad set spec: {name, dailyBudget?, lifetimeBudget?, billingEvent, optimizationGoal, targeting, bidAmount?}"
},
"campaign": {
"type": "object",
"description": "Campaign spec: {name, objective, specialAdCategories?, bidStrategy?}"
}
}
}GET/ads/:idGet a single ad by ID with creative details
Input Schema
{
"type": "object",
"properties": {}
}GET/Root status page with auth info and endpoint links
GET/auth/loginInitiates Facebook OAuth login flow
GET/auth/callbackFacebook OAuth callback — exchanges code for token
GET/adaccountsGet connected Facebook ad account details
GET/campaignsList campaigns with optional status filter (ACTIVE|PAUSED|all)
GET/insightsGet campaign insights with date preset (last_7d|last_30d|last_quarter|today|yesterday|this_month|last_month|lifetime)
GET/campaigns/:id/insightsGet insights and daily breakdown for a specific campaign
GET/campaigns/:id/adsGet ads with creative details and insights for a specific campaign
POST/adaccounts/switchSwitch the active ad account by ID
GET/pages/:id/postsList recent posts from a Facebook page
Input Schema
{
"type": "object",
"properties": {}
}GET/pagesList Facebook pages managed by the authenticated user
Input Schema
{
"type": "object",
"properties": {}
}POST/adsetsCreate a new ad set on the active ad account
Input Schema
{
"type": "object",
"required": [
"name",
"campaignId",
"billingEvent",
"optimizationGoal",
"targeting"
],
"properties": {
"name": {
"type": "string",
"description": "Ad set name"
},
"status": {
"type": "string"
},
"bidAmount": {
"type": "integer",
"description": "Bid amount in cents"
},
"startTime": {
"type": "string"
},
"targeting": {
"type": "object",
"description": "Targeting specification object"
},
"campaignId": {
"type": "string",
"description": "Parent campaign ID"
},
"dailyBudget": {
"type": "integer",
"description": "Daily budget in cents"
},
"billingEvent": {
"type": "string",
"description": "Billing event: IMPRESSIONS, CLICKS, APP_INSTALLS, LINK_CLICKS, COMPLETED_VIDEO_VIEWS, NONE"
},
"lifetimeBudget": {
"type": "integer",
"description": "Lifetime budget in cents"
},
"optimizationGoal": {
"type": "string",
"description": "Optimization goal: REACH, IMPRESSIONS, LINK_CLICKS, LANDING_PAGE_VIEWS, CONVERSIONS, VALUE"
}
}
}GET/campaigns/:idGet a single campaign by ID with full details
Input Schema
{
"type": "object",
"properties": {}
}POST/campaignsCreate a new campaign on the active ad account
Input Schema
{
"type": "object",
"required": [
"name",
"objective"
],
"properties": {
"name": {
"type": "string",
"description": "Campaign name"
},
"status": {
"type": "string",
"description": "Campaign status (default PAUSED)"
},
"objective": {
"type": "string",
"description": "Campaign objective: OUTCOME_AWARENESS, OUTCOME_TRAFFIC, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_APP_PROMOTION"
},
"startTime": {
"type": "string",
"description": "Start time in ISO format"
},
"bidStrategy": {
"type": "string",
"description": "Bid strategy"
},
"dailyBudget": {
"type": "integer",
"description": "Daily budget in account currency cents"
},
"lifetimeBudget": {
"type": "integer",
"description": "Lifetime budget in account currency cents"
},
"specialAdCategories": {
"type": "string",
"description": "Special ad category"
}
}
}PUT/campaigns/:idUpdate a campaign (name, status, budget, bid strategy, special ad categories)
Input Schema
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"bidStrategy": {
"type": "string"
},
"dailyBudget": {
"type": "integer"
},
"lifetimeBudget": {
"type": "integer"
},
"specialAdCategories": {
"type": "string"
}
}
}GET/adsetsList ad sets for the active ad account, optionally filtered by campaignId
Input Schema
{
"type": "object",
"properties": {
"campaignId": {
"type": "string",
"description": "Filter by campaign ID"
}
}
}GET/adsets/:idGet a single ad set by ID with full details
Input Schema
{
"type": "object",
"properties": {}
}PUT/adsets/:idUpdate an ad set (name, status, budget, targeting, bid amount, start time)
Input Schema
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"bidAmount": {
"type": "integer"
},
"startTime": {
"type": "string"
},
"targeting": {
"type": "object"
},
"dailyBudget": {
"type": "integer"
},
"lifetimeBudget": {
"type": "integer"
}
}
}PUT/ads/:idUpdate an ad (name, status, creative). Creative changes create a new creative and update the ad.
Input Schema
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"creative": {
"type": "object",
"description": "Creative spec for updating"
}
}
}GET/adsList ads for the active ad account, optionally filtered by campaignId or adSetId
Input Schema
{
"type": "object",
"properties": {
"adSetId": {
"type": "string",
"description": "Filter by ad set ID"
},
"campaignId": {
"type": "string",
"description": "Filter by campaign ID"
}
}
}Required Secrets
· 2FACEBOOK_APP_IDFACEBOOK_APP_SECRET
✦
Similar ACTION Pieces
Shared Terminal
Full-featured web terminal with Node.js, Python, Deno, git, and build tools — running in a Podman container with Ubuntu 24.04
Coolify Logs Watcher
Polls Coolify API for application logs, stores in SQLite, exposes search endpoints for support email triage. Monitors free-copier-py, free-copier-express, and free-copier-next runtime logs. Used by the Events pipeline (Sydney) to find relevant errors when drafting support responses.