@zernio/node 0.2.713 → 0.2.715
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 +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +10 -3
- package/src/generated/types.gen.ts +31 -1
package/dist/index.d.mts
CHANGED
|
@@ -2012,6 +2012,10 @@ type AdMetrics = {
|
|
|
2012
2012
|
* Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
2013
2013
|
*/
|
|
2014
2014
|
conversions?: number;
|
|
2015
|
+
/**
|
|
2016
|
+
* All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
2017
|
+
*/
|
|
2018
|
+
allConversions?: number;
|
|
2015
2019
|
/**
|
|
2016
2020
|
* Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
2017
2021
|
*/
|
|
@@ -2160,6 +2164,10 @@ type AdsTimelineResponse = {
|
|
|
2160
2164
|
* Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
|
|
2161
2165
|
*/
|
|
2162
2166
|
conversions?: number;
|
|
2167
|
+
/**
|
|
2168
|
+
* All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
2169
|
+
*/
|
|
2170
|
+
allConversions?: number;
|
|
2163
2171
|
costPerConversion?: number;
|
|
2164
2172
|
/**
|
|
2165
2173
|
* Per-action-type counts merged across all ads on this day. Keys are platform-native action types.
|
|
@@ -12622,6 +12630,9 @@ type CreatePostData = {
|
|
|
12622
12630
|
* Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
|
|
12623
12631
|
*/
|
|
12624
12632
|
content?: string;
|
|
12633
|
+
/**
|
|
12634
|
+
* Media attached to every platform in the request (a platform entry can override it with `customMedia`). Each entry needs a publicly reachable HTTPS `url`; `type` (image, video, gif, document) is inferred from the URL extension when omitted and a `type` that contradicts the extension is rejected with 400. Upload files with `POST /v1/media/presign` first; per-platform size, duration and format limits are listed on each platform schema.
|
|
12635
|
+
*/
|
|
12625
12636
|
mediaItems?: Array<MediaItem>;
|
|
12626
12637
|
/**
|
|
12627
12638
|
* Target platforms and accounts for this post. Required for non-draft posts (returns 400 if empty). Drafts can omit platforms.
|
|
@@ -12640,12 +12651,21 @@ type CreatePostData = {
|
|
|
12640
12651
|
scheduledFor?: string;
|
|
12641
12652
|
platformSpecificData?: (TwitterPlatformData | ThreadsPlatformData | FacebookPlatformData | InstagramPlatformData | LinkedInPlatformData | PinterestPlatformData | YouTubePlatformData | GoogleBusinessPlatformData | TikTokPlatformData | TelegramPlatformData | SnapchatPlatformData | RedditPlatformData | BlueskyPlatformData | DiscordPlatformData | SlackPlatformData);
|
|
12642
12653
|
}>;
|
|
12654
|
+
/**
|
|
12655
|
+
* When to publish. Required unless `publishNow` is true, `queuedFromProfile` is set, or the post is a draft. An ISO 8601 value with a `Z` or offset (`2026-01-15T10:00:00Z`, `2026-01-15T11:00:00+01:00`) is taken as-is; a value without one (`2026-01-15T10:00:00` or `2026-01-15 10:00`) is read as local time in `timezone`. A value already in the past is published synchronously in the same request. Ignored when `publishNow` is true.
|
|
12656
|
+
*/
|
|
12643
12657
|
scheduledFor?: string;
|
|
12658
|
+
/**
|
|
12659
|
+
* Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and `platformPostUrl`, with HTTP 207 when some platforms failed. Takes precedence over `scheduledFor`; ignored when `isDraft` is true.
|
|
12660
|
+
*/
|
|
12644
12661
|
publishNow?: boolean;
|
|
12645
12662
|
/**
|
|
12646
12663
|
* When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
|
|
12647
12664
|
*/
|
|
12648
12665
|
isDraft?: boolean;
|
|
12666
|
+
/**
|
|
12667
|
+
* IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.
|
|
12668
|
+
*/
|
|
12649
12669
|
timezone?: string;
|
|
12650
12670
|
/**
|
|
12651
12671
|
* Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.
|
|
@@ -12659,7 +12679,13 @@ type CreatePostData = {
|
|
|
12659
12679
|
* Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field.
|
|
12660
12680
|
*/
|
|
12661
12681
|
mentions?: Array<(string)>;
|
|
12682
|
+
/**
|
|
12683
|
+
* Stored on the post and echoed back on reads. Publishing does not branch on it: every entry in `platforms` is published regardless, so treat it as a label for your own tooling.
|
|
12684
|
+
*/
|
|
12662
12685
|
crosspostingEnabled?: boolean;
|
|
12686
|
+
/**
|
|
12687
|
+
* Free-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. Zernio also writes the bookkeeping keys `usageCounted`, `usageRefunded` and `hidden` into this object; do not set them, and they are stripped from webhook payloads.
|
|
12688
|
+
*/
|
|
12663
12689
|
metadata?: {
|
|
12664
12690
|
[key: string]: unknown;
|
|
12665
12691
|
};
|
|
@@ -13906,7 +13932,7 @@ type CreateInviteTokenError = (unknown | {
|
|
|
13906
13932
|
type GetConnectUrlData = {
|
|
13907
13933
|
path: {
|
|
13908
13934
|
/**
|
|
13909
|
-
* Social media platform to connect
|
|
13935
|
+
* Social media platform to connect. `snapchat` is a closed beta with no public release date: it returns 403 `PLATFORM_BETA_RESTRICTED` until the account is approved.
|
|
13910
13936
|
*/
|
|
13911
13937
|
platform: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'reddit' | 'pinterest' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp';
|
|
13912
13938
|
};
|
|
@@ -36043,6 +36069,10 @@ type CreateTrackingTagData = {
|
|
|
36043
36069
|
*/
|
|
36044
36070
|
adAccountId: string;
|
|
36045
36071
|
name: string;
|
|
36072
|
+
/**
|
|
36073
|
+
* OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
|
|
36074
|
+
*/
|
|
36075
|
+
defaultEventType?: 'order_created' | 'lead_created' | 'items_added' | 'contents_viewed' | 'checkout_started' | 'registration_completed' | 'subscription_created' | 'trial_started' | 'appointment_scheduled' | 'page_viewed' | 'app_installed' | 'app_opened';
|
|
36046
36076
|
};
|
|
36047
36077
|
path: {
|
|
36048
36078
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -2012,6 +2012,10 @@ type AdMetrics = {
|
|
|
2012
2012
|
* Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
2013
2013
|
*/
|
|
2014
2014
|
conversions?: number;
|
|
2015
|
+
/**
|
|
2016
|
+
* All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
2017
|
+
*/
|
|
2018
|
+
allConversions?: number;
|
|
2015
2019
|
/**
|
|
2016
2020
|
* Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
2017
2021
|
*/
|
|
@@ -2160,6 +2164,10 @@ type AdsTimelineResponse = {
|
|
|
2160
2164
|
* Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
|
|
2161
2165
|
*/
|
|
2162
2166
|
conversions?: number;
|
|
2167
|
+
/**
|
|
2168
|
+
* All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
2169
|
+
*/
|
|
2170
|
+
allConversions?: number;
|
|
2163
2171
|
costPerConversion?: number;
|
|
2164
2172
|
/**
|
|
2165
2173
|
* Per-action-type counts merged across all ads on this day. Keys are platform-native action types.
|
|
@@ -12622,6 +12630,9 @@ type CreatePostData = {
|
|
|
12622
12630
|
* Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
|
|
12623
12631
|
*/
|
|
12624
12632
|
content?: string;
|
|
12633
|
+
/**
|
|
12634
|
+
* Media attached to every platform in the request (a platform entry can override it with `customMedia`). Each entry needs a publicly reachable HTTPS `url`; `type` (image, video, gif, document) is inferred from the URL extension when omitted and a `type` that contradicts the extension is rejected with 400. Upload files with `POST /v1/media/presign` first; per-platform size, duration and format limits are listed on each platform schema.
|
|
12635
|
+
*/
|
|
12625
12636
|
mediaItems?: Array<MediaItem>;
|
|
12626
12637
|
/**
|
|
12627
12638
|
* Target platforms and accounts for this post. Required for non-draft posts (returns 400 if empty). Drafts can omit platforms.
|
|
@@ -12640,12 +12651,21 @@ type CreatePostData = {
|
|
|
12640
12651
|
scheduledFor?: string;
|
|
12641
12652
|
platformSpecificData?: (TwitterPlatformData | ThreadsPlatformData | FacebookPlatformData | InstagramPlatformData | LinkedInPlatformData | PinterestPlatformData | YouTubePlatformData | GoogleBusinessPlatformData | TikTokPlatformData | TelegramPlatformData | SnapchatPlatformData | RedditPlatformData | BlueskyPlatformData | DiscordPlatformData | SlackPlatformData);
|
|
12642
12653
|
}>;
|
|
12654
|
+
/**
|
|
12655
|
+
* When to publish. Required unless `publishNow` is true, `queuedFromProfile` is set, or the post is a draft. An ISO 8601 value with a `Z` or offset (`2026-01-15T10:00:00Z`, `2026-01-15T11:00:00+01:00`) is taken as-is; a value without one (`2026-01-15T10:00:00` or `2026-01-15 10:00`) is read as local time in `timezone`. A value already in the past is published synchronously in the same request. Ignored when `publishNow` is true.
|
|
12656
|
+
*/
|
|
12643
12657
|
scheduledFor?: string;
|
|
12658
|
+
/**
|
|
12659
|
+
* Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and `platformPostUrl`, with HTTP 207 when some platforms failed. Takes precedence over `scheduledFor`; ignored when `isDraft` is true.
|
|
12660
|
+
*/
|
|
12644
12661
|
publishNow?: boolean;
|
|
12645
12662
|
/**
|
|
12646
12663
|
* When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
|
|
12647
12664
|
*/
|
|
12648
12665
|
isDraft?: boolean;
|
|
12666
|
+
/**
|
|
12667
|
+
* IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.
|
|
12668
|
+
*/
|
|
12649
12669
|
timezone?: string;
|
|
12650
12670
|
/**
|
|
12651
12671
|
* Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.
|
|
@@ -12659,7 +12679,13 @@ type CreatePostData = {
|
|
|
12659
12679
|
* Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field.
|
|
12660
12680
|
*/
|
|
12661
12681
|
mentions?: Array<(string)>;
|
|
12682
|
+
/**
|
|
12683
|
+
* Stored on the post and echoed back on reads. Publishing does not branch on it: every entry in `platforms` is published regardless, so treat it as a label for your own tooling.
|
|
12684
|
+
*/
|
|
12662
12685
|
crosspostingEnabled?: boolean;
|
|
12686
|
+
/**
|
|
12687
|
+
* Free-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. Zernio also writes the bookkeeping keys `usageCounted`, `usageRefunded` and `hidden` into this object; do not set them, and they are stripped from webhook payloads.
|
|
12688
|
+
*/
|
|
12663
12689
|
metadata?: {
|
|
12664
12690
|
[key: string]: unknown;
|
|
12665
12691
|
};
|
|
@@ -13906,7 +13932,7 @@ type CreateInviteTokenError = (unknown | {
|
|
|
13906
13932
|
type GetConnectUrlData = {
|
|
13907
13933
|
path: {
|
|
13908
13934
|
/**
|
|
13909
|
-
* Social media platform to connect
|
|
13935
|
+
* Social media platform to connect. `snapchat` is a closed beta with no public release date: it returns 403 `PLATFORM_BETA_RESTRICTED` until the account is approved.
|
|
13910
13936
|
*/
|
|
13911
13937
|
platform: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'reddit' | 'pinterest' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp';
|
|
13912
13938
|
};
|
|
@@ -36043,6 +36069,10 @@ type CreateTrackingTagData = {
|
|
|
36043
36069
|
*/
|
|
36044
36070
|
adAccountId: string;
|
|
36045
36071
|
name: string;
|
|
36072
|
+
/**
|
|
36073
|
+
* OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
|
|
36074
|
+
*/
|
|
36075
|
+
defaultEventType?: 'order_created' | 'lead_created' | 'items_added' | 'contents_viewed' | 'checkout_started' | 'registration_completed' | 'subscription_created' | 'trial_started' | 'appointment_scheduled' | 'page_viewed' | 'app_installed' | 'app_opened';
|
|
36046
36076
|
};
|
|
36047
36077
|
path: {
|
|
36048
36078
|
/**
|
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.715",
|
|
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.715",
|
|
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
|
@@ -876,6 +876,10 @@ export const listPosts = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
876
876
|
* Create and optionally publish a post. Immediate posts (`publishNow: true`) include `platformPostUrl` in the response.
|
|
877
877
|
* Content is optional when media is attached, all platforms have `customContent`, every platform entry is an X Article (`platformSpecificData.article`), or every platform entry is a LinkedIn text-free reshare (`platformSpecificData.reshareUrl` with no text). See each platform's schema for media constraints.
|
|
878
878
|
*
|
|
879
|
+
* ## Scheduling
|
|
880
|
+
*
|
|
881
|
+
* Pick one of `scheduledFor` (schedule), `publishNow: true` (publish synchronously) or `queuedFromProfile` (next queue slot). With none of them and `isDraft` unset, the post is saved as a draft. `platforms` is required unless the post is a draft. `isDraft: true` wins over `publishNow` and `scheduledFor` (the post is saved, never published); `publishNow: true` wins over `scheduledFor`. A `scheduledFor` already in the past is not rejected: the post is published synchronously in the same request, exactly like `publishNow`.
|
|
882
|
+
*
|
|
879
883
|
* ## Idempotency
|
|
880
884
|
*
|
|
881
885
|
* Two layers of duplicate-protection apply, so safe-to-retry callers (network blips, n8n / Zapier retries, etc.) don't accidentally double-post.
|
|
@@ -3265,7 +3269,7 @@ export const getWebhookSettings = <ThrowOnError extends boolean = false>(options
|
|
|
3265
3269
|
*
|
|
3266
3270
|
* `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation.
|
|
3267
3271
|
*
|
|
3268
|
-
* Webhooks are
|
|
3272
|
+
* Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`.
|
|
3269
3273
|
*
|
|
3270
3274
|
* A restricted (zrk_) API key can only subscribe to events whose resource group
|
|
3271
3275
|
* the key holds; an event outside the key's groups is rejected with 403, so a
|
|
@@ -3293,7 +3297,7 @@ export const createWebhookSettings = <ThrowOnError extends boolean = false>(opti
|
|
|
3293
3297
|
*
|
|
3294
3298
|
* When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation.
|
|
3295
3299
|
*
|
|
3296
|
-
* Webhooks are
|
|
3300
|
+
* Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`.
|
|
3297
3301
|
*
|
|
3298
3302
|
* A restricted (zrk_) API key can only set `events` to events whose resource
|
|
3299
3303
|
* group the key holds; an event outside the key's groups is rejected with 403.
|
|
@@ -8156,6 +8160,8 @@ export const getAdTree = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
8156
8160
|
* and `backfillPending: true` while the rest is backfilled in the background;
|
|
8157
8161
|
* repeat the request shortly until it returns 200 with full data.
|
|
8158
8162
|
*
|
|
8163
|
+
* With adAccountId set to a Google customer id this is the customer-level performance report (clicks, cost, impressions, conversions, all conversions per day).
|
|
8164
|
+
*
|
|
8159
8165
|
*/
|
|
8160
8166
|
export const getAdsTimeline = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetAdsTimelineData, ThrowOnError>) => {
|
|
8161
8167
|
return (options?.client ?? client).get<GetAdsTimelineResponse, GetAdsTimelineError, ThrowOnError>({
|
|
@@ -9997,7 +10003,8 @@ export const listTrackingTags = <ThrowOnError extends boolean = false>(options:
|
|
|
9997
10003
|
* pixel.
|
|
9998
10004
|
*
|
|
9999
10005
|
* NOT idempotent on either platform: each call creates a new pixel (and,
|
|
10000
|
-
* for OpenAI, a new Conversions API key
|
|
10006
|
+
* for OpenAI, a new Conversions API key plus, with `defaultEventType`, a
|
|
10007
|
+
* new conversion event setting). Do not retry blindly on
|
|
10001
10008
|
* timeout. Meta (platform `metaads`) and OpenAI Ads (platform
|
|
10002
10009
|
* `openaiads`); other platforms return 405.
|
|
10003
10010
|
*
|
|
@@ -686,6 +686,10 @@ export type AdMetrics = {
|
|
|
686
686
|
* Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
687
687
|
*/
|
|
688
688
|
conversions?: number;
|
|
689
|
+
/**
|
|
690
|
+
* All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
691
|
+
*/
|
|
692
|
+
allConversions?: number;
|
|
689
693
|
/**
|
|
690
694
|
* Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
691
695
|
*/
|
|
@@ -838,6 +842,10 @@ export type AdsTimelineResponse = {
|
|
|
838
842
|
* Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
|
|
839
843
|
*/
|
|
840
844
|
conversions?: number;
|
|
845
|
+
/**
|
|
846
|
+
* All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
847
|
+
*/
|
|
848
|
+
allConversions?: number;
|
|
841
849
|
costPerConversion?: number;
|
|
842
850
|
/**
|
|
843
851
|
* Per-action-type counts merged across all ads on this day. Keys are platform-native action types.
|
|
@@ -11776,6 +11784,9 @@ export type CreatePostData = {
|
|
|
11776
11784
|
* Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
|
|
11777
11785
|
*/
|
|
11778
11786
|
content?: string;
|
|
11787
|
+
/**
|
|
11788
|
+
* Media attached to every platform in the request (a platform entry can override it with `customMedia`). Each entry needs a publicly reachable HTTPS `url`; `type` (image, video, gif, document) is inferred from the URL extension when omitted and a `type` that contradicts the extension is rejected with 400. Upload files with `POST /v1/media/presign` first; per-platform size, duration and format limits are listed on each platform schema.
|
|
11789
|
+
*/
|
|
11779
11790
|
mediaItems?: Array<MediaItem>;
|
|
11780
11791
|
/**
|
|
11781
11792
|
* Target platforms and accounts for this post. Required for non-draft posts (returns 400 if empty). Drafts can omit platforms.
|
|
@@ -11794,12 +11805,21 @@ export type CreatePostData = {
|
|
|
11794
11805
|
scheduledFor?: string;
|
|
11795
11806
|
platformSpecificData?: (TwitterPlatformData | ThreadsPlatformData | FacebookPlatformData | InstagramPlatformData | LinkedInPlatformData | PinterestPlatformData | YouTubePlatformData | GoogleBusinessPlatformData | TikTokPlatformData | TelegramPlatformData | SnapchatPlatformData | RedditPlatformData | BlueskyPlatformData | DiscordPlatformData | SlackPlatformData);
|
|
11796
11807
|
}>;
|
|
11808
|
+
/**
|
|
11809
|
+
* When to publish. Required unless `publishNow` is true, `queuedFromProfile` is set, or the post is a draft. An ISO 8601 value with a `Z` or offset (`2026-01-15T10:00:00Z`, `2026-01-15T11:00:00+01:00`) is taken as-is; a value without one (`2026-01-15T10:00:00` or `2026-01-15 10:00`) is read as local time in `timezone`. A value already in the past is published synchronously in the same request. Ignored when `publishNow` is true.
|
|
11810
|
+
*/
|
|
11797
11811
|
scheduledFor?: string;
|
|
11812
|
+
/**
|
|
11813
|
+
* Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and `platformPostUrl`, with HTTP 207 when some platforms failed. Takes precedence over `scheduledFor`; ignored when `isDraft` is true.
|
|
11814
|
+
*/
|
|
11798
11815
|
publishNow?: boolean;
|
|
11799
11816
|
/**
|
|
11800
11817
|
* When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
|
|
11801
11818
|
*/
|
|
11802
11819
|
isDraft?: boolean;
|
|
11820
|
+
/**
|
|
11821
|
+
* IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.
|
|
11822
|
+
*/
|
|
11803
11823
|
timezone?: string;
|
|
11804
11824
|
/**
|
|
11805
11825
|
* Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.
|
|
@@ -11813,7 +11833,13 @@ export type CreatePostData = {
|
|
|
11813
11833
|
* Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field.
|
|
11814
11834
|
*/
|
|
11815
11835
|
mentions?: Array<(string)>;
|
|
11836
|
+
/**
|
|
11837
|
+
* Stored on the post and echoed back on reads. Publishing does not branch on it: every entry in `platforms` is published regardless, so treat it as a label for your own tooling.
|
|
11838
|
+
*/
|
|
11816
11839
|
crosspostingEnabled?: boolean;
|
|
11840
|
+
/**
|
|
11841
|
+
* Free-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. Zernio also writes the bookkeeping keys `usageCounted`, `usageRefunded` and `hidden` into this object; do not set them, and they are stripped from webhook payloads.
|
|
11842
|
+
*/
|
|
11817
11843
|
metadata?: {
|
|
11818
11844
|
[key: string]: unknown;
|
|
11819
11845
|
};
|
|
@@ -13161,7 +13187,7 @@ export type CreateInviteTokenError = (unknown | {
|
|
|
13161
13187
|
export type GetConnectUrlData = {
|
|
13162
13188
|
path: {
|
|
13163
13189
|
/**
|
|
13164
|
-
* Social media platform to connect
|
|
13190
|
+
* Social media platform to connect. `snapchat` is a closed beta with no public release date: it returns 403 `PLATFORM_BETA_RESTRICTED` until the account is approved.
|
|
13165
13191
|
*/
|
|
13166
13192
|
platform: 'facebook' | 'instagram' | 'linkedin' | 'twitter' | 'tiktok' | 'youtube' | 'threads' | 'reddit' | 'pinterest' | 'bluesky' | 'googlebusiness' | 'telegram' | 'snapchat' | 'discord' | 'slack' | 'whatsapp';
|
|
13167
13193
|
};
|
|
@@ -36792,6 +36818,10 @@ export type CreateTrackingTagData = {
|
|
|
36792
36818
|
*/
|
|
36793
36819
|
adAccountId: string;
|
|
36794
36820
|
name: string;
|
|
36821
|
+
/**
|
|
36822
|
+
* OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
|
|
36823
|
+
*/
|
|
36824
|
+
defaultEventType?: 'order_created' | 'lead_created' | 'items_added' | 'contents_viewed' | 'checkout_started' | 'registration_completed' | 'subscription_created' | 'trial_started' | 'appointment_scheduled' | 'page_viewed' | 'app_installed' | 'app_opened';
|
|
36795
36825
|
};
|
|
36796
36826
|
path: {
|
|
36797
36827
|
/**
|