Create a marketing message campaign
Create a marketing message campaign in this ad account. Meta creates the campaign, ad set, ad and creative together in one call.
/ad-accounts/{adAccountId}/campaignsBeta
Authorization
x-api-key x-date x-signature x-api-version Your API key (the ApiKeys document id).
In: header
Current timestamp as an IMF-fixdate string (GMT, US locale) "EEE, dd MMM yyyy HH:mm:ss z", e.g. "Sun, 06 Dec 2020 12:59:11 GMT". 30-second TTL.
In: header
HMAC-SHA256 of the x-date string keyed by your secret, lowercase hex.
In: header
API version you're coding against — currently 1. Required; a missing or unsupported value returns 400 with Missing or unsupported x-api-version header. Supported versions: 1.
In: header
Path Parameters
The Meta ad account id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Create a marketing message campaign. Send exactly one of dailyBudget / lifetimeBudget.
Response Body
application/json
application/json
application/json
application/json
application/json
Try it
live — writes real dataKept in this tab only and signed in your browser — your secret never leaves your device.
Path
Body
This sends a real POST to your live organization.
Enter your key and secret to send.
curl -X POST "https://example.com/ad-accounts/act_1234567890/campaigns" \ -H "Content-Type: application/json" \ -d '{ "name": "Summer push", "pageId": "962527466952418", "lifetimeBudget": "50000", "adName": "Summer push ad", "adsetName": "Summer push set" }'{ "campaignId": "string", "name": "string", "status": "ACTIVE", "createdTime": "string", "adId": "string", "adName": "string", "pixelId": "string", "adset": { "id": "string", "name": "string", "lifetimeBudget": "string", "dailyBudget": "string", "startTime": "string", "endTime": "string" }, "insights": { "campaign_id": "120210000000000000", "campaign_name": "Spring Sale — message campaign", "marketing_messages_spend": "0.02", "marketing_messages_delivered": "2", "marketing_messages_cost_per_delivered": "0.01", "marketing_messages_read_rate": "100", "marketing_messages_link_btn_click": "0", "marketing_messages_link_btn_click_rate": "0", "marketing_messages_cost_per_link_btn_click": "0", "date_start": "2026-05-20", "date_stop": "2026-06-18" }}{ "message": "string"}{ "message": "string"}{ "message": "string"}{ "error": [ { "message": "string", "path": [ "string" ], "type": "string", "context": {} } ]}List an ad account's pixels
The ad account's Meta (Facebook) pixels — for discovering the optional `pixelId` a campaign create can attach. Read-only by design: pixels are created and managed in Meta, not through this API.
Get a marketing message campaign
One marketing message campaign's metadata, in the **same shape as a list item** (`GET /ad-accounts/{adAccountId}/campaigns`) — so callers holding just a `campaignId` don't have to page an ad account's list. Fetched live from Meta. Returns `404` when the id doesn't resolve on Meta **or** resolves to a non-message campaign — this surface is message campaigns only, matching the list's filter.