Campaigns
9 LinkedIn Ads tools, each with its inputs, hosted support and CLI command.
On this page
LinkedIn's editor ignores post edits on a live ad, so to change copy you recreate it: delete_ad plus create_image_ad.
create_campaign_group
LinkedIn AdsHostedCreate the LinkedIn campaign group and campaign (the ad group), as drafts.
Create a campaign group (the top-level 'campaign'). Defaults to DRAFT.
Runs as part of
adwarp launch --brief <brief.json># audience, campaign group, campaign, and draft adsInputs 5, 2 required
| Input | Type | What it is |
|---|---|---|
accountIdrequired | string | Numeric ad account id (no urn prefix) |
namerequired | string | |
status | DRAFT | ACTIVE | PAUSED | ARCHIVED = "DRAFT" | |
totalBudget | object | |
runSchedule | object |
create_campaign
LinkedIn AdsHostedCreate the LinkedIn campaign group and campaign (the ad group), as drafts.
Create a campaign (the 'ad group') with targeting, budget, bid or bidding strategy (optimizationTargetType MAX_CLICK = Maximum Delivery on landing page clicks), schedule, and optional ad rotation (creativeSelection: OPTIMIZED or ROUND_ROBIN = rotate ads evenly). Defaults to DRAFT.
Runs as part of
adwarp launch --brief <brief.json># audience, campaign group, campaign, and draft adsInputs 22, 4 required
| Input | Type | What it is |
|---|---|---|
accountIdrequired | string | |
campaignGroupIdrequired | string | Numeric campaign group id |
namerequired | string | |
type | SPONSORED_UPDATES | TEXT_AD | SPONSORED_INMAILS = "SPONSORED_UPDATES" | |
objectiveType | BRAND_AWARENESS | ENGAGEMENT | JOB_APPLICANT | LEAD_GENERATION | VIDEO_VIEW | WEBSITE_CONVERSION | WEBSITE_VISIT | Campaign objective. Required to be ENGAGEMENT to sponsor another member's post (thought-leader ads). |
costType | CPC | CPM | CPV = "CPM" | |
dailyBudget | object | |
totalBudget | same as dailyBudget | |
unitCost | same as dailyBudget | Bid amount |
optimizationTargetType | NONE | MAX_CLICK | MAX_IMPRESSION | MAX_CONVERSION | MAX_LEAD | MAX_VIDEO_VIEW | MAX_REACH | TARGET_COST_PER_CLICK | TARGET_COST_PER_IMPRESSION | TARGET_COST_PER_VIDEO_VIEW | ENHANCED_CONVERSION | Bidding strategy. MAX_CLICK = Maximum Delivery optimized for landing page clicks (automated bid, charged CPM, unitCost ignored). Omit or NONE for a manual bid. |
locale | object = {"country":"US","language":"en"} | |
runSchedulerequired | object | |
status | DRAFT | ACTIVE | PAUSED | ARCHIVED = "DRAFT" | |
creativeSelection | OPTIMIZED | ROUND_ROBIN | Ad rotation: OPTIMIZED (LinkedIn default, favors the predicted winner) or ROUND_ROBIN (rotate ads evenly) |
targetingCriteria | object | |
targeting | object | |
audienceSegmentUrn | string | urn:li:adSegment:... to target a matched audience |
geoUrns | string[] | urn:li:geo:... locations to include |
politicalIntent | NOT_POLITICAL | POLITICAL | NOT_DECLARED = "NOT_POLITICAL" | |
conversionIds | string[] | |
applyDefaultExclusions | boolean = true | |
applyDefaultConversion | boolean = true |
update_campaign
LinkedIn AdsHostedChange an existing campaign (the ad group) in place: targeting, name, status, budget, bid, bidding strategy, schedule, or ad rotation. Pass dryRun first to preview the patch.
Update an existing campaign (the 'ad group') in place: change its targeting and/or name, status, budget, bid, bidding strategy (optimizationTargetType, costType), schedule, ad rotation (creativeSelection: OPTIMIZED or ROUND_ROBIN = rotate ads evenly). Only the fields you pass change. Targeting is REPLACED when you pass any targeting form: a structured targeting spec, the audienceSegmentUrn (+ optional geoUrns) shorthand, or a raw targetingCriteria, and default exclusions are re-applied unless applyDefaultExclusions=false. Audience Expansion / Audience Network stay off. Pass dryRun=true first to preview the patch before touching a live campaign.
CLI
adwarp campaigns update <campaignId> ... [--apply]# change an ad group in place, previews unless --applyInputs 17, 2 required
| Input | Type | What it is |
|---|---|---|
accountIdrequired | string | |
campaignIdrequired | string | Numeric campaign (ad group) id to update |
targetingCriteria | object | |
targeting | object | |
audienceSegmentUrn | string | urn:li:adSegment:... (or bare id) matched audience to target, which replaces existing targeting |
geoUrns | string[] | urn:li:geo:... locations to include alongside the audience |
applyDefaultExclusions | boolean = true | |
name | string | |
status | DRAFT | ACTIVE | PAUSED | ARCHIVED | |
dailyBudget | object | |
totalBudget | same as dailyBudget | |
costType | CPC | CPM | CPV | Change the cost type (CPM for Maximum Delivery) |
unitCost | same as dailyBudget | Bid amount |
optimizationTargetType | NONE | MAX_CLICK | MAX_IMPRESSION | MAX_CONVERSION | MAX_LEAD | MAX_VIDEO_VIEW | MAX_REACH | TARGET_COST_PER_CLICK | TARGET_COST_PER_IMPRESSION | TARGET_COST_PER_VIDEO_VIEW | ENHANCED_CONVERSION | Bidding strategy. MAX_CLICK = Maximum Delivery optimized for landing page clicks (automated bid, charged CPM, unitCost ignored). Omit or NONE for a manual bid. |
runSchedule | object | |
creativeSelection | OPTIMIZED | ROUND_ROBIN | Ad rotation: OPTIMIZED (favors the predicted winner) or ROUND_ROBIN (rotate ads evenly) |
dryRun | boolean = false |
create_text_ad
LinkedIn AdsHostedCreate draft ads.
Create a Text Ad creative (DRAFT by default).
Runs as part of
adwarp launch --brief <brief.json># audience, campaign group, campaign, and draft adsInputs 6, 5 required
| Input | Type | What it is |
|---|---|---|
accountIdrequired | string | |
campaignIdrequired | string | |
titlerequired | string | |
textrequired | string | |
clickUrirequired | string | |
status | DRAFT | ACTIVE | PAUSED = "DRAFT" |
create_image_ad
LinkedIn AdsHostedCreate draft ads.
Create a single-image Sponsored Content creative (DRAFT). Omit imagePath to leave the campaign ready for an image later.
Runs as part of
adwarp launch --brief <brief.json># audience, campaign group, campaign, and draft adsInputs 10, 6 required
| Input | Type | What it is |
|---|---|---|
accountIdrequired | string | |
campaignIdrequired | string | |
organizationUrnrequired | string | urn:li:organization:... that owns the post |
commentaryrequired | string | The post body / ad intro text |
clickUrirequired | string | |
headlinerequired | string | |
callToAction | LEARN_MORE | APPLY | DOWNLOAD | VIEW_QUOTE | SIGN_UP | SUBSCRIBE | REGISTER | JOIN | ATTEND | REQUEST_DEMO | SEE_MORE = "LEARN_MORE" | Call-to-action button label |
imagePath | string | |
name | string | Ad name shown in Campaign Manager |
status | DRAFT | ACTIVE | PAUSED = "DRAFT" |
list_campaigns
LinkedIn AdsHostedThe account structure, campaign groups and their ad groups, with drafts included, unlike reporting, which only shows entities with spend.
List the account structure: campaign groups (campaigns) and/or their campaigns (ad groups), DRAFTS INCLUDED, unlike performance reports, which only show entities with spend. Pass level=groups for campaign groups only, level=campaigns for ad groups (optionally scoped by groupId), or level=both (default) for the full tree.
CLI
adwarp campaigns list [--group <id>] [--all]# campaign groups and ad groups, drafts includedInputs 4
| Input | Type | What it is |
|---|---|---|
accountId | string | |
level | groups | campaigns | both = "both" | |
groupId | string | Scope campaigns to one campaign group id |
includeArchived | boolean = false |
list_ads
LinkedIn AdsHostedThe ads in an ad group, drafts included.
List the creatives (ads) in a campaign (ad group), drafts included: id, name, status, and backing post urn.
CLI
adwarp ad list <campaignId># ads in an ad group (id, status, name), drafts includedInputs 2, 1 required
| Input | Type | What it is |
|---|---|---|
accountId | string | |
campaignIdrequired | string |
delete_ad
LinkedIn AdsHostedRemoves the creative and, best effort, its Direct Sponsored Content post.
Delete an ad: removes the creative and (best-effort) the Direct Sponsored Content post behind it. Accepts a numeric creative id or a full urn:li:sponsoredCreative URN. Use for cleaning up drafts or replacing an ad whose copy must change (Campaign Manager's editor does not reflect post edits, so recreate instead).
CLI
adwarp ad delete <creativeId># delete an ad (creative and its Direct Sponsored Content post)Inputs 2, 1 required
| Input | Type | What it is |
|---|---|---|
accountId | string | |
creativeIdrequired | string |
update_ad
LinkedIn AdsHostedPauses, resumes, or archives a single ad by setting its status to PAUSED, ACTIVE, or ARCHIVED, without touching the rest of its ad group. Setting ACTIVE starts spend, so the assistant sets it only when you explicitly ask. An ACTIVE ad serves only while its ad group is active, and LinkedIn refuses to pause an ad that is still in review. Pass dryRun first to preview the patch.
Change a single ad's (creative's) status in place: PAUSED stops it serving, ACTIVE starts it serving, ARCHIVED retires it. Use PAUSED to stop an ad without touching the rest of its ad group. Accepts a numeric creative id or a full urn:li:sponsoredCreative URN. Setting ACTIVE starts spend, so set it only when the user explicitly asks to turn the ad on, never as a side effect of another request. An ACTIVE ad still only serves while its campaign (ad group) is ACTIVE. LinkedIn refuses to pause an ad that is still in review. Pass dryRun=true to preview the patch without sending it.
CLI
adwarp ad pause <creativeId> [--apply]# pause a single ad, previews unless --applyadwarp ad resume <creativeId> [--apply]# set an ad ACTIVE again (starts spend), previews unless --applyadwarp ad archive <creativeId> [--apply]# archive an ad, previews unless --applyInputs 4, 2 required
| Input | Type | What it is |
|---|---|---|
accountId | string | Numeric ad account id; defaults to the configured account |
creativeIdrequired | string | Numeric creative (ad) id or a full urn:li:sponsoredCreative URN |
statusrequired | ACTIVE | PAUSED | ARCHIVED | PAUSED stops the ad serving. ACTIVE starts it serving and spending: set it only when the user explicitly asks. ARCHIVED retires it. |
dryRun | boolean = false | Return the patch without sending it |