Skip to content

Campaigns

A campaign is a bundle of scheduled content that shares a theme, cadence, and platform set. Use campaigns when you want the API to spread ten posts over a week instead of managing each post individually.

GET /api/v1/campaigns

Optional filters: status, cursor, limit.

GET /api/v1/campaigns/{id}
{
"object": "campaign",
"id": "cmp_4b7f2a91c3d80e56",
"name": "Product launch week",
"status": "generating",
"platforms": ["instagram", "x", "linkedin"],
"posts_per_day": 2,
"days": 5,
"total_posts": 10,
"start_date": "2026-08-01",
"created_at": "2026-07-19T12:15:00Z"
}
POST /api/v1/campaigns
Terminal window
curl -X POST https://app.nativpost.com/api/v1/campaigns \
-H "Authorization: Bearer $NATIVPOST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Product launch week",
"platforms": ["instagram", "x", "linkedin"],
"posts_per_day": 2,
"days": 5,
"start_date": "2026-08-01",
"brief": "Announce v2 with a mix of feature posts and customer quotes."
}'

Required: name, platforms, posts_per_day (1 to 3), days, start_date.

The campaign is created in draft and immediately transitions to generating. When the async generator finishes, the campaign moves to ready and its child content items become visible under GET /content?campaign_id=cmp_....

POST /api/v1/campaigns/{id}/launch

Moves an approved or ready campaign to active and schedules its approved child posts. Response:

{
"success": true,
"campaign_id": "cmp_4b7f2a91c3d80e56",
"status": "active",
"scheduled_posts": 10,
"skipped_posts": 0
}

Common 409 responses:

  • Campaign is already active.
  • Campaign is in draft or generating (needs to finish generating first).

Fires the campaign.launched webhook.

PATCH /api/v1/campaigns/{id}

Editable fields: name, metadata, and (before launch) start_date.

DELETE /api/v1/campaigns/{id}

Deletes the campaign and every child content item in a single transaction. Fires one content.deleted per child plus a campaign.deleted for the parent.