FoPost · Schema

CreateAdSetRequest

CompanySocial MediaAPI PlatformAutomationMarketing

Properties

Name Type Description
workspaceId string
connectionId string An ad connection in the workspace
campaignId string Meta object id
pageId string The Page the ads in this set run as
name string
goal string
budget object
targeting object
paused boolean Create it paused; set to false to go live at once
messagingDestination string Required by the `messages` goal. `whatsapp` is refused unless the deployment has a WhatsApp business number
phoneNumber string Required by the `calls` goal, in E.164, e.g. `+14155550123`
productSetId string Required by the `sales` goal: makes this a catalog ad over that product set
conversionTagId string The `website_sales` and `website_leads` goals: the ad account’s conversion tag, from `GET /v1/ads/pixels`. May be left out when the account has exactly one
conversionEvent string Required by `website_sales` (checkout, add_to_cart, initiate_checkout, add_payment_info, add_to_wishlist, customize_product) and `website_leads` (signup, subscribe, submit_application, start_trial, le
View JSON Schema on GitHub

JSON Schema

fopost-com-create-ad-set-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fopost-com/json-schema/fopost-com-create-ad-set-request-schema.json",
  "title": "CreateAdSetRequest",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fopost-com-openapi.json#/components/schemas/CreateAdSetRequest",
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string",
      "format": "uuid"
    },
    "connectionId": {
      "type": "string",
      "format": "uuid",
      "description": "An ad connection in the workspace"
    },
    "campaignId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Meta object id"
    },
    "pageId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "The Page the ads in this set run as"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "goal": {
      "type": "string",
      "enum": [
        "engagement",
        "traffic",
        "awareness",
        "video_views",
        "messages",
        "calls",
        "whatsapp",
        "sales",
        "website_sales",
        "website_leads"
      ]
    },
    "budget": {
      "type": "object",
      "properties": {
        "minor": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 100000000,
          "description": "Amount in the ad account currency, minor units"
        },
        "type": {
          "type": "string",
          "enum": [
            "daily",
            "lifetime"
          ]
        },
        "endAt": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "minor",
        "type"
      ]
    },
    "targeting": {
      "type": "object",
      "properties": {
        "countries": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "maxItems": 50,
          "description": "ISO 3166-1 alpha-2 codes. At least one country or one location is required."
        },
        "ageMin": {
          "type": "integer",
          "minimum": 13,
          "maximum": 65
        },
        "ageMax": {
          "type": "integer",
          "minimum": 13,
          "maximum": 65
        },
        "gender": {
          "type": "string",
          "enum": [
            "all",
            "male",
            "female"
          ]
        },
        "audienceIds": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "maxItems": 20
        },
        "locations": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "type": {
                "type": "string",
                "enum": [
                  "region",
                  "city",
                  "zip",
                  "geo_market"
                ]
              }
            },
            "required": [
              "key",
              "name",
              "type"
            ]
          },
          "maxItems": 200,
          "description": "Locations below country level, from `GET /v1/ads/targeting/search`"
        },
        "interests": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "maxItems": 100
        },
        "behaviors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "maxItems": 100
        },
        "income": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "maxItems": 10
        },
        "facets": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                }
              },
              "required": [
                "id",
                "name"
              ]
            },
            "maxItems": 100
          },
          "description": "Facets the network defines for itself, keyed by the type used with `GET /v1/ads/targeting/search` — `job_title`, `company_size`, `industry` and the rest of the B2B set on LinkedIn."
        }
      },
      "required": [
        "countries",
        "ageMin",
        "ageMax",
        "gender"
      ]
    },
    "paused": {
      "type": "boolean",
      "default": true,
      "description": "Create it paused; set to false to go live at once"
    },
    "messagingDestination": {
      "type": "string",
      "enum": [
        "messenger",
        "instagram_direct",
        "whatsapp"
      ],
      "description": "Required by the `messages` goal. `whatsapp` is refused unless the deployment has a WhatsApp business number"
    },
    "phoneNumber": {
      "type": "string",
      "pattern": "^\\+[1-9]\\d{6,14}$",
      "description": "Required by the `calls` goal, in E.164, e.g. `+14155550123`"
    },
    "productSetId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Required by the `sales` goal: makes this a catalog ad over that product set"
    },
    "conversionTagId": {
      "type": "string",
      "pattern": "^\\d{1,20}$",
      "description": "The `website_sales` and `website_leads` goals: the ad account’s conversion tag, from `GET /v1/ads/pixels`. May be left out when the account has exactly one"
    },
    "conversionEvent": {
      "type": "string",
      "enum": [
        "checkout",
        "add_to_cart",
        "initiate_checkout",
        "add_payment_info",
        "add_to_wishlist",
        "customize_product",
        "signup",
        "subscribe",
        "submit_application",
        "start_trial",
        "lead",
        "schedule",
        "contact",
        "find_location"
      ],
      "description": "Required by `website_sales` (checkout, add_to_cart, initiate_checkout, add_payment_info, add_to_wishlist, customize_product) and `website_leads` (signup, subscribe, submit_application, start_trial, lead, schedule, contact, find_location): the site event the ad is judged on"
    }
  },
  "required": [
    "workspaceId",
    "connectionId",
    "campaignId",
    "pageId",
    "name",
    "goal",
    "budget",
    "targeting"
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/fopost-com-create-ad-set-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.