Create Ad Set Enhanced
curl --request POST \
--url 'https://api.adside.ai/meta/mcp#create_ad_set_enhanced' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "<string>",
"method": "<string>",
"params": {
"name": "<string>",
"arguments": {
"campaign_id": "<string>",
"name": "<string>",
"optimization_goal": "<string>",
"billing_event": "<string>",
"daily_budget": 123,
"lifetime_budget": 123,
"bid_amount": 123,
"start_time": "<string>",
"end_time": "<string>",
"promoted_object": {
"page_id": "<string>",
"pixel_id": "<string>",
"application_id": "<string>",
"object_store_url": "<string>"
},
"attribution_spec": [
{
"event_type": "CLICK_THROUGH",
"window_days": 1
}
],
"is_dynamic_creative": true,
"use_new_app_click": true,
"recurring_budget_semantics": true,
"targeting": {
"geo_locations": {
"countries": [
"US"
],
"location_types": [
"home",
"recent"
]
}
},
"status": "PAUSED"
}
},
"id": "1"
}
'import requests
url = "https://api.adside.ai/meta/mcp#create_ad_set_enhanced"
payload = {
"jsonrpc": "<string>",
"method": "<string>",
"params": {
"name": "<string>",
"arguments": {
"campaign_id": "<string>",
"name": "<string>",
"optimization_goal": "<string>",
"billing_event": "<string>",
"daily_budget": 123,
"lifetime_budget": 123,
"bid_amount": 123,
"start_time": "<string>",
"end_time": "<string>",
"promoted_object": {
"page_id": "<string>",
"pixel_id": "<string>",
"application_id": "<string>",
"object_store_url": "<string>"
},
"attribution_spec": [
{
"event_type": "CLICK_THROUGH",
"window_days": 1
}
],
"is_dynamic_creative": True,
"use_new_app_click": True,
"recurring_budget_semantics": True,
"targeting": { "geo_locations": {
"countries": ["US"],
"location_types": ["home", "recent"]
} },
"status": "PAUSED"
}
},
"id": "1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '<string>',
method: '<string>',
params: {
name: '<string>',
arguments: {
campaign_id: '<string>',
name: '<string>',
optimization_goal: '<string>',
billing_event: '<string>',
daily_budget: 123,
lifetime_budget: 123,
bid_amount: 123,
start_time: '<string>',
end_time: '<string>',
promoted_object: {
page_id: '<string>',
pixel_id: '<string>',
application_id: '<string>',
object_store_url: '<string>'
},
attribution_spec: [{event_type: 'CLICK_THROUGH', window_days: 1}],
is_dynamic_creative: true,
use_new_app_click: true,
recurring_budget_semantics: true,
targeting: {geo_locations: {countries: ['US'], location_types: ['home', 'recent']}},
status: 'PAUSED'
}
},
id: '1'
})
};
fetch('https://api.adside.ai/meta/mcp#create_ad_set_enhanced', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.adside.ai/meta/mcp#create_ad_set_enhanced",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '<string>',
'method' => '<string>',
'params' => [
'name' => '<string>',
'arguments' => [
'campaign_id' => '<string>',
'name' => '<string>',
'optimization_goal' => '<string>',
'billing_event' => '<string>',
'daily_budget' => 123,
'lifetime_budget' => 123,
'bid_amount' => 123,
'start_time' => '<string>',
'end_time' => '<string>',
'promoted_object' => [
'page_id' => '<string>',
'pixel_id' => '<string>',
'application_id' => '<string>',
'object_store_url' => '<string>'
],
'attribution_spec' => [
[
'event_type' => 'CLICK_THROUGH',
'window_days' => 1
]
],
'is_dynamic_creative' => true,
'use_new_app_click' => true,
'recurring_budget_semantics' => true,
'targeting' => [
'geo_locations' => [
'countries' => [
'US'
],
'location_types' => [
'home',
'recent'
]
]
],
'status' => 'PAUSED'
]
],
'id' => '1'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.adside.ai/meta/mcp#create_ad_set_enhanced"
payload := strings.NewReader("{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"campaign_id\": \"<string>\",\n \"name\": \"<string>\",\n \"optimization_goal\": \"<string>\",\n \"billing_event\": \"<string>\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"bid_amount\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"promoted_object\": {\n \"page_id\": \"<string>\",\n \"pixel_id\": \"<string>\",\n \"application_id\": \"<string>\",\n \"object_store_url\": \"<string>\"\n },\n \"attribution_spec\": [\n {\n \"event_type\": \"CLICK_THROUGH\",\n \"window_days\": 1\n }\n ],\n \"is_dynamic_creative\": true,\n \"use_new_app_click\": true,\n \"recurring_budget_semantics\": true,\n \"targeting\": {\n \"geo_locations\": {\n \"countries\": [\n \"US\"\n ],\n \"location_types\": [\n \"home\",\n \"recent\"\n ]\n }\n },\n \"status\": \"PAUSED\"\n }\n },\n \"id\": \"1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.adside.ai/meta/mcp#create_ad_set_enhanced")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"campaign_id\": \"<string>\",\n \"name\": \"<string>\",\n \"optimization_goal\": \"<string>\",\n \"billing_event\": \"<string>\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"bid_amount\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"promoted_object\": {\n \"page_id\": \"<string>\",\n \"pixel_id\": \"<string>\",\n \"application_id\": \"<string>\",\n \"object_store_url\": \"<string>\"\n },\n \"attribution_spec\": [\n {\n \"event_type\": \"CLICK_THROUGH\",\n \"window_days\": 1\n }\n ],\n \"is_dynamic_creative\": true,\n \"use_new_app_click\": true,\n \"recurring_budget_semantics\": true,\n \"targeting\": {\n \"geo_locations\": {\n \"countries\": [\n \"US\"\n ],\n \"location_types\": [\n \"home\",\n \"recent\"\n ]\n }\n },\n \"status\": \"PAUSED\"\n }\n },\n \"id\": \"1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adside.ai/meta/mcp#create_ad_set_enhanced")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"campaign_id\": \"<string>\",\n \"name\": \"<string>\",\n \"optimization_goal\": \"<string>\",\n \"billing_event\": \"<string>\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"bid_amount\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"promoted_object\": {\n \"page_id\": \"<string>\",\n \"pixel_id\": \"<string>\",\n \"application_id\": \"<string>\",\n \"object_store_url\": \"<string>\"\n },\n \"attribution_spec\": [\n {\n \"event_type\": \"CLICK_THROUGH\",\n \"window_days\": 1\n }\n ],\n \"is_dynamic_creative\": true,\n \"use_new_app_click\": true,\n \"recurring_budget_semantics\": true,\n \"targeting\": {\n \"geo_locations\": {\n \"countries\": [\n \"US\"\n ],\n \"location_types\": [\n \"home\",\n \"recent\"\n ]\n }\n },\n \"status\": \"PAUSED\"\n }\n },\n \"id\": \"1\"\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "<string>",
"id": "<string>",
"result": {
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Meta
Create Ad Set Enhanced
Create a new ad set with advanced validation and helpful error messages. Specify campaign, name, budget (daily or lifetime), optimization goal, billing event, targeting, and promoted object if required by the campaign objective. The build is validated against known Meta platform rules (objective x conversion-event compatibility, campaign-level vs ad-set budget, EU/DSA requirements) before any API call — a validation failure explains the fix. Omit the ad-set budget when the campaign holds the budget (CBO). Returns the new ad set ID and summary, or detailed error guidance if creation fails.
POST
/
meta
/
mcp#create_ad_set_enhanced
Create Ad Set Enhanced
curl --request POST \
--url 'https://api.adside.ai/meta/mcp#create_ad_set_enhanced' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "<string>",
"method": "<string>",
"params": {
"name": "<string>",
"arguments": {
"campaign_id": "<string>",
"name": "<string>",
"optimization_goal": "<string>",
"billing_event": "<string>",
"daily_budget": 123,
"lifetime_budget": 123,
"bid_amount": 123,
"start_time": "<string>",
"end_time": "<string>",
"promoted_object": {
"page_id": "<string>",
"pixel_id": "<string>",
"application_id": "<string>",
"object_store_url": "<string>"
},
"attribution_spec": [
{
"event_type": "CLICK_THROUGH",
"window_days": 1
}
],
"is_dynamic_creative": true,
"use_new_app_click": true,
"recurring_budget_semantics": true,
"targeting": {
"geo_locations": {
"countries": [
"US"
],
"location_types": [
"home",
"recent"
]
}
},
"status": "PAUSED"
}
},
"id": "1"
}
'import requests
url = "https://api.adside.ai/meta/mcp#create_ad_set_enhanced"
payload = {
"jsonrpc": "<string>",
"method": "<string>",
"params": {
"name": "<string>",
"arguments": {
"campaign_id": "<string>",
"name": "<string>",
"optimization_goal": "<string>",
"billing_event": "<string>",
"daily_budget": 123,
"lifetime_budget": 123,
"bid_amount": 123,
"start_time": "<string>",
"end_time": "<string>",
"promoted_object": {
"page_id": "<string>",
"pixel_id": "<string>",
"application_id": "<string>",
"object_store_url": "<string>"
},
"attribution_spec": [
{
"event_type": "CLICK_THROUGH",
"window_days": 1
}
],
"is_dynamic_creative": True,
"use_new_app_click": True,
"recurring_budget_semantics": True,
"targeting": { "geo_locations": {
"countries": ["US"],
"location_types": ["home", "recent"]
} },
"status": "PAUSED"
}
},
"id": "1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '<string>',
method: '<string>',
params: {
name: '<string>',
arguments: {
campaign_id: '<string>',
name: '<string>',
optimization_goal: '<string>',
billing_event: '<string>',
daily_budget: 123,
lifetime_budget: 123,
bid_amount: 123,
start_time: '<string>',
end_time: '<string>',
promoted_object: {
page_id: '<string>',
pixel_id: '<string>',
application_id: '<string>',
object_store_url: '<string>'
},
attribution_spec: [{event_type: 'CLICK_THROUGH', window_days: 1}],
is_dynamic_creative: true,
use_new_app_click: true,
recurring_budget_semantics: true,
targeting: {geo_locations: {countries: ['US'], location_types: ['home', 'recent']}},
status: 'PAUSED'
}
},
id: '1'
})
};
fetch('https://api.adside.ai/meta/mcp#create_ad_set_enhanced', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.adside.ai/meta/mcp#create_ad_set_enhanced",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '<string>',
'method' => '<string>',
'params' => [
'name' => '<string>',
'arguments' => [
'campaign_id' => '<string>',
'name' => '<string>',
'optimization_goal' => '<string>',
'billing_event' => '<string>',
'daily_budget' => 123,
'lifetime_budget' => 123,
'bid_amount' => 123,
'start_time' => '<string>',
'end_time' => '<string>',
'promoted_object' => [
'page_id' => '<string>',
'pixel_id' => '<string>',
'application_id' => '<string>',
'object_store_url' => '<string>'
],
'attribution_spec' => [
[
'event_type' => 'CLICK_THROUGH',
'window_days' => 1
]
],
'is_dynamic_creative' => true,
'use_new_app_click' => true,
'recurring_budget_semantics' => true,
'targeting' => [
'geo_locations' => [
'countries' => [
'US'
],
'location_types' => [
'home',
'recent'
]
]
],
'status' => 'PAUSED'
]
],
'id' => '1'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.adside.ai/meta/mcp#create_ad_set_enhanced"
payload := strings.NewReader("{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"campaign_id\": \"<string>\",\n \"name\": \"<string>\",\n \"optimization_goal\": \"<string>\",\n \"billing_event\": \"<string>\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"bid_amount\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"promoted_object\": {\n \"page_id\": \"<string>\",\n \"pixel_id\": \"<string>\",\n \"application_id\": \"<string>\",\n \"object_store_url\": \"<string>\"\n },\n \"attribution_spec\": [\n {\n \"event_type\": \"CLICK_THROUGH\",\n \"window_days\": 1\n }\n ],\n \"is_dynamic_creative\": true,\n \"use_new_app_click\": true,\n \"recurring_budget_semantics\": true,\n \"targeting\": {\n \"geo_locations\": {\n \"countries\": [\n \"US\"\n ],\n \"location_types\": [\n \"home\",\n \"recent\"\n ]\n }\n },\n \"status\": \"PAUSED\"\n }\n },\n \"id\": \"1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.adside.ai/meta/mcp#create_ad_set_enhanced")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"campaign_id\": \"<string>\",\n \"name\": \"<string>\",\n \"optimization_goal\": \"<string>\",\n \"billing_event\": \"<string>\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"bid_amount\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"promoted_object\": {\n \"page_id\": \"<string>\",\n \"pixel_id\": \"<string>\",\n \"application_id\": \"<string>\",\n \"object_store_url\": \"<string>\"\n },\n \"attribution_spec\": [\n {\n \"event_type\": \"CLICK_THROUGH\",\n \"window_days\": 1\n }\n ],\n \"is_dynamic_creative\": true,\n \"use_new_app_click\": true,\n \"recurring_budget_semantics\": true,\n \"targeting\": {\n \"geo_locations\": {\n \"countries\": [\n \"US\"\n ],\n \"location_types\": [\n \"home\",\n \"recent\"\n ]\n }\n },\n \"status\": \"PAUSED\"\n }\n },\n \"id\": \"1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adside.ai/meta/mcp#create_ad_set_enhanced")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"campaign_id\": \"<string>\",\n \"name\": \"<string>\",\n \"optimization_goal\": \"<string>\",\n \"billing_event\": \"<string>\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"bid_amount\": 123,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\",\n \"promoted_object\": {\n \"page_id\": \"<string>\",\n \"pixel_id\": \"<string>\",\n \"application_id\": \"<string>\",\n \"object_store_url\": \"<string>\"\n },\n \"attribution_spec\": [\n {\n \"event_type\": \"CLICK_THROUGH\",\n \"window_days\": 1\n }\n ],\n \"is_dynamic_creative\": true,\n \"use_new_app_click\": true,\n \"recurring_budget_semantics\": true,\n \"targeting\": {\n \"geo_locations\": {\n \"countries\": [\n \"US\"\n ],\n \"location_types\": [\n \"home\",\n \"recent\"\n ]\n }\n },\n \"status\": \"PAUSED\"\n }\n },\n \"id\": \"1\"\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "<string>",
"id": "<string>",
"result": {
"content": [
{
"type": "<string>",
"text": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key (sk_live_*) — SHA256 hashed, looked up in Redis. Generate via the web app's workspace settings.
Body
application/json
⌘I