curl -X POST "https://api.adrelay.dev/v1/campaigns" \
-H "X-API-Key: $ADRELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Sale 2026",
"goal": "CONVERSIONS",
"budget_amount": 50.00,
"budget_period": "DAILY",
"platform": "google_ads"
}'
const response = await fetch("https://api.adrelay.dev/v1/campaigns", {
method: "POST",
headers: {
"X-API-Key": process.env.ADRELAY_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Summer Sale 2026",
goal: "CONVERSIONS",
budget_amount: 50.0,
budget_period: "DAILY",
platform: "google_ads",
}),
});
const campaign = await response.json();
import requests
response = requests.post(
"https://api.adrelay.dev/v1/campaigns",
headers={
"X-API-Key": "your-api-key-here",
"Content-Type": "application/json",
},
json={
"name": "Summer Sale 2026",
"goal": "CONVERSIONS",
"budget_amount": 50.00,
"budget_period": "DAILY",
"platform": "google_ads",
},
)
campaign = response.json()
{
"id": "camp_new789",
"platform": "google_ads",
"remote_id": "555666777",
"name": "Summer Sale 2026",
"status": "PAUSED",
"goal": "CONVERSIONS",
"budget_amount": 50.00,
"budget_period": "DAILY",
"currency": "USD",
"created_at": "2026-03-21T10:00:00Z",
"updated_at": "2026-03-21T10:00:00Z"
}
{
"error": "Validation failed.",
"code": "VALIDATION_ERROR",
"timestamp": 1711036800,
"request_id": "req_def456",
"details": [
{ "field": "budget_amount", "message": "Must be greater than 0." }
]
}
{
"error": "No active connection for platform google_ads.",
"code": "FORBIDDEN",
"timestamp": 1711036800,
"request_id": "req_ghi789"
}
Campaigns
Create Campaign
Create a new ad campaign on one or more connected platforms.
POST
/
v1
/
campaigns
curl -X POST "https://api.adrelay.dev/v1/campaigns" \
-H "X-API-Key: $ADRELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Sale 2026",
"goal": "CONVERSIONS",
"budget_amount": 50.00,
"budget_period": "DAILY",
"platform": "google_ads"
}'
const response = await fetch("https://api.adrelay.dev/v1/campaigns", {
method: "POST",
headers: {
"X-API-Key": process.env.ADRELAY_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Summer Sale 2026",
goal: "CONVERSIONS",
budget_amount: 50.0,
budget_period: "DAILY",
platform: "google_ads",
}),
});
const campaign = await response.json();
import requests
response = requests.post(
"https://api.adrelay.dev/v1/campaigns",
headers={
"X-API-Key": "your-api-key-here",
"Content-Type": "application/json",
},
json={
"name": "Summer Sale 2026",
"goal": "CONVERSIONS",
"budget_amount": 50.00,
"budget_period": "DAILY",
"platform": "google_ads",
},
)
campaign = response.json()
{
"id": "camp_new789",
"platform": "google_ads",
"remote_id": "555666777",
"name": "Summer Sale 2026",
"status": "PAUSED",
"goal": "CONVERSIONS",
"budget_amount": 50.00,
"budget_period": "DAILY",
"currency": "USD",
"created_at": "2026-03-21T10:00:00Z",
"updated_at": "2026-03-21T10:00:00Z"
}
{
"error": "Validation failed.",
"code": "VALIDATION_ERROR",
"timestamp": 1711036800,
"request_id": "req_def456",
"details": [
{ "field": "budget_amount", "message": "Must be greater than 0." }
]
}
{
"error": "No active connection for platform google_ads.",
"code": "FORBIDDEN",
"timestamp": 1711036800,
"request_id": "req_ghi789"
}
curl -X POST "https://api.adrelay.dev/v1/campaigns" \
-H "X-API-Key: $ADRELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Summer Sale 2026",
"goal": "CONVERSIONS",
"budget_amount": 50.00,
"budget_period": "DAILY",
"platform": "google_ads"
}'
const response = await fetch("https://api.adrelay.dev/v1/campaigns", {
method: "POST",
headers: {
"X-API-Key": process.env.ADRELAY_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Summer Sale 2026",
goal: "CONVERSIONS",
budget_amount: 50.0,
budget_period: "DAILY",
platform: "google_ads",
}),
});
const campaign = await response.json();
import requests
response = requests.post(
"https://api.adrelay.dev/v1/campaigns",
headers={
"X-API-Key": "your-api-key-here",
"Content-Type": "application/json",
},
json={
"name": "Summer Sale 2026",
"goal": "CONVERSIONS",
"budget_amount": 50.00,
"budget_period": "DAILY",
"platform": "google_ads",
},
)
campaign = response.json()
{
"id": "camp_new789",
"platform": "google_ads",
"remote_id": "555666777",
"name": "Summer Sale 2026",
"status": "PAUSED",
"goal": "CONVERSIONS",
"budget_amount": 50.00,
"budget_period": "DAILY",
"currency": "USD",
"created_at": "2026-03-21T10:00:00Z",
"updated_at": "2026-03-21T10:00:00Z"
}
{
"error": "Validation failed.",
"code": "VALIDATION_ERROR",
"timestamp": 1711036800,
"request_id": "req_def456",
"details": [
{ "field": "budget_amount", "message": "Must be greater than 0." }
]
}
{
"error": "No active connection for platform google_ads.",
"code": "FORBIDDEN",
"timestamp": 1711036800,
"request_id": "req_ghi789"
}
PAUSED by default. Use the Update Campaign endpoint to set the status to ACTIVE when ready.
For creating campaigns across multiple platforms simultaneously, use the targets array instead of platform. See the Multi-Platform Campaigns guide for details.Authorizations
Body
application/json
- Option 1
- Option 2
Required string length:
1 - 255Available options:
DAILY, MONTHLY, TOTAL, LIFETIME Available options:
UNSPECIFIED, BRAND_AWARENESS, REACH, WEBSITE_TRAFFIC, LEADS, SALES, APP_PROMOTION Required array length:
1 - 10 elementsShow child attributes
Show child attributes
Response
Campaign created (single-platform) or multi-platform results
Show child attributes
Show child attributes