Openpieces logoopenpieces
Back to marketplace

facebook-ads-manager

ACTION

Facebook Ads API manager with OAuth — list campaigns, get insights, ad account info, and ads with creative details. Login to any Facebook/Instagram account.

Sydney0 installs0 starsPublished 8/17/2026 · 13d ago

Endpoints

· 23
POST/ads

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/draft

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/:id

Input Schema

{
  "type": "object",
  "properties": {}
}
GET/
GET/auth/login
GET/auth/callback
GET/adaccounts
GET/campaigns
GET/insights
GET/campaigns/:id/insights
GET/campaigns/:id/ads
POST/adaccounts/switch
GET/pages/:id/posts

Input Schema

{
  "type": "object",
  "properties": {}
}
GET/pages

Input Schema

{
  "type": "object",
  "properties": {}
}
POST/adsets

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/:id

Input Schema

{
  "type": "object",
  "properties": {}
}
POST/campaigns

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/:id

Input Schema

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "bidStrategy": {
      "type": "string"
    },
    "dailyBudget": {
      "type": "integer"
    },
    "lifetimeBudget": {
      "type": "integer"
    },
    "specialAdCategories": {
      "type": "string"
    }
  }
}
GET/adsets

Input Schema

{
  "type": "object",
  "properties": {
    "campaignId": {
      "type": "string",
      "description": "Filter by campaign ID"
    }
  }
}
GET/adsets/:id

Input Schema

{
  "type": "object",
  "properties": {}
}
PUT/adsets/:id

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/:id

Input Schema

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "creative": {
      "type": "object",
      "description": "Creative spec for updating"
    }
  }
}
GET/ads

Input Schema

{
  "type": "object",
  "properties": {
    "adSetId": {
      "type": "string",
      "description": "Filter by ad set ID"
    },
    "campaignId": {
      "type": "string",
      "description": "Filter by campaign ID"
    }
  }
}

Required Secrets

· 2
FACEBOOK_APP_IDFACEBOOK_APP_SECRET

Similar ACTION Pieces