curl --request POST \
--url 'https://api.adside.ai/meta/mcp#create_meta_campaign' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "<string>",
"method": "<string>",
"params": {
"name": "<string>",
"arguments": {
"name": "<string>",
"account_id": "<string>",
"status": "PAUSED",
"daily_budget": 123,
"lifetime_budget": 123,
"start_time": "<string>",
"stop_time": "<string>",
"special_ad_categories": [],
"bid_cap": 123,
"budget_optimization": true
}
},
"id": "1"
}
'import requests
url = "https://api.adside.ai/meta/mcp#create_meta_campaign"
payload = {
"jsonrpc": "<string>",
"method": "<string>",
"params": {
"name": "<string>",
"arguments": {
"name": "<string>",
"account_id": "<string>",
"status": "PAUSED",
"daily_budget": 123,
"lifetime_budget": 123,
"start_time": "<string>",
"stop_time": "<string>",
"special_ad_categories": [],
"bid_cap": 123,
"budget_optimization": True
}
},
"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: {
name: '<string>',
account_id: '<string>',
status: 'PAUSED',
daily_budget: 123,
lifetime_budget: 123,
start_time: '<string>',
stop_time: '<string>',
special_ad_categories: [],
bid_cap: 123,
budget_optimization: true
}
},
id: '1'
})
};
fetch('https://api.adside.ai/meta/mcp#create_meta_campaign', 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_meta_campaign",
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' => [
'name' => '<string>',
'account_id' => '<string>',
'status' => 'PAUSED',
'daily_budget' => 123,
'lifetime_budget' => 123,
'start_time' => '<string>',
'stop_time' => '<string>',
'special_ad_categories' => [
],
'bid_cap' => 123,
'budget_optimization' => true
]
],
'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_meta_campaign"
payload := strings.NewReader("{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"name\": \"<string>\",\n \"account_id\": \"<string>\",\n \"status\": \"PAUSED\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"start_time\": \"<string>\",\n \"stop_time\": \"<string>\",\n \"special_ad_categories\": [],\n \"bid_cap\": 123,\n \"budget_optimization\": true\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_meta_campaign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"name\": \"<string>\",\n \"account_id\": \"<string>\",\n \"status\": \"PAUSED\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"start_time\": \"<string>\",\n \"stop_time\": \"<string>\",\n \"special_ad_categories\": [],\n \"bid_cap\": 123,\n \"budget_optimization\": true\n }\n },\n \"id\": \"1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adside.ai/meta/mcp#create_meta_campaign")
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 \"name\": \"<string>\",\n \"account_id\": \"<string>\",\n \"status\": \"PAUSED\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"start_time\": \"<string>\",\n \"stop_time\": \"<string>\",\n \"special_ad_categories\": [],\n \"bid_cap\": 123,\n \"budget_optimization\": true\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>"
}Create Meta Campaign
Create a new Meta ad campaign. Specify the objective, name, and either a daily or lifetime budget (not both). Optionally set start/stop times, special ad categories, and bid strategy. The campaign will be created in PAUSED status unless otherwise specified. Returns the new campaign ID and summary. Objective choice is binding — it cannot be changed after creation, and each objective only supports certain conversion events at the ad-set level: booked-call and lead funnels (pixel events SCHEDULE, LEAD, or lead forms) need OUTCOME_LEADS; OUTCOME_SALES only optimizes purchase-type events (PURCHASE, INITIATED_CHECKOUT, ADD_TO_CART, …) and rejects SCHEDULE/LEAD (Meta subcode 2446814). Bid strategy: when a campaign-level budget is set (CBO) and bid_strategy is omitted, Meta defaults to LOWEST_COST_WITH_BID_CAP, which then requires bid_amount on every ad set — pass bid_strategy LOWEST_COST_WITHOUT_CAP for auto-bidding (the Ads Manager default) unless you intend to manage bid caps.
curl --request POST \
--url 'https://api.adside.ai/meta/mcp#create_meta_campaign' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "<string>",
"method": "<string>",
"params": {
"name": "<string>",
"arguments": {
"name": "<string>",
"account_id": "<string>",
"status": "PAUSED",
"daily_budget": 123,
"lifetime_budget": 123,
"start_time": "<string>",
"stop_time": "<string>",
"special_ad_categories": [],
"bid_cap": 123,
"budget_optimization": true
}
},
"id": "1"
}
'import requests
url = "https://api.adside.ai/meta/mcp#create_meta_campaign"
payload = {
"jsonrpc": "<string>",
"method": "<string>",
"params": {
"name": "<string>",
"arguments": {
"name": "<string>",
"account_id": "<string>",
"status": "PAUSED",
"daily_budget": 123,
"lifetime_budget": 123,
"start_time": "<string>",
"stop_time": "<string>",
"special_ad_categories": [],
"bid_cap": 123,
"budget_optimization": True
}
},
"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: {
name: '<string>',
account_id: '<string>',
status: 'PAUSED',
daily_budget: 123,
lifetime_budget: 123,
start_time: '<string>',
stop_time: '<string>',
special_ad_categories: [],
bid_cap: 123,
budget_optimization: true
}
},
id: '1'
})
};
fetch('https://api.adside.ai/meta/mcp#create_meta_campaign', 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_meta_campaign",
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' => [
'name' => '<string>',
'account_id' => '<string>',
'status' => 'PAUSED',
'daily_budget' => 123,
'lifetime_budget' => 123,
'start_time' => '<string>',
'stop_time' => '<string>',
'special_ad_categories' => [
],
'bid_cap' => 123,
'budget_optimization' => true
]
],
'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_meta_campaign"
payload := strings.NewReader("{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"name\": \"<string>\",\n \"account_id\": \"<string>\",\n \"status\": \"PAUSED\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"start_time\": \"<string>\",\n \"stop_time\": \"<string>\",\n \"special_ad_categories\": [],\n \"bid_cap\": 123,\n \"budget_optimization\": true\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_meta_campaign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"<string>\",\n \"method\": \"<string>\",\n \"params\": {\n \"name\": \"<string>\",\n \"arguments\": {\n \"name\": \"<string>\",\n \"account_id\": \"<string>\",\n \"status\": \"PAUSED\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"start_time\": \"<string>\",\n \"stop_time\": \"<string>\",\n \"special_ad_categories\": [],\n \"bid_cap\": 123,\n \"budget_optimization\": true\n }\n },\n \"id\": \"1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.adside.ai/meta/mcp#create_meta_campaign")
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 \"name\": \"<string>\",\n \"account_id\": \"<string>\",\n \"status\": \"PAUSED\",\n \"daily_budget\": 123,\n \"lifetime_budget\": 123,\n \"start_time\": \"<string>\",\n \"stop_time\": \"<string>\",\n \"special_ad_categories\": [],\n \"bid_cap\": 123,\n \"budget_optimization\": true\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.