@zernio/node 0.2.135 → 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 +39 -17
- package/dist/index.d.ts +39 -17
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +1 -1
- package/src/generated/types.gen.ts +39 -17
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
|
/**
|
|
@@ -14115,7 +14115,7 @@ type CreateStandaloneAdData = {
|
|
|
14115
14115
|
*/
|
|
14116
14116
|
linkUrl?: string;
|
|
14117
14117
|
/**
|
|
14118
|
-
* Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes (mutually exclusive with `video`). Required for LinkedIn ads. 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).
|
|
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:
|
|
@@ -14360,27 +14360,49 @@ type CreateStandaloneAdData = {
|
|
|
14360
14360
|
*/
|
|
14361
14361
|
identityType?: 'TT_USER' | 'CUSTOMIZED_USER';
|
|
14362
14362
|
/**
|
|
14363
|
-
*
|
|
14363
|
+
* What the ad optimises against. Behaviour depends on the platform.
|
|
14364
14364
|
*
|
|
14365
|
+
* **Meta**: forwarded to the ad set's `promoted_object` (snake-cased).
|
|
14365
14366
|
* Required for goals whose ad-set optimization_goal points at a specific
|
|
14366
|
-
* event/page/app
|
|
14367
|
-
* `error_subcode: 1815430` "Please select a promoted object for your ad set":
|
|
14368
|
-
* - `goal: conversions` (OFFSITE_CONVERSIONS)
|
|
14369
|
-
* - `goal: app_promotion` (APP_INSTALLS)
|
|
14370
|
-
* - `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.
|
|
14371
14381
|
*
|
|
14372
|
-
*
|
|
14382
|
+
* The remaining `promotedObject.*` fields are Meta-only. Platforms other than
|
|
14383
|
+
* Meta and TikTok ignore `promotedObject` entirely.
|
|
14373
14384
|
*
|
|
14374
14385
|
*/
|
|
14375
14386
|
promotedObject?: {
|
|
14376
14387
|
/**
|
|
14377
|
-
* Facebook Pixel ID
|
|
14388
|
+
* Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`.
|
|
14389
|
+
* **TikTok:** TikTok Pixel ID, required for `goal: conversions`.
|
|
14390
|
+
*
|
|
14378
14391
|
*/
|
|
14379
14392
|
pixelId?: string;
|
|
14380
14393
|
/**
|
|
14381
|
-
*
|
|
14382
|
-
*
|
|
14383
|
-
*
|
|
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`.
|
|
14384
14406
|
*
|
|
14385
14407
|
*/
|
|
14386
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
|
/**
|
|
@@ -14115,7 +14115,7 @@ type CreateStandaloneAdData = {
|
|
|
14115
14115
|
*/
|
|
14116
14116
|
linkUrl?: string;
|
|
14117
14117
|
/**
|
|
14118
|
-
* Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes (mutually exclusive with `video`). Required for LinkedIn ads. 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).
|
|
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:
|
|
@@ -14360,27 +14360,49 @@ type CreateStandaloneAdData = {
|
|
|
14360
14360
|
*/
|
|
14361
14361
|
identityType?: 'TT_USER' | 'CUSTOMIZED_USER';
|
|
14362
14362
|
/**
|
|
14363
|
-
*
|
|
14363
|
+
* What the ad optimises against. Behaviour depends on the platform.
|
|
14364
14364
|
*
|
|
14365
|
+
* **Meta**: forwarded to the ad set's `promoted_object` (snake-cased).
|
|
14365
14366
|
* Required for goals whose ad-set optimization_goal points at a specific
|
|
14366
|
-
* event/page/app
|
|
14367
|
-
* `error_subcode: 1815430` "Please select a promoted object for your ad set":
|
|
14368
|
-
* - `goal: conversions` (OFFSITE_CONVERSIONS)
|
|
14369
|
-
* - `goal: app_promotion` (APP_INSTALLS)
|
|
14370
|
-
* - `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.
|
|
14371
14381
|
*
|
|
14372
|
-
*
|
|
14382
|
+
* The remaining `promotedObject.*` fields are Meta-only. Platforms other than
|
|
14383
|
+
* Meta and TikTok ignore `promotedObject` entirely.
|
|
14373
14384
|
*
|
|
14374
14385
|
*/
|
|
14375
14386
|
promotedObject?: {
|
|
14376
14387
|
/**
|
|
14377
|
-
* Facebook Pixel ID
|
|
14388
|
+
* Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`.
|
|
14389
|
+
* **TikTok:** TikTok Pixel ID, required for `goal: conversions`.
|
|
14390
|
+
*
|
|
14378
14391
|
*/
|
|
14379
14392
|
pixelId?: string;
|
|
14380
14393
|
/**
|
|
14381
|
-
*
|
|
14382
|
-
*
|
|
14383
|
-
*
|
|
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`.
|
|
14384
14406
|
*
|
|
14385
14407
|
*/
|
|
14386
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, 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
|
|
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
|
/**
|
|
@@ -14446,7 +14446,7 @@ export type CreateStandaloneAdData = {
|
|
|
14446
14446
|
*/
|
|
14447
14447
|
linkUrl?: string;
|
|
14448
14448
|
/**
|
|
14449
|
-
* Image creative for Meta/Google/Pinterest/LinkedIn on legacy + attach shapes (mutually exclusive with `video`). Required for LinkedIn ads. 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).
|
|
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:
|
|
@@ -14691,27 +14691,49 @@ export type CreateStandaloneAdData = {
|
|
|
14691
14691
|
*/
|
|
14692
14692
|
identityType?: 'TT_USER' | 'CUSTOMIZED_USER';
|
|
14693
14693
|
/**
|
|
14694
|
-
*
|
|
14694
|
+
* What the ad optimises against. Behaviour depends on the platform.
|
|
14695
14695
|
*
|
|
14696
|
+
* **Meta**: forwarded to the ad set's `promoted_object` (snake-cased).
|
|
14696
14697
|
* Required for goals whose ad-set optimization_goal points at a specific
|
|
14697
|
-
* event/page/app
|
|
14698
|
-
* `error_subcode: 1815430` "Please select a promoted object for your ad set":
|
|
14699
|
-
* - `goal: conversions` (OFFSITE_CONVERSIONS)
|
|
14700
|
-
* - `goal: app_promotion` (APP_INSTALLS)
|
|
14701
|
-
* - `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.
|
|
14702
14712
|
*
|
|
14703
|
-
*
|
|
14713
|
+
* The remaining `promotedObject.*` fields are Meta-only. Platforms other than
|
|
14714
|
+
* Meta and TikTok ignore `promotedObject` entirely.
|
|
14704
14715
|
*
|
|
14705
14716
|
*/
|
|
14706
14717
|
promotedObject?: {
|
|
14707
14718
|
/**
|
|
14708
|
-
* Facebook Pixel ID
|
|
14719
|
+
* Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`.
|
|
14720
|
+
* **TikTok:** TikTok Pixel ID, required for `goal: conversions`.
|
|
14721
|
+
*
|
|
14709
14722
|
*/
|
|
14710
14723
|
pixelId?: string;
|
|
14711
14724
|
/**
|
|
14712
|
-
*
|
|
14713
|
-
*
|
|
14714
|
-
*
|
|
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`.
|
|
14715
14737
|
*
|
|
14716
14738
|
*/
|
|
14717
14739
|
customEventType?: string;
|