line_item_create
Add a row to a campaign plan: one thing being bought, with the envelope of an intent.
On this page
Adds a Line Item to a Campaign Plan — one thing being bought, at a granularity coarser than an ad set and deliberately not one-to-one with a campaign.
Input
| Field | Type | Required | Description |
|---|---|---|---|
campaign_plan_name |
string |
yes | The plan this line belongs to. |
channel |
enum |
yes | meta, tiktok, snapchat, google_search, google_pmax, google_display, youtube, programmatic_display, linkedin, x. |
objective |
enum |
yes | awareness, engagement, leads, sales, traffic, app_promotion. |
budget |
integer |
no | Minor units of the plan’s currency. |
start_date / end_date |
YYYY-MM-DD |
no | Omit to inherit the plan’s. |
countries |
string[] |
no | ISO 3166-1 alpha-2. |
age_min / age_max |
integer |
no | Each independently optional. |
gender |
enum |
no | all, men, women. Omit for undecided. |
advertiser_id |
acc_… |
no | The ad account this line runs through. |
persona_name |
string |
no | A persona slug, looked up on the brand the plan is for. |
Example
line_item_create({
campaign_plan_name: 'q4-acquisition',
channel: 'meta',
objective: 'sales',
budget: 4_000_000, // €40,000.00 in total, because the plan ends 31 Dec
countries: ['FR', 'BE'],
age_min: 25,
age_max: 54,
});
// → { lineItem: { id: 'lni_…', unit: 'total', executable: true, … },
// campaignPlanStatus: 'draft' }
Note
A line holds only what is constant across everything it spawns
One Line Item may create any number of provider objects, and you choose the shape. That is why there is no optimization goal here: two ad sets born of one line can legitimately want different ones.
Tip
The unit is derived, never sent
If the line has an effective end date — its own, or the plan’s — the budget is
a total for that period. With no end date it is a daily rate. Read
unit back from the response rather than assuming.
Warning
A persona explains the audience; it never supplies it
The countries, age range and gender are what execute. A persona is prose about a human, for whoever reads the plan and writes the copy — it carries no geography, so it could never produce a targetable ad set on its own.
Requires the campaign_plan:write scope.