@zernio/node 0.2.675 → 0.2.677
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 +23 -7
- package/dist/index.d.ts +23 -7
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +23 -1
- package/src/generated/types.gen.ts +23 -7
package/dist/index.d.mts
CHANGED
|
@@ -2770,7 +2770,7 @@ type BulkUploadResult = {
|
|
|
2770
2770
|
errors?: Array<(string)>;
|
|
2771
2771
|
}>;
|
|
2772
2772
|
/**
|
|
2773
|
-
* Top-level advisory warnings
|
|
2773
|
+
* Top-level advisory warnings, e.g. `rows_exceed_advisory_limit:500` or `unknown_columns:<a,b,c>` (comma-separated unrecognized CSV column names). Empty when none.
|
|
2774
2774
|
*/
|
|
2775
2775
|
warnings?: Array<(string)>;
|
|
2776
2776
|
/**
|
|
@@ -5989,6 +5989,10 @@ type PostAnalytics = {
|
|
|
5989
5989
|
type PostCreateResponse = {
|
|
5990
5990
|
message?: string;
|
|
5991
5991
|
post?: Post;
|
|
5992
|
+
/**
|
|
5993
|
+
* Advisory notices about a post that was still created: media truncated for a platform, a recycling caveat, or a field that was ignored because it sat outside platforms[].platformSpecificData. Absent when there are none.
|
|
5994
|
+
*/
|
|
5995
|
+
warnings?: Array<(string)>;
|
|
5992
5996
|
};
|
|
5993
5997
|
type PostDeleteResponse = {
|
|
5994
5998
|
message?: string;
|
|
@@ -30084,8 +30088,8 @@ type UpdateAdData = {
|
|
|
30084
30088
|
type?: 'daily' | 'lifetime';
|
|
30085
30089
|
};
|
|
30086
30090
|
/**
|
|
30087
|
-
* Meta + TikTok (demographics/interests)
|
|
30088
|
-
* Pinterest / X
|
|
30091
|
+
* Meta + TikTok (demographics/interests), Google (keyword edits only),
|
|
30092
|
+
* and LinkedIn (geo countries). Pinterest / X return 501.
|
|
30089
30093
|
*
|
|
30090
30094
|
*/
|
|
30091
30095
|
targeting?: {
|
|
@@ -30119,7 +30123,7 @@ type UpdateAdData = {
|
|
|
30119
30123
|
advantage_audience?: 0 | 1;
|
|
30120
30124
|
};
|
|
30121
30125
|
/**
|
|
30122
|
-
* Replace the ad's creative. Meta
|
|
30126
|
+
* Replace the ad's creative. Meta, TikTok, and LinkedIn.
|
|
30123
30127
|
*
|
|
30124
30128
|
* - **Meta**: requires `headline`, `body`, `callToAction`, `linkUrl`, `imageUrl`. The
|
|
30125
30129
|
* ad's existing creative is replaced via a new `/act_X/adcreatives` upload + ad
|
|
@@ -30127,6 +30131,9 @@ type UpdateAdData = {
|
|
|
30127
30131
|
* - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives
|
|
30128
30132
|
* have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes
|
|
30129
30133
|
* `landing_page_url`; `videoUrl` triggers a fresh upload.
|
|
30134
|
+
* - **LinkedIn**: uploads new media (image via `imageUrl` or video via `videoUrl`),
|
|
30135
|
+
* creates a new inline media creative on the same campaign, and pauses the old
|
|
30136
|
+
* creative (best-effort). The old creative is retained for historical reporting.
|
|
30130
30137
|
*
|
|
30131
30138
|
*/
|
|
30132
30139
|
creative?: {
|
|
@@ -32037,6 +32044,14 @@ type BoostPostData = {
|
|
|
32037
32044
|
*
|
|
32038
32045
|
*/
|
|
32039
32046
|
dsaPayor?: string;
|
|
32047
|
+
/**
|
|
32048
|
+
* Lead Gen form ID to attach to the boosted ad's creative. REQUIRED when `goal` is `lead_generation`. On Meta this is the leadgen_forms ID (create one via POST /v1/ads/lead-forms). On LinkedIn this is the adForm ID (create one via POST /v1/ads/lead-forms with a LinkedIn account); the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}`. Ignored for other goals.
|
|
32049
|
+
*/
|
|
32050
|
+
leadGenFormId?: string;
|
|
32051
|
+
/**
|
|
32052
|
+
* Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
32053
|
+
*/
|
|
32054
|
+
status?: 'ACTIVE' | 'PAUSED';
|
|
32040
32055
|
/**
|
|
32041
32056
|
* Meta only. Explicit ad-set `optimization_goal` override. When omitted,
|
|
32042
32057
|
* defaults to the value derived from `goal`. The value must be compatible
|
|
@@ -32113,8 +32128,9 @@ type CreateStandaloneAdData = {
|
|
|
32113
32128
|
*
|
|
32114
32129
|
* **LinkedIn**
|
|
32115
32130
|
* - `engagement`, `traffic`, `awareness` and `video_views` create standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`.
|
|
32131
|
+
* - `lead_generation`: requires `leadGenFormId` (an adForm ID from POST /v1/ads/lead-forms). The campaign objective is set to MAX_LEAD and the creative's `leadgenCallToAction` destination is set to `urn:li:adForm:{id}`.
|
|
32116
32132
|
* - `job_applicants` requires a `platformSpecificData.jobs` creative.
|
|
32117
|
-
* - For `
|
|
32133
|
+
* - For `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost.
|
|
32118
32134
|
*
|
|
32119
32135
|
* **OpenAI Ads**
|
|
32120
32136
|
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422.
|
|
@@ -32160,7 +32176,7 @@ type CreateStandaloneAdData = {
|
|
|
32160
32176
|
*/
|
|
32161
32177
|
budgetType?: 'daily' | 'lifetime';
|
|
32162
32178
|
/**
|
|
32163
|
-
* Meta and
|
|
32179
|
+
* Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
32164
32180
|
*/
|
|
32165
32181
|
status?: 'ACTIVE' | 'PAUSED';
|
|
32166
32182
|
/**
|
|
@@ -32208,7 +32224,7 @@ type CreateStandaloneAdData = {
|
|
|
32208
32224
|
*/
|
|
32209
32225
|
linkUrl?: string;
|
|
32210
32226
|
/**
|
|
32211
|
-
*
|
|
32227
|
+
* Lead Gen form ID to attach to the ad's creative. REQUIRED when `goal` is `lead_generation`. Create one via POST /v1/ads/lead-forms. On Meta (facebook/instagram) this is the leadgen_forms ID; the ad set's promoted_object.page_id + LEAD_GENERATION optimization + destination_type ON_AD are derived automatically from the goal. On LinkedIn this is the adForm ID; the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}` and the campaign objective is set to MAX_LEAD. Forms must be owned by the sponsoredAccount (not the organization) for the URN to resolve. Also required on every Meta ATTACH (`adSetId`) call that targets a lead ad set (the form attaches per-ad; Meta rejects a formless ad in a lead ad set). Both `placementAssets` (per-placement creative) and `dynamicCreative` (multi-text / multi-asset pool, e.g. multiple headlines and primary texts) ARE supported on Meta instant-form lead ads.
|
|
32212
32228
|
*/
|
|
32213
32229
|
leadGenFormId?: string;
|
|
32214
32230
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2770,7 +2770,7 @@ type BulkUploadResult = {
|
|
|
2770
2770
|
errors?: Array<(string)>;
|
|
2771
2771
|
}>;
|
|
2772
2772
|
/**
|
|
2773
|
-
* Top-level advisory warnings
|
|
2773
|
+
* Top-level advisory warnings, e.g. `rows_exceed_advisory_limit:500` or `unknown_columns:<a,b,c>` (comma-separated unrecognized CSV column names). Empty when none.
|
|
2774
2774
|
*/
|
|
2775
2775
|
warnings?: Array<(string)>;
|
|
2776
2776
|
/**
|
|
@@ -5989,6 +5989,10 @@ type PostAnalytics = {
|
|
|
5989
5989
|
type PostCreateResponse = {
|
|
5990
5990
|
message?: string;
|
|
5991
5991
|
post?: Post;
|
|
5992
|
+
/**
|
|
5993
|
+
* Advisory notices about a post that was still created: media truncated for a platform, a recycling caveat, or a field that was ignored because it sat outside platforms[].platformSpecificData. Absent when there are none.
|
|
5994
|
+
*/
|
|
5995
|
+
warnings?: Array<(string)>;
|
|
5992
5996
|
};
|
|
5993
5997
|
type PostDeleteResponse = {
|
|
5994
5998
|
message?: string;
|
|
@@ -30084,8 +30088,8 @@ type UpdateAdData = {
|
|
|
30084
30088
|
type?: 'daily' | 'lifetime';
|
|
30085
30089
|
};
|
|
30086
30090
|
/**
|
|
30087
|
-
* Meta + TikTok (demographics/interests)
|
|
30088
|
-
* Pinterest / X
|
|
30091
|
+
* Meta + TikTok (demographics/interests), Google (keyword edits only),
|
|
30092
|
+
* and LinkedIn (geo countries). Pinterest / X return 501.
|
|
30089
30093
|
*
|
|
30090
30094
|
*/
|
|
30091
30095
|
targeting?: {
|
|
@@ -30119,7 +30123,7 @@ type UpdateAdData = {
|
|
|
30119
30123
|
advantage_audience?: 0 | 1;
|
|
30120
30124
|
};
|
|
30121
30125
|
/**
|
|
30122
|
-
* Replace the ad's creative. Meta
|
|
30126
|
+
* Replace the ad's creative. Meta, TikTok, and LinkedIn.
|
|
30123
30127
|
*
|
|
30124
30128
|
* - **Meta**: requires `headline`, `body`, `callToAction`, `linkUrl`, `imageUrl`. The
|
|
30125
30129
|
* ad's existing creative is replaced via a new `/act_X/adcreatives` upload + ad
|
|
@@ -30127,6 +30131,9 @@ type UpdateAdData = {
|
|
|
30127
30131
|
* - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives
|
|
30128
30132
|
* have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes
|
|
30129
30133
|
* `landing_page_url`; `videoUrl` triggers a fresh upload.
|
|
30134
|
+
* - **LinkedIn**: uploads new media (image via `imageUrl` or video via `videoUrl`),
|
|
30135
|
+
* creates a new inline media creative on the same campaign, and pauses the old
|
|
30136
|
+
* creative (best-effort). The old creative is retained for historical reporting.
|
|
30130
30137
|
*
|
|
30131
30138
|
*/
|
|
30132
30139
|
creative?: {
|
|
@@ -32037,6 +32044,14 @@ type BoostPostData = {
|
|
|
32037
32044
|
*
|
|
32038
32045
|
*/
|
|
32039
32046
|
dsaPayor?: string;
|
|
32047
|
+
/**
|
|
32048
|
+
* Lead Gen form ID to attach to the boosted ad's creative. REQUIRED when `goal` is `lead_generation`. On Meta this is the leadgen_forms ID (create one via POST /v1/ads/lead-forms). On LinkedIn this is the adForm ID (create one via POST /v1/ads/lead-forms with a LinkedIn account); the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}`. Ignored for other goals.
|
|
32049
|
+
*/
|
|
32050
|
+
leadGenFormId?: string;
|
|
32051
|
+
/**
|
|
32052
|
+
* Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
32053
|
+
*/
|
|
32054
|
+
status?: 'ACTIVE' | 'PAUSED';
|
|
32040
32055
|
/**
|
|
32041
32056
|
* Meta only. Explicit ad-set `optimization_goal` override. When omitted,
|
|
32042
32057
|
* defaults to the value derived from `goal`. The value must be compatible
|
|
@@ -32113,8 +32128,9 @@ type CreateStandaloneAdData = {
|
|
|
32113
32128
|
*
|
|
32114
32129
|
* **LinkedIn**
|
|
32115
32130
|
* - `engagement`, `traffic`, `awareness` and `video_views` create standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`.
|
|
32131
|
+
* - `lead_generation`: requires `leadGenFormId` (an adForm ID from POST /v1/ads/lead-forms). The campaign objective is set to MAX_LEAD and the creative's `leadgenCallToAction` destination is set to `urn:li:adForm:{id}`.
|
|
32116
32132
|
* - `job_applicants` requires a `platformSpecificData.jobs` creative.
|
|
32117
|
-
* - For `
|
|
32133
|
+
* - For `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost.
|
|
32118
32134
|
*
|
|
32119
32135
|
* **OpenAI Ads**
|
|
32120
32136
|
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422.
|
|
@@ -32160,7 +32176,7 @@ type CreateStandaloneAdData = {
|
|
|
32160
32176
|
*/
|
|
32161
32177
|
budgetType?: 'daily' | 'lifetime';
|
|
32162
32178
|
/**
|
|
32163
|
-
* Meta and
|
|
32179
|
+
* Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
32164
32180
|
*/
|
|
32165
32181
|
status?: 'ACTIVE' | 'PAUSED';
|
|
32166
32182
|
/**
|
|
@@ -32208,7 +32224,7 @@ type CreateStandaloneAdData = {
|
|
|
32208
32224
|
*/
|
|
32209
32225
|
linkUrl?: string;
|
|
32210
32226
|
/**
|
|
32211
|
-
*
|
|
32227
|
+
* Lead Gen form ID to attach to the ad's creative. REQUIRED when `goal` is `lead_generation`. Create one via POST /v1/ads/lead-forms. On Meta (facebook/instagram) this is the leadgen_forms ID; the ad set's promoted_object.page_id + LEAD_GENERATION optimization + destination_type ON_AD are derived automatically from the goal. On LinkedIn this is the adForm ID; the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}` and the campaign objective is set to MAX_LEAD. Forms must be owned by the sponsoredAccount (not the organization) for the URN to resolve. Also required on every Meta ATTACH (`adSetId`) call that targets a lead ad set (the form attaches per-ad; Meta rejects a formless ad in a lead ad set). Both `placementAssets` (per-placement creative) and `dynamicCreative` (multi-text / multi-asset pool, e.g. multiple headlines and primary texts) ARE supported on Meta instant-form lead ads.
|
|
32212
32228
|
*/
|
|
32213
32229
|
leadGenFormId?: string;
|
|
32214
32230
|
/**
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
36
36
|
// package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@zernio/node",
|
|
39
|
-
version: "0.2.
|
|
39
|
+
version: "0.2.677",
|
|
40
40
|
description: "The official Node.js library for the Zernio API",
|
|
41
41
|
main: "dist/index.js",
|
|
42
42
|
module: "dist/index.mjs",
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@zernio/node",
|
|
8
|
-
version: "0.2.
|
|
8
|
+
version: "0.2.677",
|
|
9
9
|
description: "The official Node.js library for the Zernio API",
|
|
10
10
|
main: "dist/index.js",
|
|
11
11
|
module: "dist/index.mjs",
|
package/package.json
CHANGED
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -908,6 +908,25 @@ export const deletePost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
908
908
|
/**
|
|
909
909
|
* Bulk upload from CSV
|
|
910
910
|
* Create multiple posts by uploading a CSV file. Use dryRun=true to validate without creating posts.
|
|
911
|
+
*
|
|
912
|
+
* CSV columns:
|
|
913
|
+
* - Required: `platforms`, `profiles`, and a schedule (one of `schedule_time`, a `schedule_time_<platform>` override, `publish_now=true`, `use_queue=true`, or `is_draft=true`).
|
|
914
|
+
* - Content: at least one of `post_content`, `title`, or `media_urls` is required.
|
|
915
|
+
* - Aliases: a handful of columns accept the JSON field name from POST /v1/posts, since integrators infer the CSV shape from that endpoint's body. When both are present the real CSV column wins, unless it is blank for that row, in which case the alias value is used.
|
|
916
|
+
* - `content` aliases `post_content`
|
|
917
|
+
* - `timezone` aliases `tz`
|
|
918
|
+
* - `scheduledFor` aliases `schedule_time`
|
|
919
|
+
* - `mediaUrls` aliases `media_urls`
|
|
920
|
+
* - Per-platform overrides use three dynamic column prefixes, one column per platform (e.g. `schedule_time_instagram`, `custom_content_tiktok`, `custom_media_youtube`): `schedule_time_<platform>`, `custom_content_<platform>`, `custom_media_<platform>`.
|
|
921
|
+
* - Any other column is not read. It does not error, but it is reported in the response's `warnings` array as `unknown_columns:<a,b,c>` (see BulkUploadResult), so a misnamed or unsupported column is never silently dropped.
|
|
922
|
+
* - Row limits: 5000 rows is a hard cap that returns 400 above it. 500 rows is only an advisory threshold, it adds `rows_exceed_advisory_limit:500` to `warnings` and the request still processes.
|
|
923
|
+
*
|
|
924
|
+
* Example row (header + one data row):
|
|
925
|
+
* ```
|
|
926
|
+
* post_content,platforms,profiles,schedule_time,tz
|
|
927
|
+
* "Hello world",instagram,MyProfile,2026-09-01 10:00,America/New_York
|
|
928
|
+
* ```
|
|
929
|
+
*
|
|
911
930
|
*/
|
|
912
931
|
export const bulkUploadPosts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BulkUploadPostsData, ThrowOnError>) => {
|
|
913
932
|
return (options?.client ?? client).post<BulkUploadPostsResponse, BulkUploadPostsError, ThrowOnError>({
|
|
@@ -8006,7 +8025,10 @@ export const getAd = <ThrowOnError extends boolean = false>(options: OptionsLega
|
|
|
8006
8025
|
* kind on the ad group (criteria not in the list are removed); a kind left out is
|
|
8007
8026
|
* untouched. Any other `targeting` field returns 400: Google cannot mutate broad
|
|
8008
8027
|
* targeting post-create without recreating the campaign. `creative` returns 501.
|
|
8009
|
-
* - **
|
|
8028
|
+
* - **LinkedIn**: status, budget, targeting (geo countries only, applied to the
|
|
8029
|
+
* LinkedIn Campaign via PARTIAL_UPDATE), and creative (uploads new media, creates a
|
|
8030
|
+
* replacement inline creative on the same campaign, pauses the old one).
|
|
8031
|
+
* - **Pinterest / X / OpenAI Ads**: status + budget only. Sending
|
|
8010
8032
|
* `targeting` or `creative` returns 501 with code `unsupported_platform_operation`.
|
|
8011
8033
|
* OpenAI Ads budget is lifetime-only (see `budget.type` below).
|
|
8012
8034
|
*
|
|
@@ -1478,7 +1478,7 @@ export type BulkUploadResult = {
|
|
|
1478
1478
|
errors?: Array<(string)>;
|
|
1479
1479
|
}>;
|
|
1480
1480
|
/**
|
|
1481
|
-
* Top-level advisory warnings
|
|
1481
|
+
* Top-level advisory warnings, e.g. `rows_exceed_advisory_limit:500` or `unknown_columns:<a,b,c>` (comma-separated unrecognized CSV column names). Empty when none.
|
|
1482
1482
|
*/
|
|
1483
1483
|
warnings?: Array<(string)>;
|
|
1484
1484
|
/**
|
|
@@ -4821,6 +4821,10 @@ export type PostAnalytics = {
|
|
|
4821
4821
|
export type PostCreateResponse = {
|
|
4822
4822
|
message?: string;
|
|
4823
4823
|
post?: Post;
|
|
4824
|
+
/**
|
|
4825
|
+
* Advisory notices about a post that was still created: media truncated for a platform, a recycling caveat, or a field that was ignored because it sat outside platforms[].platformSpecificData. Absent when there are none.
|
|
4826
|
+
*/
|
|
4827
|
+
warnings?: Array<(string)>;
|
|
4824
4828
|
};
|
|
4825
4829
|
|
|
4826
4830
|
export type PostDeleteResponse = {
|
|
@@ -30549,8 +30553,8 @@ export type UpdateAdData = {
|
|
|
30549
30553
|
type?: 'daily' | 'lifetime';
|
|
30550
30554
|
};
|
|
30551
30555
|
/**
|
|
30552
|
-
* Meta + TikTok (demographics/interests)
|
|
30553
|
-
* Pinterest / X
|
|
30556
|
+
* Meta + TikTok (demographics/interests), Google (keyword edits only),
|
|
30557
|
+
* and LinkedIn (geo countries). Pinterest / X return 501.
|
|
30554
30558
|
*
|
|
30555
30559
|
*/
|
|
30556
30560
|
targeting?: {
|
|
@@ -30584,7 +30588,7 @@ export type UpdateAdData = {
|
|
|
30584
30588
|
advantage_audience?: 0 | 1;
|
|
30585
30589
|
};
|
|
30586
30590
|
/**
|
|
30587
|
-
* Replace the ad's creative. Meta
|
|
30591
|
+
* Replace the ad's creative. Meta, TikTok, and LinkedIn.
|
|
30588
30592
|
*
|
|
30589
30593
|
* - **Meta**: requires `headline`, `body`, `callToAction`, `linkUrl`, `imageUrl`. The
|
|
30590
30594
|
* ad's existing creative is replaced via a new `/act_X/adcreatives` upload + ad
|
|
@@ -30592,6 +30596,9 @@ export type UpdateAdData = {
|
|
|
30592
30596
|
* - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives
|
|
30593
30597
|
* have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes
|
|
30594
30598
|
* `landing_page_url`; `videoUrl` triggers a fresh upload.
|
|
30599
|
+
* - **LinkedIn**: uploads new media (image via `imageUrl` or video via `videoUrl`),
|
|
30600
|
+
* creates a new inline media creative on the same campaign, and pauses the old
|
|
30601
|
+
* creative (best-effort). The old creative is retained for historical reporting.
|
|
30595
30602
|
*
|
|
30596
30603
|
*/
|
|
30597
30604
|
creative?: {
|
|
@@ -32631,6 +32638,14 @@ export type BoostPostData = {
|
|
|
32631
32638
|
*
|
|
32632
32639
|
*/
|
|
32633
32640
|
dsaPayor?: string;
|
|
32641
|
+
/**
|
|
32642
|
+
* Lead Gen form ID to attach to the boosted ad's creative. REQUIRED when `goal` is `lead_generation`. On Meta this is the leadgen_forms ID (create one via POST /v1/ads/lead-forms). On LinkedIn this is the adForm ID (create one via POST /v1/ads/lead-forms with a LinkedIn account); the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}`. Ignored for other goals.
|
|
32643
|
+
*/
|
|
32644
|
+
leadGenFormId?: string;
|
|
32645
|
+
/**
|
|
32646
|
+
* Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
32647
|
+
*/
|
|
32648
|
+
status?: 'ACTIVE' | 'PAUSED';
|
|
32634
32649
|
/**
|
|
32635
32650
|
* Meta only. Explicit ad-set `optimization_goal` override. When omitted,
|
|
32636
32651
|
* defaults to the value derived from `goal`. The value must be compatible
|
|
@@ -32710,8 +32725,9 @@ export type CreateStandaloneAdData = {
|
|
|
32710
32725
|
*
|
|
32711
32726
|
* **LinkedIn**
|
|
32712
32727
|
* - `engagement`, `traffic`, `awareness` and `video_views` create standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`.
|
|
32728
|
+
* - `lead_generation`: requires `leadGenFormId` (an adForm ID from POST /v1/ads/lead-forms). The campaign objective is set to MAX_LEAD and the creative's `leadgenCallToAction` destination is set to `urn:li:adForm:{id}`.
|
|
32713
32729
|
* - `job_applicants` requires a `platformSpecificData.jobs` creative.
|
|
32714
|
-
* - For `
|
|
32730
|
+
* - For `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost.
|
|
32715
32731
|
*
|
|
32716
32732
|
* **OpenAI Ads**
|
|
32717
32733
|
* - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422.
|
|
@@ -32757,7 +32773,7 @@ export type CreateStandaloneAdData = {
|
|
|
32757
32773
|
*/
|
|
32758
32774
|
budgetType?: 'daily' | 'lifetime';
|
|
32759
32775
|
/**
|
|
32760
|
-
* Meta and
|
|
32776
|
+
* Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
32761
32777
|
*/
|
|
32762
32778
|
status?: 'ACTIVE' | 'PAUSED';
|
|
32763
32779
|
/**
|
|
@@ -32805,7 +32821,7 @@ export type CreateStandaloneAdData = {
|
|
|
32805
32821
|
*/
|
|
32806
32822
|
linkUrl?: string;
|
|
32807
32823
|
/**
|
|
32808
|
-
*
|
|
32824
|
+
* Lead Gen form ID to attach to the ad's creative. REQUIRED when `goal` is `lead_generation`. Create one via POST /v1/ads/lead-forms. On Meta (facebook/instagram) this is the leadgen_forms ID; the ad set's promoted_object.page_id + LEAD_GENERATION optimization + destination_type ON_AD are derived automatically from the goal. On LinkedIn this is the adForm ID; the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}` and the campaign objective is set to MAX_LEAD. Forms must be owned by the sponsoredAccount (not the organization) for the URN to resolve. Also required on every Meta ATTACH (`adSetId`) call that targets a lead ad set (the form attaches per-ad; Meta rejects a formless ad in a lead ad set). Both `placementAssets` (per-placement creative) and `dynamicCreative` (multi-text / multi-asset pool, e.g. multiple headlines and primary texts) ARE supported on Meta instant-form lead ads.
|
|
32809
32825
|
*/
|
|
32810
32826
|
leadGenFormId?: string;
|
|
32811
32827
|
/**
|