@zernio/node 0.2.134 → 0.2.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +66 -24
- package/dist/index.d.ts +66 -24
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +1 -1
- package/src/generated/types.gen.ts +66 -24
package/dist/index.d.mts
CHANGED
|
@@ -14082,7 +14082,7 @@ type CreateStandaloneAdData = {
|
|
|
14082
14082
|
adAccountId: string;
|
|
14083
14083
|
name: string;
|
|
14084
14084
|
/**
|
|
14085
|
-
* Required on legacy + multi-creative shapes. Inherited from the ad set on the attach shape. Available goals vary by platform. Meta-specific: `conversions` requires `promotedObject.pixelId` + `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` + `promotedObject.objectStoreUrl`; `lead_generation` accepts an optional `promotedObject.pageId` (auto-filled from the connected Page when omitted).
|
|
14085
|
+
* Required on legacy + multi-creative shapes. Inherited from the ad set on the attach shape. Available goals vary by platform. Meta-specific: `conversions` requires `promotedObject.pixelId` + `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` + `promotedObject.objectStoreUrl`; `lead_generation` accepts an optional `promotedObject.pageId` (auto-filled from the connected Page when omitted). TikTok-specific: `conversions` (website-conversion ad group) requires `promotedObject.pixelId` (your TikTok Pixel ID) and accepts an optional `promotedObject.customEventType` (a TikTok `optimization_event` code like `ON_WEB_ORDER`, `INITIATE_ORDER`, `ON_WEB_REGISTER`, `FORM`); to inherit a pixel + event from an existing ad group, pass `adSetId` instead. LinkedIn-specific: `engagement`, `traffic`, `awareness`, and `video_views` are supported for standalone ads (creates a Direct Sponsored Content single image or single video ad). `traffic` requires `linkUrl`; `video_views` requires the `video` field. For `lead_generation` / `conversions` on LinkedIn — or to promote an existing post — use `POST /v1/ads/boost`.
|
|
14086
14086
|
*/
|
|
14087
14087
|
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'conversions' | 'app_promotion';
|
|
14088
14088
|
/**
|
|
@@ -14095,27 +14095,27 @@ type CreateStandaloneAdData = {
|
|
|
14095
14095
|
budgetType?: 'daily' | 'lifetime';
|
|
14096
14096
|
currency?: string;
|
|
14097
14097
|
/**
|
|
14098
|
-
* Required for Meta, Google, and
|
|
14098
|
+
* Required for Meta, Google, Pinterest, and LinkedIn on legacy + attach shapes (skip for multi-creative — use `creatives[].headline`). Ignored for TikTok and X/Twitter. Max: Meta=255, Google=30, Pinterest=100, LinkedIn=400. On LinkedIn this is the ad's headline (the bold text on the creative); for traffic ads it's the link card title.
|
|
14099
14099
|
*/
|
|
14100
14100
|
headline?: string;
|
|
14101
14101
|
/**
|
|
14102
|
-
* Google Display only
|
|
14102
|
+
* Google Display only — defaults to `headline` if omitted. On LinkedIn, reused as the optional secondary description text on traffic (link) ads; omitted if not provided.
|
|
14103
14103
|
*/
|
|
14104
14104
|
longHeadline?: string;
|
|
14105
14105
|
/**
|
|
14106
|
-
* Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). Max: Google=90, Pinterest=500.
|
|
14106
|
+
* Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). On LinkedIn this is the post commentary (the intro text shown above the ad). Max: Google=90, Pinterest=500.
|
|
14107
14107
|
*/
|
|
14108
14108
|
body?: string;
|
|
14109
14109
|
/**
|
|
14110
|
-
* Required on legacy + attach shapes for Meta. Honoured on TikTok
|
|
14110
|
+
* Required on legacy + attach shapes for Meta. Honoured on TikTok (passes through to the Spark Ad creative's `call_to_action`) and on LinkedIn (the CTA button on the ad; defaults to LEARN_MORE when `linkUrl` is set). LinkedIn accepts: LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. Ignored by Google, Pinterest, and X/Twitter.
|
|
14111
14111
|
*/
|
|
14112
|
-
callToAction?: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE';
|
|
14112
|
+
callToAction?: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE' | 'REGISTER' | 'JOIN' | 'ATTEND' | 'REQUEST_DEMO' | 'VIEW_QUOTE' | 'APPLY' | 'SEE_MORE' | 'BUY_NOW';
|
|
14113
14113
|
/**
|
|
14114
|
-
* Required on legacy + attach shapes
|
|
14114
|
+
* Required on legacy + attach shapes (skip for multi-creative). On LinkedIn it's the ad's destination URL; required for `traffic` ads, optional for `engagement` / `awareness`.
|
|
14115
14115
|
*/
|
|
14116
14116
|
linkUrl?: string;
|
|
14117
14117
|
/**
|
|
14118
|
-
* Image creative for Meta/Google/Pinterest on legacy + attach shapes (mutually exclusive with `video`). Not required for Google Search campaigns. For TikTok, this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the field retains the `imageUrl` name for cross-platform consistency). Ignored for X/Twitter. For Google Display, treated as the landscape image (alias of `images.landscape`); supply `images.square` alongside or the request is rejected.
|
|
14118
|
+
* Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes (mutually exclusive with `video`). Required for LinkedIn ads unless `video` is set. Not required for Google Search campaigns. For TikTok, this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the field retains the `imageUrl` name for cross-platform consistency). Ignored for X/Twitter. For Google Display, treated as the landscape image (alias of `images.landscape`); supply `images.square` alongside or the request is rejected. For LinkedIn the image is uploaded to LinkedIn under the authoring Company Page (see `organizationId`); recommended ratio 1.91:1 (e.g. 1200×627).
|
|
14119
14119
|
*/
|
|
14120
14120
|
imageUrl?: string;
|
|
14121
14121
|
/**
|
|
@@ -14132,17 +14132,17 @@ type CreateStandaloneAdData = {
|
|
|
14132
14132
|
square?: string;
|
|
14133
14133
|
};
|
|
14134
14134
|
/**
|
|
14135
|
-
* Meta
|
|
14135
|
+
* Meta (facebook, instagram) and LinkedIn. When set, creates a VIDEO ad on the legacy (or, for Meta, attach) shape. Mutually exclusive with `imageUrl`. For Meta multi-creative, set `video` per entry inside `creatives[]` instead. For LinkedIn the video is uploaded to LinkedIn under the authoring Company Page (see `organizationId`) and the campaign format is set to SINGLE_VIDEO; LinkedIn ignores `thumbnailUrl` (it auto-generates the poster frame) — supply MP4 H.264/AAC, 3s-30min, 75KB-500MB.
|
|
14136
14136
|
*/
|
|
14137
14137
|
video?: {
|
|
14138
14138
|
/**
|
|
14139
|
-
* Public URL of the video.
|
|
14139
|
+
* Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta's transcoding until status.video_status === 'ready'. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s.
|
|
14140
14140
|
*/
|
|
14141
14141
|
url: string;
|
|
14142
14142
|
/**
|
|
14143
|
-
* Public URL of a still-image thumbnail for the video. Required by Meta on every video creative
|
|
14143
|
+
* Public URL of a still-image thumbnail for the video. Required by Meta on every video creative (uploaded as an ad image and referenced in object_story_spec.video_data). Ignored by LinkedIn (auto-generated poster frame).
|
|
14144
14144
|
*/
|
|
14145
|
-
thumbnailUrl
|
|
14145
|
+
thumbnailUrl?: string;
|
|
14146
14146
|
};
|
|
14147
14147
|
/**
|
|
14148
14148
|
* Meta-only. When present, switches to the multi-creative shape:
|
|
@@ -14192,7 +14192,11 @@ type CreateStandaloneAdData = {
|
|
|
14192
14192
|
*/
|
|
14193
14193
|
boardId?: string;
|
|
14194
14194
|
/**
|
|
14195
|
-
*
|
|
14195
|
+
* LinkedIn only. The Company Page that authors the Direct Sponsored Content ("dark") post backing the ad — accepts a numeric organization ID or a full `urn:li:organization:N` URN. Required unless the resolved `accountId` is a connected LinkedIn Company-Page account (defaults to that page) or the LinkedIn ad account is org-owned (defaults to the account's owning organization). The authenticated member must be an ADMINISTRATOR or DIRECT_SPONSORED_CONTENT_POSTER of this page (and the page must be associated with the ad account), or LinkedIn returns 403. Ignored by every other platform.
|
|
14196
|
+
*/
|
|
14197
|
+
organizationId?: string;
|
|
14198
|
+
/**
|
|
14199
|
+
* ISO 3166-1 alpha-2 country codes (e.g. ['NL']). Defaults to ['US'] when no `cities` or `regions` are provided. (LinkedIn currently honours country-level targeting only.)
|
|
14196
14200
|
*/
|
|
14197
14201
|
countries?: Array<(string)>;
|
|
14198
14202
|
/**
|
|
@@ -14262,6 +14266,22 @@ type CreateStandaloneAdData = {
|
|
|
14262
14266
|
* Meta only. Controls the Advantage audience feature (targeting_automation). 0 = disabled (default), 1 = enabled. Meta Marketing API requires this field on all ad set creation requests.
|
|
14263
14267
|
*/
|
|
14264
14268
|
advantageAudience?: 0 | 1;
|
|
14269
|
+
/**
|
|
14270
|
+
* Meta only. Conversion attribution window for the ad set — maps 1:1 to Meta's
|
|
14271
|
+
* ad-set `attribution_spec`. Only honored for conversion goals (`conversions`,
|
|
14272
|
+
* `lead_generation`, `app_promotion`); ignored for awareness/traffic/engagement.
|
|
14273
|
+
* Omit to use Meta's default (`7-day click` + `1-day view`). Meta enforces the
|
|
14274
|
+
* valid combinations: `VIEW_THROUGH` only allows `windowDays: 1` (7d/28d view
|
|
14275
|
+
* windows were removed Jan 2026); `ENGAGED_VIDEO_VIEW` only `1` and only alongside
|
|
14276
|
+
* `VIEW_THROUGH: 1`; `CLICK_THROUGH: 28` only on certain objectives. Invalid combos
|
|
14277
|
+
* surface as a Meta 400.
|
|
14278
|
+
* Example: `[{ "eventType": "CLICK_THROUGH", "windowDays": 7 }, { "eventType": "VIEW_THROUGH", "windowDays": 1 }]`
|
|
14279
|
+
*
|
|
14280
|
+
*/
|
|
14281
|
+
attributionSpec?: Array<{
|
|
14282
|
+
eventType: 'CLICK_THROUGH' | 'VIEW_THROUGH' | 'ENGAGED_VIDEO_VIEW';
|
|
14283
|
+
windowDays: 1 | 7 | 28;
|
|
14284
|
+
}>;
|
|
14265
14285
|
/**
|
|
14266
14286
|
* Meta only. Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Ignored by non-Meta platforms.
|
|
14267
14287
|
*/
|
|
@@ -14340,27 +14360,49 @@ type CreateStandaloneAdData = {
|
|
|
14340
14360
|
*/
|
|
14341
14361
|
identityType?: 'TT_USER' | 'CUSTOMIZED_USER';
|
|
14342
14362
|
/**
|
|
14343
|
-
*
|
|
14363
|
+
* What the ad optimises against. Behaviour depends on the platform.
|
|
14344
14364
|
*
|
|
14365
|
+
* **Meta**: forwarded to the ad set's `promoted_object` (snake-cased).
|
|
14345
14366
|
* Required for goals whose ad-set optimization_goal points at a specific
|
|
14346
|
-
* event/page/app
|
|
14347
|
-
* `error_subcode: 1815430` "Please select a promoted object for your ad set":
|
|
14348
|
-
* - `goal: conversions` (OFFSITE_CONVERSIONS)
|
|
14349
|
-
* - `goal: app_promotion` (APP_INSTALLS)
|
|
14350
|
-
* - `goal: lead_generation` (LEAD_GENERATION)
|
|
14367
|
+
* event/page/app (without it Meta rejects the ad-set create with
|
|
14368
|
+
* `error_subcode: 1815430` "Please select a promoted object for your ad set"):
|
|
14369
|
+
* - `goal: conversions` (OFFSITE_CONVERSIONS): requires `pixelId` + `customEventType`
|
|
14370
|
+
* - `goal: app_promotion` (APP_INSTALLS): requires `applicationId` + `objectStoreUrl`
|
|
14371
|
+
* - `goal: lead_generation` (LEAD_GENERATION): `pageId` is auto-filled from the connected Page when omitted
|
|
14372
|
+
*
|
|
14373
|
+
* Other Meta goals (engagement, traffic, awareness, video_views) ignore this field.
|
|
14374
|
+
*
|
|
14375
|
+
* **TikTok**: only `goal: conversions` uses it.
|
|
14376
|
+
* - `pixelId` maps to the ad group's `pixel_id`. Required: a TikTok website-conversion
|
|
14377
|
+
* ad group without a pixel is rejected with `40002: Please select a pixel`.
|
|
14378
|
+
* - `customEventType` maps to the ad group's `optimization_event` (the pixel event to
|
|
14379
|
+
* optimise for). Optional: TikTok accepts a pixel-only auto-bid conversion ad group.
|
|
14380
|
+
* See the `customEventType` field below for the valid TikTok codes.
|
|
14351
14381
|
*
|
|
14352
|
-
*
|
|
14382
|
+
* The remaining `promotedObject.*` fields are Meta-only. Platforms other than
|
|
14383
|
+
* Meta and TikTok ignore `promotedObject` entirely.
|
|
14353
14384
|
*
|
|
14354
14385
|
*/
|
|
14355
14386
|
promotedObject?: {
|
|
14356
14387
|
/**
|
|
14357
|
-
* Facebook Pixel ID
|
|
14388
|
+
* Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`.
|
|
14389
|
+
* **TikTok:** TikTok Pixel ID, required for `goal: conversions`.
|
|
14390
|
+
*
|
|
14358
14391
|
*/
|
|
14359
14392
|
pixelId?: string;
|
|
14360
14393
|
/**
|
|
14361
|
-
*
|
|
14362
|
-
*
|
|
14363
|
-
*
|
|
14394
|
+
* The event the campaign/ad group optimises against.
|
|
14395
|
+
*
|
|
14396
|
+
* **Meta:** standard event like `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION`,
|
|
14397
|
+
* `ADD_TO_CART`. Uppercased internally so callers can pass any case. Required
|
|
14398
|
+
* for `goal: conversions`.
|
|
14399
|
+
*
|
|
14400
|
+
* **TikTok:** an `optimization_event` code (UPPER_SNAKE, not Meta's vocabulary
|
|
14401
|
+
* and not PascalCase), e.g. `ON_WEB_ORDER` (Complete Payment), `INITIATE_ORDER`
|
|
14402
|
+
* (Place an Order), `ON_WEB_CART` (Add to Cart), `ON_WEB_REGISTER` (Complete
|
|
14403
|
+
* Registration), `FORM` (Submit Form), `ON_WEB_DETAIL` (View Content). Must be
|
|
14404
|
+
* one of the events your TikTok Pixel is configured to track; passed through
|
|
14405
|
+
* verbatim and validated by TikTok. Optional for `goal: conversions`.
|
|
14364
14406
|
*
|
|
14365
14407
|
*/
|
|
14366
14408
|
customEventType?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -14082,7 +14082,7 @@ type CreateStandaloneAdData = {
|
|
|
14082
14082
|
adAccountId: string;
|
|
14083
14083
|
name: string;
|
|
14084
14084
|
/**
|
|
14085
|
-
* Required on legacy + multi-creative shapes. Inherited from the ad set on the attach shape. Available goals vary by platform. Meta-specific: `conversions` requires `promotedObject.pixelId` + `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` + `promotedObject.objectStoreUrl`; `lead_generation` accepts an optional `promotedObject.pageId` (auto-filled from the connected Page when omitted).
|
|
14085
|
+
* Required on legacy + multi-creative shapes. Inherited from the ad set on the attach shape. Available goals vary by platform. Meta-specific: `conversions` requires `promotedObject.pixelId` + `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` + `promotedObject.objectStoreUrl`; `lead_generation` accepts an optional `promotedObject.pageId` (auto-filled from the connected Page when omitted). TikTok-specific: `conversions` (website-conversion ad group) requires `promotedObject.pixelId` (your TikTok Pixel ID) and accepts an optional `promotedObject.customEventType` (a TikTok `optimization_event` code like `ON_WEB_ORDER`, `INITIATE_ORDER`, `ON_WEB_REGISTER`, `FORM`); to inherit a pixel + event from an existing ad group, pass `adSetId` instead. LinkedIn-specific: `engagement`, `traffic`, `awareness`, and `video_views` are supported for standalone ads (creates a Direct Sponsored Content single image or single video ad). `traffic` requires `linkUrl`; `video_views` requires the `video` field. For `lead_generation` / `conversions` on LinkedIn — or to promote an existing post — use `POST /v1/ads/boost`.
|
|
14086
14086
|
*/
|
|
14087
14087
|
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'conversions' | 'app_promotion';
|
|
14088
14088
|
/**
|
|
@@ -14095,27 +14095,27 @@ type CreateStandaloneAdData = {
|
|
|
14095
14095
|
budgetType?: 'daily' | 'lifetime';
|
|
14096
14096
|
currency?: string;
|
|
14097
14097
|
/**
|
|
14098
|
-
* Required for Meta, Google, and
|
|
14098
|
+
* Required for Meta, Google, Pinterest, and LinkedIn on legacy + attach shapes (skip for multi-creative — use `creatives[].headline`). Ignored for TikTok and X/Twitter. Max: Meta=255, Google=30, Pinterest=100, LinkedIn=400. On LinkedIn this is the ad's headline (the bold text on the creative); for traffic ads it's the link card title.
|
|
14099
14099
|
*/
|
|
14100
14100
|
headline?: string;
|
|
14101
14101
|
/**
|
|
14102
|
-
* Google Display only
|
|
14102
|
+
* Google Display only — defaults to `headline` if omitted. On LinkedIn, reused as the optional secondary description text on traffic (link) ads; omitted if not provided.
|
|
14103
14103
|
*/
|
|
14104
14104
|
longHeadline?: string;
|
|
14105
14105
|
/**
|
|
14106
|
-
* Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). Max: Google=90, Pinterest=500.
|
|
14106
|
+
* Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). On LinkedIn this is the post commentary (the intro text shown above the ad). Max: Google=90, Pinterest=500.
|
|
14107
14107
|
*/
|
|
14108
14108
|
body?: string;
|
|
14109
14109
|
/**
|
|
14110
|
-
* Required on legacy + attach shapes for Meta. Honoured on TikTok
|
|
14110
|
+
* Required on legacy + attach shapes for Meta. Honoured on TikTok (passes through to the Spark Ad creative's `call_to_action`) and on LinkedIn (the CTA button on the ad; defaults to LEARN_MORE when `linkUrl` is set). LinkedIn accepts: LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. Ignored by Google, Pinterest, and X/Twitter.
|
|
14111
14111
|
*/
|
|
14112
|
-
callToAction?: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE';
|
|
14112
|
+
callToAction?: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE' | 'REGISTER' | 'JOIN' | 'ATTEND' | 'REQUEST_DEMO' | 'VIEW_QUOTE' | 'APPLY' | 'SEE_MORE' | 'BUY_NOW';
|
|
14113
14113
|
/**
|
|
14114
|
-
* Required on legacy + attach shapes
|
|
14114
|
+
* Required on legacy + attach shapes (skip for multi-creative). On LinkedIn it's the ad's destination URL; required for `traffic` ads, optional for `engagement` / `awareness`.
|
|
14115
14115
|
*/
|
|
14116
14116
|
linkUrl?: string;
|
|
14117
14117
|
/**
|
|
14118
|
-
* Image creative for Meta/Google/Pinterest on legacy + attach shapes (mutually exclusive with `video`). Not required for Google Search campaigns. For TikTok, this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the field retains the `imageUrl` name for cross-platform consistency). Ignored for X/Twitter. For Google Display, treated as the landscape image (alias of `images.landscape`); supply `images.square` alongside or the request is rejected.
|
|
14118
|
+
* Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes (mutually exclusive with `video`). Required for LinkedIn ads unless `video` is set. Not required for Google Search campaigns. For TikTok, this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the field retains the `imageUrl` name for cross-platform consistency). Ignored for X/Twitter. For Google Display, treated as the landscape image (alias of `images.landscape`); supply `images.square` alongside or the request is rejected. For LinkedIn the image is uploaded to LinkedIn under the authoring Company Page (see `organizationId`); recommended ratio 1.91:1 (e.g. 1200×627).
|
|
14119
14119
|
*/
|
|
14120
14120
|
imageUrl?: string;
|
|
14121
14121
|
/**
|
|
@@ -14132,17 +14132,17 @@ type CreateStandaloneAdData = {
|
|
|
14132
14132
|
square?: string;
|
|
14133
14133
|
};
|
|
14134
14134
|
/**
|
|
14135
|
-
* Meta
|
|
14135
|
+
* Meta (facebook, instagram) and LinkedIn. When set, creates a VIDEO ad on the legacy (or, for Meta, attach) shape. Mutually exclusive with `imageUrl`. For Meta multi-creative, set `video` per entry inside `creatives[]` instead. For LinkedIn the video is uploaded to LinkedIn under the authoring Company Page (see `organizationId`) and the campaign format is set to SINGLE_VIDEO; LinkedIn ignores `thumbnailUrl` (it auto-generates the poster frame) — supply MP4 H.264/AAC, 3s-30min, 75KB-500MB.
|
|
14136
14136
|
*/
|
|
14137
14137
|
video?: {
|
|
14138
14138
|
/**
|
|
14139
|
-
* Public URL of the video.
|
|
14139
|
+
* Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta's transcoding until status.video_status === 'ready'. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s.
|
|
14140
14140
|
*/
|
|
14141
14141
|
url: string;
|
|
14142
14142
|
/**
|
|
14143
|
-
* Public URL of a still-image thumbnail for the video. Required by Meta on every video creative
|
|
14143
|
+
* Public URL of a still-image thumbnail for the video. Required by Meta on every video creative (uploaded as an ad image and referenced in object_story_spec.video_data). Ignored by LinkedIn (auto-generated poster frame).
|
|
14144
14144
|
*/
|
|
14145
|
-
thumbnailUrl
|
|
14145
|
+
thumbnailUrl?: string;
|
|
14146
14146
|
};
|
|
14147
14147
|
/**
|
|
14148
14148
|
* Meta-only. When present, switches to the multi-creative shape:
|
|
@@ -14192,7 +14192,11 @@ type CreateStandaloneAdData = {
|
|
|
14192
14192
|
*/
|
|
14193
14193
|
boardId?: string;
|
|
14194
14194
|
/**
|
|
14195
|
-
*
|
|
14195
|
+
* LinkedIn only. The Company Page that authors the Direct Sponsored Content ("dark") post backing the ad — accepts a numeric organization ID or a full `urn:li:organization:N` URN. Required unless the resolved `accountId` is a connected LinkedIn Company-Page account (defaults to that page) or the LinkedIn ad account is org-owned (defaults to the account's owning organization). The authenticated member must be an ADMINISTRATOR or DIRECT_SPONSORED_CONTENT_POSTER of this page (and the page must be associated with the ad account), or LinkedIn returns 403. Ignored by every other platform.
|
|
14196
|
+
*/
|
|
14197
|
+
organizationId?: string;
|
|
14198
|
+
/**
|
|
14199
|
+
* ISO 3166-1 alpha-2 country codes (e.g. ['NL']). Defaults to ['US'] when no `cities` or `regions` are provided. (LinkedIn currently honours country-level targeting only.)
|
|
14196
14200
|
*/
|
|
14197
14201
|
countries?: Array<(string)>;
|
|
14198
14202
|
/**
|
|
@@ -14262,6 +14266,22 @@ type CreateStandaloneAdData = {
|
|
|
14262
14266
|
* Meta only. Controls the Advantage audience feature (targeting_automation). 0 = disabled (default), 1 = enabled. Meta Marketing API requires this field on all ad set creation requests.
|
|
14263
14267
|
*/
|
|
14264
14268
|
advantageAudience?: 0 | 1;
|
|
14269
|
+
/**
|
|
14270
|
+
* Meta only. Conversion attribution window for the ad set — maps 1:1 to Meta's
|
|
14271
|
+
* ad-set `attribution_spec`. Only honored for conversion goals (`conversions`,
|
|
14272
|
+
* `lead_generation`, `app_promotion`); ignored for awareness/traffic/engagement.
|
|
14273
|
+
* Omit to use Meta's default (`7-day click` + `1-day view`). Meta enforces the
|
|
14274
|
+
* valid combinations: `VIEW_THROUGH` only allows `windowDays: 1` (7d/28d view
|
|
14275
|
+
* windows were removed Jan 2026); `ENGAGED_VIDEO_VIEW` only `1` and only alongside
|
|
14276
|
+
* `VIEW_THROUGH: 1`; `CLICK_THROUGH: 28` only on certain objectives. Invalid combos
|
|
14277
|
+
* surface as a Meta 400.
|
|
14278
|
+
* Example: `[{ "eventType": "CLICK_THROUGH", "windowDays": 7 }, { "eventType": "VIEW_THROUGH", "windowDays": 1 }]`
|
|
14279
|
+
*
|
|
14280
|
+
*/
|
|
14281
|
+
attributionSpec?: Array<{
|
|
14282
|
+
eventType: 'CLICK_THROUGH' | 'VIEW_THROUGH' | 'ENGAGED_VIDEO_VIEW';
|
|
14283
|
+
windowDays: 1 | 7 | 28;
|
|
14284
|
+
}>;
|
|
14265
14285
|
/**
|
|
14266
14286
|
* Meta only. Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Ignored by non-Meta platforms.
|
|
14267
14287
|
*/
|
|
@@ -14340,27 +14360,49 @@ type CreateStandaloneAdData = {
|
|
|
14340
14360
|
*/
|
|
14341
14361
|
identityType?: 'TT_USER' | 'CUSTOMIZED_USER';
|
|
14342
14362
|
/**
|
|
14343
|
-
*
|
|
14363
|
+
* What the ad optimises against. Behaviour depends on the platform.
|
|
14344
14364
|
*
|
|
14365
|
+
* **Meta**: forwarded to the ad set's `promoted_object` (snake-cased).
|
|
14345
14366
|
* Required for goals whose ad-set optimization_goal points at a specific
|
|
14346
|
-
* event/page/app
|
|
14347
|
-
* `error_subcode: 1815430` "Please select a promoted object for your ad set":
|
|
14348
|
-
* - `goal: conversions` (OFFSITE_CONVERSIONS)
|
|
14349
|
-
* - `goal: app_promotion` (APP_INSTALLS)
|
|
14350
|
-
* - `goal: lead_generation` (LEAD_GENERATION)
|
|
14367
|
+
* event/page/app (without it Meta rejects the ad-set create with
|
|
14368
|
+
* `error_subcode: 1815430` "Please select a promoted object for your ad set"):
|
|
14369
|
+
* - `goal: conversions` (OFFSITE_CONVERSIONS): requires `pixelId` + `customEventType`
|
|
14370
|
+
* - `goal: app_promotion` (APP_INSTALLS): requires `applicationId` + `objectStoreUrl`
|
|
14371
|
+
* - `goal: lead_generation` (LEAD_GENERATION): `pageId` is auto-filled from the connected Page when omitted
|
|
14372
|
+
*
|
|
14373
|
+
* Other Meta goals (engagement, traffic, awareness, video_views) ignore this field.
|
|
14374
|
+
*
|
|
14375
|
+
* **TikTok**: only `goal: conversions` uses it.
|
|
14376
|
+
* - `pixelId` maps to the ad group's `pixel_id`. Required: a TikTok website-conversion
|
|
14377
|
+
* ad group without a pixel is rejected with `40002: Please select a pixel`.
|
|
14378
|
+
* - `customEventType` maps to the ad group's `optimization_event` (the pixel event to
|
|
14379
|
+
* optimise for). Optional: TikTok accepts a pixel-only auto-bid conversion ad group.
|
|
14380
|
+
* See the `customEventType` field below for the valid TikTok codes.
|
|
14351
14381
|
*
|
|
14352
|
-
*
|
|
14382
|
+
* The remaining `promotedObject.*` fields are Meta-only. Platforms other than
|
|
14383
|
+
* Meta and TikTok ignore `promotedObject` entirely.
|
|
14353
14384
|
*
|
|
14354
14385
|
*/
|
|
14355
14386
|
promotedObject?: {
|
|
14356
14387
|
/**
|
|
14357
|
-
* Facebook Pixel ID
|
|
14388
|
+
* Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`.
|
|
14389
|
+
* **TikTok:** TikTok Pixel ID, required for `goal: conversions`.
|
|
14390
|
+
*
|
|
14358
14391
|
*/
|
|
14359
14392
|
pixelId?: string;
|
|
14360
14393
|
/**
|
|
14361
|
-
*
|
|
14362
|
-
*
|
|
14363
|
-
*
|
|
14394
|
+
* The event the campaign/ad group optimises against.
|
|
14395
|
+
*
|
|
14396
|
+
* **Meta:** standard event like `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION`,
|
|
14397
|
+
* `ADD_TO_CART`. Uppercased internally so callers can pass any case. Required
|
|
14398
|
+
* for `goal: conversions`.
|
|
14399
|
+
*
|
|
14400
|
+
* **TikTok:** an `optimization_event` code (UPPER_SNAKE, not Meta's vocabulary
|
|
14401
|
+
* and not PascalCase), e.g. `ON_WEB_ORDER` (Complete Payment), `INITIATE_ORDER`
|
|
14402
|
+
* (Place an Order), `ON_WEB_CART` (Add to Cart), `ON_WEB_REGISTER` (Complete
|
|
14403
|
+
* Registration), `FORM` (Submit Form), `ON_WEB_DETAIL` (View Content). Must be
|
|
14404
|
+
* one of the events your TikTok Pixel is configured to track; passed through
|
|
14405
|
+
* verbatim and validated by TikTok. Optional for `goal: conversions`.
|
|
14364
14406
|
*
|
|
14365
14407
|
*/
|
|
14366
14408
|
customEventType?: string;
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -3561,7 +3561,7 @@ export const boostPost = <ThrowOnError extends boolean = false>(options: Options
|
|
|
3561
3561
|
|
|
3562
3562
|
/**
|
|
3563
3563
|
* Create standalone ad
|
|
3564
|
-
* Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok,
|
|
3564
|
+
* Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X/Twitter, and LinkedIn. Supports three mutually-exclusive request shapes selected by the body, a legacy single-creative shape (all platforms, default), a Meta-only multi-creative shape via the creatives array (one ad set with N ads sharing budget and targeting), and a Meta-only attach shape via adSetId (adds one new ad to an existing ad set). Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content "dark post" authored by a Company Page (see `organizationId`); supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`.
|
|
3565
3565
|
*/
|
|
3566
3566
|
export const createStandaloneAd = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateStandaloneAdData, ThrowOnError>) => {
|
|
3567
3567
|
return (options?.client ?? client).post<CreateStandaloneAdResponse, CreateStandaloneAdError, ThrowOnError>({
|
|
@@ -14413,7 +14413,7 @@ export type CreateStandaloneAdData = {
|
|
|
14413
14413
|
adAccountId: string;
|
|
14414
14414
|
name: string;
|
|
14415
14415
|
/**
|
|
14416
|
-
* Required on legacy + multi-creative shapes. Inherited from the ad set on the attach shape. Available goals vary by platform. Meta-specific: `conversions` requires `promotedObject.pixelId` + `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` + `promotedObject.objectStoreUrl`; `lead_generation` accepts an optional `promotedObject.pageId` (auto-filled from the connected Page when omitted).
|
|
14416
|
+
* Required on legacy + multi-creative shapes. Inherited from the ad set on the attach shape. Available goals vary by platform. Meta-specific: `conversions` requires `promotedObject.pixelId` + `promotedObject.customEventType`; `app_promotion` requires `promotedObject.applicationId` + `promotedObject.objectStoreUrl`; `lead_generation` accepts an optional `promotedObject.pageId` (auto-filled from the connected Page when omitted). TikTok-specific: `conversions` (website-conversion ad group) requires `promotedObject.pixelId` (your TikTok Pixel ID) and accepts an optional `promotedObject.customEventType` (a TikTok `optimization_event` code like `ON_WEB_ORDER`, `INITIATE_ORDER`, `ON_WEB_REGISTER`, `FORM`); to inherit a pixel + event from an existing ad group, pass `adSetId` instead. LinkedIn-specific: `engagement`, `traffic`, `awareness`, and `video_views` are supported for standalone ads (creates a Direct Sponsored Content single image or single video ad). `traffic` requires `linkUrl`; `video_views` requires the `video` field. For `lead_generation` / `conversions` on LinkedIn — or to promote an existing post — use `POST /v1/ads/boost`.
|
|
14417
14417
|
*/
|
|
14418
14418
|
goal?: 'engagement' | 'traffic' | 'awareness' | 'video_views' | 'lead_generation' | 'conversions' | 'app_promotion';
|
|
14419
14419
|
/**
|
|
@@ -14426,27 +14426,27 @@ export type CreateStandaloneAdData = {
|
|
|
14426
14426
|
budgetType?: 'daily' | 'lifetime';
|
|
14427
14427
|
currency?: string;
|
|
14428
14428
|
/**
|
|
14429
|
-
* Required for Meta, Google, and
|
|
14429
|
+
* Required for Meta, Google, Pinterest, and LinkedIn on legacy + attach shapes (skip for multi-creative — use `creatives[].headline`). Ignored for TikTok and X/Twitter. Max: Meta=255, Google=30, Pinterest=100, LinkedIn=400. On LinkedIn this is the ad's headline (the bold text on the creative); for traffic ads it's the link card title.
|
|
14430
14430
|
*/
|
|
14431
14431
|
headline?: string;
|
|
14432
14432
|
/**
|
|
14433
|
-
* Google Display only
|
|
14433
|
+
* Google Display only — defaults to `headline` if omitted. On LinkedIn, reused as the optional secondary description text on traffic (link) ads; omitted if not provided.
|
|
14434
14434
|
*/
|
|
14435
14435
|
longHeadline?: string;
|
|
14436
14436
|
/**
|
|
14437
|
-
* Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). Max: Google=90, Pinterest=500.
|
|
14437
|
+
* Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). On LinkedIn this is the post commentary (the intro text shown above the ad). Max: Google=90, Pinterest=500.
|
|
14438
14438
|
*/
|
|
14439
14439
|
body?: string;
|
|
14440
14440
|
/**
|
|
14441
|
-
* Required on legacy + attach shapes for Meta. Honoured on TikTok
|
|
14441
|
+
* Required on legacy + attach shapes for Meta. Honoured on TikTok (passes through to the Spark Ad creative's `call_to_action`) and on LinkedIn (the CTA button on the ad; defaults to LEARN_MORE when `linkUrl` is set). LinkedIn accepts: LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. Ignored by Google, Pinterest, and X/Twitter.
|
|
14442
14442
|
*/
|
|
14443
|
-
callToAction?: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE';
|
|
14443
|
+
callToAction?: 'LEARN_MORE' | 'SHOP_NOW' | 'SIGN_UP' | 'BOOK_TRAVEL' | 'CONTACT_US' | 'DOWNLOAD' | 'GET_OFFER' | 'GET_QUOTE' | 'SUBSCRIBE' | 'WATCH_MORE' | 'REGISTER' | 'JOIN' | 'ATTEND' | 'REQUEST_DEMO' | 'VIEW_QUOTE' | 'APPLY' | 'SEE_MORE' | 'BUY_NOW';
|
|
14444
14444
|
/**
|
|
14445
|
-
* Required on legacy + attach shapes
|
|
14445
|
+
* Required on legacy + attach shapes (skip for multi-creative). On LinkedIn it's the ad's destination URL; required for `traffic` ads, optional for `engagement` / `awareness`.
|
|
14446
14446
|
*/
|
|
14447
14447
|
linkUrl?: string;
|
|
14448
14448
|
/**
|
|
14449
|
-
* Image creative for Meta/Google/Pinterest on legacy + attach shapes (mutually exclusive with `video`). Not required for Google Search campaigns. For TikTok, this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the field retains the `imageUrl` name for cross-platform consistency). Ignored for X/Twitter. For Google Display, treated as the landscape image (alias of `images.landscape`); supply `images.square` alongside or the request is rejected.
|
|
14449
|
+
* Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes (mutually exclusive with `video`). Required for LinkedIn ads unless `video` is set. Not required for Google Search campaigns. For TikTok, this field carries the VIDEO URL (the TikTok ads endpoint is video-only; the field retains the `imageUrl` name for cross-platform consistency). Ignored for X/Twitter. For Google Display, treated as the landscape image (alias of `images.landscape`); supply `images.square` alongside or the request is rejected. For LinkedIn the image is uploaded to LinkedIn under the authoring Company Page (see `organizationId`); recommended ratio 1.91:1 (e.g. 1200×627).
|
|
14450
14450
|
*/
|
|
14451
14451
|
imageUrl?: string;
|
|
14452
14452
|
/**
|
|
@@ -14463,17 +14463,17 @@ export type CreateStandaloneAdData = {
|
|
|
14463
14463
|
square?: string;
|
|
14464
14464
|
};
|
|
14465
14465
|
/**
|
|
14466
|
-
* Meta
|
|
14466
|
+
* Meta (facebook, instagram) and LinkedIn. When set, creates a VIDEO ad on the legacy (or, for Meta, attach) shape. Mutually exclusive with `imageUrl`. For Meta multi-creative, set `video` per entry inside `creatives[]` instead. For LinkedIn the video is uploaded to LinkedIn under the authoring Company Page (see `organizationId`) and the campaign format is set to SINGLE_VIDEO; LinkedIn ignores `thumbnailUrl` (it auto-generates the poster frame) — supply MP4 H.264/AAC, 3s-30min, 75KB-500MB.
|
|
14467
14467
|
*/
|
|
14468
14468
|
video?: {
|
|
14469
14469
|
/**
|
|
14470
|
-
* Public URL of the video.
|
|
14470
|
+
* Public URL of the video. Meta: uploaded via chunked transfer on /act_X/advideos, then the request blocks on Meta's transcoding until status.video_status === 'ready'. LinkedIn: uploaded via the Videos API (multipart), then the request blocks until LinkedIn finishes transcoding (status AVAILABLE) — short clips take ~10-30s.
|
|
14471
14471
|
*/
|
|
14472
14472
|
url: string;
|
|
14473
14473
|
/**
|
|
14474
|
-
* Public URL of a still-image thumbnail for the video. Required by Meta on every video creative
|
|
14474
|
+
* Public URL of a still-image thumbnail for the video. Required by Meta on every video creative (uploaded as an ad image and referenced in object_story_spec.video_data). Ignored by LinkedIn (auto-generated poster frame).
|
|
14475
14475
|
*/
|
|
14476
|
-
thumbnailUrl
|
|
14476
|
+
thumbnailUrl?: string;
|
|
14477
14477
|
};
|
|
14478
14478
|
/**
|
|
14479
14479
|
* Meta-only. When present, switches to the multi-creative shape:
|
|
@@ -14523,7 +14523,11 @@ export type CreateStandaloneAdData = {
|
|
|
14523
14523
|
*/
|
|
14524
14524
|
boardId?: string;
|
|
14525
14525
|
/**
|
|
14526
|
-
*
|
|
14526
|
+
* LinkedIn only. The Company Page that authors the Direct Sponsored Content ("dark") post backing the ad — accepts a numeric organization ID or a full `urn:li:organization:N` URN. Required unless the resolved `accountId` is a connected LinkedIn Company-Page account (defaults to that page) or the LinkedIn ad account is org-owned (defaults to the account's owning organization). The authenticated member must be an ADMINISTRATOR or DIRECT_SPONSORED_CONTENT_POSTER of this page (and the page must be associated with the ad account), or LinkedIn returns 403. Ignored by every other platform.
|
|
14527
|
+
*/
|
|
14528
|
+
organizationId?: string;
|
|
14529
|
+
/**
|
|
14530
|
+
* ISO 3166-1 alpha-2 country codes (e.g. ['NL']). Defaults to ['US'] when no `cities` or `regions` are provided. (LinkedIn currently honours country-level targeting only.)
|
|
14527
14531
|
*/
|
|
14528
14532
|
countries?: Array<(string)>;
|
|
14529
14533
|
/**
|
|
@@ -14593,6 +14597,22 @@ export type CreateStandaloneAdData = {
|
|
|
14593
14597
|
* Meta only. Controls the Advantage audience feature (targeting_automation). 0 = disabled (default), 1 = enabled. Meta Marketing API requires this field on all ad set creation requests.
|
|
14594
14598
|
*/
|
|
14595
14599
|
advantageAudience?: 0 | 1;
|
|
14600
|
+
/**
|
|
14601
|
+
* Meta only. Conversion attribution window for the ad set — maps 1:1 to Meta's
|
|
14602
|
+
* ad-set `attribution_spec`. Only honored for conversion goals (`conversions`,
|
|
14603
|
+
* `lead_generation`, `app_promotion`); ignored for awareness/traffic/engagement.
|
|
14604
|
+
* Omit to use Meta's default (`7-day click` + `1-day view`). Meta enforces the
|
|
14605
|
+
* valid combinations: `VIEW_THROUGH` only allows `windowDays: 1` (7d/28d view
|
|
14606
|
+
* windows were removed Jan 2026); `ENGAGED_VIDEO_VIEW` only `1` and only alongside
|
|
14607
|
+
* `VIEW_THROUGH: 1`; `CLICK_THROUGH: 28` only on certain objectives. Invalid combos
|
|
14608
|
+
* surface as a Meta 400.
|
|
14609
|
+
* Example: `[{ "eventType": "CLICK_THROUGH", "windowDays": 7 }, { "eventType": "VIEW_THROUGH", "windowDays": 1 }]`
|
|
14610
|
+
*
|
|
14611
|
+
*/
|
|
14612
|
+
attributionSpec?: Array<{
|
|
14613
|
+
eventType: 'CLICK_THROUGH' | 'VIEW_THROUGH' | 'ENGAGED_VIDEO_VIEW';
|
|
14614
|
+
windowDays: 1 | 7 | 28;
|
|
14615
|
+
}>;
|
|
14596
14616
|
/**
|
|
14597
14617
|
* Meta only. Restrict the audience by gender. 'male' targets men only, 'female' targets women only, 'all' (default) targets everyone. Ignored by non-Meta platforms.
|
|
14598
14618
|
*/
|
|
@@ -14671,27 +14691,49 @@ export type CreateStandaloneAdData = {
|
|
|
14671
14691
|
*/
|
|
14672
14692
|
identityType?: 'TT_USER' | 'CUSTOMIZED_USER';
|
|
14673
14693
|
/**
|
|
14674
|
-
*
|
|
14694
|
+
* What the ad optimises against. Behaviour depends on the platform.
|
|
14675
14695
|
*
|
|
14696
|
+
* **Meta**: forwarded to the ad set's `promoted_object` (snake-cased).
|
|
14676
14697
|
* Required for goals whose ad-set optimization_goal points at a specific
|
|
14677
|
-
* event/page/app
|
|
14678
|
-
* `error_subcode: 1815430` "Please select a promoted object for your ad set":
|
|
14679
|
-
* - `goal: conversions` (OFFSITE_CONVERSIONS)
|
|
14680
|
-
* - `goal: app_promotion` (APP_INSTALLS)
|
|
14681
|
-
* - `goal: lead_generation` (LEAD_GENERATION)
|
|
14698
|
+
* event/page/app (without it Meta rejects the ad-set create with
|
|
14699
|
+
* `error_subcode: 1815430` "Please select a promoted object for your ad set"):
|
|
14700
|
+
* - `goal: conversions` (OFFSITE_CONVERSIONS): requires `pixelId` + `customEventType`
|
|
14701
|
+
* - `goal: app_promotion` (APP_INSTALLS): requires `applicationId` + `objectStoreUrl`
|
|
14702
|
+
* - `goal: lead_generation` (LEAD_GENERATION): `pageId` is auto-filled from the connected Page when omitted
|
|
14703
|
+
*
|
|
14704
|
+
* Other Meta goals (engagement, traffic, awareness, video_views) ignore this field.
|
|
14705
|
+
*
|
|
14706
|
+
* **TikTok**: only `goal: conversions` uses it.
|
|
14707
|
+
* - `pixelId` maps to the ad group's `pixel_id`. Required: a TikTok website-conversion
|
|
14708
|
+
* ad group without a pixel is rejected with `40002: Please select a pixel`.
|
|
14709
|
+
* - `customEventType` maps to the ad group's `optimization_event` (the pixel event to
|
|
14710
|
+
* optimise for). Optional: TikTok accepts a pixel-only auto-bid conversion ad group.
|
|
14711
|
+
* See the `customEventType` field below for the valid TikTok codes.
|
|
14682
14712
|
*
|
|
14683
|
-
*
|
|
14713
|
+
* The remaining `promotedObject.*` fields are Meta-only. Platforms other than
|
|
14714
|
+
* Meta and TikTok ignore `promotedObject` entirely.
|
|
14684
14715
|
*
|
|
14685
14716
|
*/
|
|
14686
14717
|
promotedObject?: {
|
|
14687
14718
|
/**
|
|
14688
|
-
* Facebook Pixel ID
|
|
14719
|
+
* Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`.
|
|
14720
|
+
* **TikTok:** TikTok Pixel ID, required for `goal: conversions`.
|
|
14721
|
+
*
|
|
14689
14722
|
*/
|
|
14690
14723
|
pixelId?: string;
|
|
14691
14724
|
/**
|
|
14692
|
-
*
|
|
14693
|
-
*
|
|
14694
|
-
*
|
|
14725
|
+
* The event the campaign/ad group optimises against.
|
|
14726
|
+
*
|
|
14727
|
+
* **Meta:** standard event like `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION`,
|
|
14728
|
+
* `ADD_TO_CART`. Uppercased internally so callers can pass any case. Required
|
|
14729
|
+
* for `goal: conversions`.
|
|
14730
|
+
*
|
|
14731
|
+
* **TikTok:** an `optimization_event` code (UPPER_SNAKE, not Meta's vocabulary
|
|
14732
|
+
* and not PascalCase), e.g. `ON_WEB_ORDER` (Complete Payment), `INITIATE_ORDER`
|
|
14733
|
+
* (Place an Order), `ON_WEB_CART` (Add to Cart), `ON_WEB_REGISTER` (Complete
|
|
14734
|
+
* Registration), `FORM` (Submit Form), `ON_WEB_DETAIL` (View Content). Must be
|
|
14735
|
+
* one of the events your TikTok Pixel is configured to track; passed through
|
|
14736
|
+
* verbatim and validated by TikTok. Optional for `goal: conversions`.
|
|
14695
14737
|
*
|
|
14696
14738
|
*/
|
|
14697
14739
|
customEventType?: string;
|