Creating and Managing Campaigns
A campaign takes a segment and turns it into an actual message - content, a channel, and a schedule.
Create a campaign
POST /drive-api/v1/campaigns{
"template_id": "0fdb0218-eaae-4b3f-9ce2-694404b3399c",
"name": "This is a new campaign",
"description": "Here is the description",
"audience": "08bb7126-cbdb-4e92-b27d-2fabc72ea21a",
"channels": {
"web": {
"headline": "This is your headline",
"message": "Welcome to this campaign",
"primary_button": { "text": "Click Here!", "url": "https://thisisbud.com" },
"image_url": "https://thisisbud.com/campaign.png",
"styling": { "type": "custom", "accent_color": "#cccccc", "text_color": "#ffffff", "font": "Arial" },
"priority_order": 0
}
},
"schedule": { "type": "when_published" },
"duration": { "intervals": 30, "interval_type": "DAY" }
}audience is a segment ID - the campaign targets whoever's currently matching that segment (see Creating your first Segment). That doesn't mean every campaign needs a filtered audience: point audience at a segment with no criteria attached and it reaches your entire customer base. template_id comes from your organisation's available templates (see Campaign Templates).
Managing an existing campaign
GET /drive-api/v1/campaigns- list and search campaigns, filterable bystatus(live,paused,ended,pending) andcreated_by.GET /drive-api/v1/campaigns/{campaign_id}- retrieve a single campaign.PUT /drive-api/v1/campaigns/{campaign_id}/status- setstatustolive,paused, orended. (pendingis derived by Drive, not something you set directly.)DELETE /drive-api/v1/campaigns/{campaign_id}- deletes the campaign. This is destructive: it cascades to delete any segments the campaign itself created.
For editing what the campaign actually says and how it's personalized, see Personalizing Campaign Content. For scheduling something more targeted than "go live now," see Triggering Campaigns with BudQL.
Updated about 22 hours ago
Did this page help you?

