Properties
| Name | Type | Description |
|---|---|---|
| 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 |
| workspaceId | string | |
| connectionId | string | An ad connection in the workspace |
| adAccountId | string | Ad account id as the network addresses it: `act_…` on Meta, `urn:li:sponsoredAccount:…` on LinkedIn |
| name | string | |
| goal | string | |
| budget | object | |
| targeting | object | |
| paused | boolean | Create the ad paused; set to false to go live at once |
| pageId | string | The Page the ad runs as; only networks with `usesPages` need one |
| text | string | Required unless `sparkPostId` is set, which carries the post’s own caption |
| sparkPostId | string | A post already live on the network, from `GET /v1/ads/spark-posts`. Runs it as a Spark ad, so `text` and `mediaUrl` are ignored. Needs `capabilities.sparkAds`. |
| headline | string | |
| destinationUrl | string | |
| mediaUrl | string | A media library asset url |
| urlTags | string | Query string appended to every link in the ad, e.g. `utm_source=meta&utm_medium=paid` |
| 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 |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/fopost-com/json-schema/fopost-com-create-ad-request-schema.json",
"title": "CreateAdRequest",
"x-generated": "2026-11-22",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/fopost-com-openapi.json#/components/schemas/CreateAdRequest",
"type": "object",
"properties": {
"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"
},
"workspaceId": {
"type": "string",
"format": "uuid"
},
"connectionId": {
"type": "string",
"format": "uuid",
"description": "An ad connection in the workspace"
},
"adAccountId": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "Ad account id as the network addresses it: `act_…` on Meta, `urn:li:sponsoredAccount:…` on LinkedIn"
},
"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 the ad paused; set to false to go live at once"
},
"pageId": {
"type": "string",
"maxLength": 64,
"description": "The Page the ad runs as; only networks with `usesPages` need one"
},
"text": {
"type": "string",
"maxLength": 125,
"default": "",
"description": "Required unless `sparkPostId` is set, which carries the post’s own caption"
},
"sparkPostId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "A post already live on the network, from `GET /v1/ads/spark-posts`. Runs it as a Spark ad, so `text` and `mediaUrl` are ignored. Needs `capabilities.sparkAds`."
},
"headline": {
"type": "string",
"maxLength": 40
},
"destinationUrl": {
"type": "string",
"maxLength": 2048,
"format": "uri"
},
"mediaUrl": {
"type": "string",
"maxLength": 2048,
"description": "A media library asset url"
},
"urlTags": {
"type": "string",
"maxLength": 1000,
"pattern": "^[^\\s<>\"'`]*$",
"description": "Query string appended to every link in the ad, e.g. `utm_source=meta&utm_medium=paid`"
},
"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"
}
},
"required": [
"workspaceId",
"connectionId",
"adAccountId",
"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.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/fopost-com-create-ad-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.