Create a Snapchat Ads campaign from an agent
Creating a Snapchat Ads campaign takes two calls: ads.validateCampaignPlan, a dry run, then ads.createCampaignPlan, which leaves status: PAUSED on the campaign, ad squad, and ad. A signed-in workspace owner activates it in the web app; MCP refuses.
What PubNio supports in a Snapchat plan
Beyond a name, an objective, and a budget, a Snapchat plan needs:
creative.providerSettings.creativeId: a creative already built in Snapchat; the creative create is refused without it.- A budget on the ad squad, from the plan, the target, or the ad group; the ad squad create is refused without it.
The plan's schedule goes to Snapchat as start_time and end_time on the campaign and the ad squad. Without startAt, start_time is the moment of the create, and end_time is sent only with endAt.
| Plan objective | Snapchat receives |
|---|---|
| awareness, reach, traffic, engagement, unknown | AWARENESS_AND_ENGAGEMENT |
| leads | LEADS |
| sales, conversions | WEB_CONVERSIONS |
| app_promotion | APP_INSTALLS |
| video_views | VIDEO_VIEWS |
Spend controls
ads.validateCampaignPlancompiles the plan and checks account readiness, capabilities, budget, currency, and the spend policy without calling the provider.- Activating a campaign takes
confirmation: "activate_spend"from a signed-in workspace owner in the web app; an API key or an MCP session gets 403human_actor_required.
1. Validate the plan (dry run)
POST /api/v1/ads/campaigns/validate?workspaceId=3d9a1f20-7c4b-4e8a-9f61-2b5c8d7e0a14
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Festival ticket swipe-ups",
"objective": "sales",
"budget": {
"amountMinor": 2500,
"currency": "USD",
"kind": "daily"
},
"schedule": {
"startAt": "2027-03-10T15:00:00Z",
"endAt": "2027-03-14T05:00:00Z",
"timezone": "America/Chicago"
},
"targets": [
{
"accountId": "7f3c2a10-5b4e-4d6f-8a9b-0c1d2e3f4a5b"
}
],
"adGroups": [
{
"name": "Festival fans in the US",
"targeting": {
"geos": [
{
"country_code": "us"
}
]
},
"ads": [
{
"name": "Lineup drop teaser for the Austin weekend",
"creative": {
"providerSettings": {
"creativeId": "c2a8f1e0-9b3d-4e7a-8c6f-5d4b3a2e1f00"
}
}
}
]
}
]
}
A ready account gets 200 with valid: true and no issues. Snapchat's rules run only at create, so a valid plan can still be refused there.
2. Create it paused
Send the same plan with Idempotency-Key: plan-snapchat-ads-1: PubNio answers 202 queued, and ads.getOperation reports when every level exists paused. The same key with the same plan returns the same planId; with another plan it gets 400 idempotency_conflict.
Limits
- Snapchat's adapter has no local draft check, so Snapchat's own rules run only at create and validation can pass a plan Snapchat then refuses.
- The creative's
headline,body, anddestinationUrlare not sent to Snapchat: the ad carries the existing creative's ID,ad_squad_id,name,status, and atypeofSNAP_ADunlessproviderSettings.typesets another.

