Skip to content

Commit fa48555

Browse files
chore: regenerate from OpenAPI spec
- Auto-generated SDK updates - Version: 1.4.828
1 parent b28b2b8 commit fa48555

9 files changed

Lines changed: 115 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ Both `from zernio import ...` and `from late import ...` work identically. The `
531531
| `ad_creatives.list_ad_creatives()` | Creative library |
532532
| `ad_creatives.list_ad_images()` | Ad image library |
533533
| `ad_creatives.list_ad_videos()` | Ad video library |
534+
| `ad_creatives.list_ads_tik_tok_identities()` | List TikTok ad identities |
534535
| `ad_creatives.list_partnership_ad_content()` | List partnership ad content |
535536
| `ad_creatives.list_partnership_ad_permissions()` | List partnership permissions |
536537
| `ad_creatives.create_ad_creative()` | Create a standalone creative |

‎openapi.yaml‎

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.1.0
22
info:
33
title: Zernio API
4-
version: "1.20.3"
4+
version: "1.21.0"
55
description: |
66
API reference for Zernio. Authenticate with a Bearer API key.
77
Base URL: https://zernio.com/api
@@ -49205,6 +49205,43 @@ paths:
4920549205
'401': { $ref: '#/components/responses/Unauthorized' }
4920649206
'501': { description: Only supported on Meta (facebook/instagram) }
4920749207

49208+
/v1/ads/tiktok-identities:
49209+
get:
49210+
x-resource-group: "ads"
49211+
operationId: listAdsTikTokIdentities
49212+
tags: ["Ad Creatives"]
49213+
x-platforms: ["tiktok"]
49214+
summary: List TikTok ad identities
49215+
description: "The identities an ad on this TikTok advertiser may run as (the profile shown on the ad): the advertiser's own TikTok accounts (TT_USER), Business Center authorized accounts (BC_AUTH_TT) and custom brand identities (CUSTOMIZED_USER). Pass the chosen `identityId` on POST /v1/ads/create or POST /v1/ads/boost. Spark-post identities (AUTH_CODE) are not listed; a Spark code creates its own."
49216+
security:
49217+
- bearerAuth: []
49218+
parameters:
49219+
- { name: accountId, in: query, required: true, schema: { type: string }, description: "A tiktok or tiktokads account ID" }
49220+
- { name: adAccountId, in: query, required: true, schema: { type: string }, description: "TikTok advertiser ID" }
49221+
responses:
49222+
'200':
49223+
description: Identities
49224+
content:
49225+
application/json:
49226+
schema:
49227+
type: object
49228+
properties:
49229+
adAccountId: { type: string }
49230+
identities:
49231+
type: array
49232+
items:
49233+
type: object
49234+
properties:
49235+
identityId: { type: string }
49236+
identityType: { type: string, enum: [TT_USER, BC_AUTH_TT, CUSTOMIZED_USER] }
49237+
displayName: { type: [string, "null"] }
49238+
username: { type: [string, "null"] }
49239+
profileImage: { type: [string, "null"] }
49240+
identityAuthorizedBcId: { type: [string, "null"], description: "Business Center that authorized a BC_AUTH_TT identity" }
49241+
'400': { $ref: '#/components/responses/BadRequest' }
49242+
'401': { $ref: '#/components/responses/Unauthorized' }
49243+
'404': { $ref: '#/components/responses/AccountUnavailable' }
49244+
'409': { $ref: '#/components/responses/AccountConnectionRequired' }
4920849245
/v1/ads/instagram-accounts:
4920949246
get:
4921049247
operationId: listAdsInstagramAccounts
@@ -52178,6 +52215,8 @@ paths:
5217852215
goal: { type: string, enum: [engagement, traffic, awareness, video_views, lead_generation, conversions, app_promotion], description: "Available goals vary by platform. Meta (Facebook/Instagram) and TikTok support all 7. LinkedIn supports all except app_promotion. X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views." }
5217952216
adSetId: { type: string, description: "Meta, or TikTok with `smartPlus: true`. Attach the boosted post to this existing ad set instead of creating a campaign. On TikTok the id is an existing Smart+ ad group: the post is added as one more Spark ad in it (up to 30 per ad group), under the identity its `sparkAuthCode` creates; goal and budget are inherited from the Smart+ campaign; a regular ad group is rejected with a 400. Meta: The ad set then owns budget, schedule and targeting; sending those too is a 400." }
5218052217
existingCampaignId: { type: string, description: "TikTok only. Create the ad group and the Spark ad under this existing TikTok campaign instead of creating a new campaign. The campaign keeps its own status and objective (the objective must fit `goal`). Cannot be combined with adSetId or smartPlus. On Meta use POST /v1/ads/create with existingCampaignId." }
52218+
identityId: { type: string, description: "TikTok only. The identity the ad runs as (the profile shown on the ad), from GET /v1/ads/tiktok-identities. Default: the connected TikTok account's own identity. Must be authorized on the advertiser or the call fails naming the available ones." }
52219+
identityType: { type: string, enum: [TT_USER, CUSTOMIZED_USER, BC_AUTH_TT], description: "TikTok only. Type of identityId; resolved from the advertiser's identity list when omitted." }
5218152220
budget:
5218252221
type: object
5218352222
description: "Required unless adSetId is set."
@@ -53590,9 +53629,12 @@ paths:
5359053629
type: string
5359153630
format: uri
5359253631
description: Public URL of a square brand image (≥98×98 px, JPG/PNG). Used as the brand avatar on the ad.
53632+
identityId:
53633+
type: string
53634+
description: "TikTok: the identity the ad runs as, from GET /v1/ads/tiktok-identities. Overrides the connected account's own identity; must be authorized on the advertiser."
5359353635
identityType:
5359453636
type: string
53595-
enum: [TT_USER, CUSTOMIZED_USER]
53637+
enum: [TT_USER, CUSTOMIZED_USER, BC_AUTH_TT]
5359653638
description: |
5359753639
TikTok only. Forces the identity attribution on the ad:
5359853640

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "zernio-sdk"
3-
version = "1.4.827"
3+
version = "1.4.828"
44
description = "The official Python library for the Zernio API"
55
readme = "README.md"
66
requires-python = ">=3.10"

‎src/late/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
Visibility,
4343
)
4444

45-
__version__ = "1.4.827"
45+
__version__ = "1.4.828"
4646

4747
__all__ = [
4848
# Client

‎src/late/mcp/generated_tools.py‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4776,6 +4776,8 @@ def ad_campaigns_boost_post(
47764776
ad_set_name: str | None = None,
47774777
ad_set_id: str | None = None,
47784778
existing_campaign_id: str | None = None,
4779+
identity_id: str | None = None,
4780+
identity_type: str | None = None,
47794781
budget: dict[str, Any] | None = None,
47804782
instagram_account_id: str | None = None,
47814783
destination_type: str | None = None,
@@ -4820,6 +4822,8 @@ def ad_campaigns_boost_post(
48204822
goal: Available goals vary by platform. Meta (Facebook/Instagram) and TikTok support all 7. LinkedIn supports all except app_promotion. X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views. (required)
48214823
ad_set_id: Meta, or TikTok with `smartPlus: true`. Attach the boosted post to this existing ad set instead of creating a campaign. On TikTok the id is an existing Smart+ ad group: the post is added as one more Spark ad in it (up to 30 per ad group), under the identity its `sparkAuthCode` creates; goal and budget are inherited from the Smart+ campaign; a regular ad group is rejected with a 400. Meta: The ad set then owns budget, schedule and targeting; sending those too is a 400.
48224824
existing_campaign_id: TikTok only. Create the ad group and the Spark ad under this existing TikTok campaign instead of creating a new campaign. The campaign keeps its own status and objective (the objective must fit `goal`). Cannot be combined with adSetId or smartPlus. On Meta use POST /v1/ads/create with existingCampaignId.
4825+
identity_id: TikTok only. The identity the ad runs as (the profile shown on the ad), from GET /v1/ads/tiktok-identities. Default: the connected TikTok account's own identity. Must be authorized on the advertiser or the call fails naming the available ones.
4826+
identity_type: TikTok only. Type of identityId; resolved from the advertiser's identity list when omitted.
48234827
budget: Required unless adSetId is set.
48244828
instagram_account_id: Meta only. Instagram identity the ad runs AS (creative.instagram_user_id), overriding the account linked to the Page. Live-verified against a Page-post creative.
48254829
destination_type: Meta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as. Independent of plain link CTAs and their goal. A messaging callToAction selects its destination automatically; an explicit destinationType must then match. Lead ads use ON_AD.
@@ -4957,6 +4961,8 @@ def ad_campaigns_boost_post(
49574961
goal=goal,
49584962
ad_set_id=ad_set_id,
49594963
existing_campaign_id=existing_campaign_id,
4964+
identity_id=identity_id,
4965+
identity_type=identity_type,
49604966
budget=budget,
49614967
instagram_account_id=instagram_account_id,
49624968
destination_type=destination_type,
@@ -5121,6 +5127,7 @@ def ad_campaigns_create_standalone_ad(
51215127
dsa_beneficiary: str | None = None,
51225128
dsa_payor: str | None = None,
51235129
brand_identity: dict[str, Any] | None = None,
5130+
identity_id: str | None = None,
51245131
identity_type: str | None = None,
51255132
smart_plus: bool | None = None,
51265133
user_os: list[str] | None = None,
@@ -5557,6 +5564,7 @@ def ad_campaigns_create_standalone_ad(
55575564

55585565
Alternative: configure once via `PATCH /v1/connect/tiktok-ads`,
55595566
then create ads without this field.
5567+
identity_id: TikTok: the identity the ad runs as, from GET /v1/ads/tiktok-identities. Overrides the connected account's own identity; must be authorized on the advertiser.
55605568
identity_type: TikTok only. Forces the identity attribution on the ad:
55615569

55625570
- `TT_USER`: the posting account's open_id (real @username
@@ -5692,6 +5700,7 @@ def ad_campaigns_create_standalone_ad(
56925700
dsa_beneficiary=dsa_beneficiary,
56935701
dsa_payor=dsa_payor,
56945702
brand_identity=brand_identity,
5703+
identity_id=identity_id,
56955704
identity_type=identity_type,
56965705
smart_plus=smart_plus,
56975706
user_os=user_os,
@@ -5783,6 +5792,31 @@ def ad_creatives_get_ad_media(ad_id: str) -> str:
57835792
except Exception as e:
57845793
return f"Error: {e}"
57855794

5795+
@mcp.tool(
5796+
annotations=ToolAnnotations(
5797+
title="List TikTok ad identities",
5798+
readOnlyHint=True,
5799+
destructiveHint=False,
5800+
openWorldHint=False,
5801+
)
5802+
)
5803+
def ad_creatives_list_ads_tik_tok_identities(
5804+
account_id: str, ad_account_id: str
5805+
) -> str:
5806+
"""List TikTok ad identities
5807+
5808+
Args:
5809+
account_id: A tiktok or tiktokads account ID (required)
5810+
ad_account_id: TikTok advertiser ID (required)"""
5811+
client = _get_client()
5812+
try:
5813+
response = client.ad_creatives.list_ads_tik_tok_identities(
5814+
account_id=account_id, ad_account_id=ad_account_id
5815+
)
5816+
return _format_response(response)
5817+
except Exception as e:
5818+
return f"Error: {e}"
5819+
57865820
@mcp.tool(
57875821
annotations=ToolAnnotations(
57885822
title="Creative library",

‎src/late/models/_generated/models.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: openapi.yaml
3-
# timestamp: 2026-09-17T23:47:46+00:00
3+
# timestamp: 2026-09-18T01:04:46+00:00
44

55
from __future__ import annotations
66

‎src/late/resources/_generated/ad_campaigns.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,8 @@ def boost_post(
941941
ad_set_name: str | None = None,
942942
ad_set_id: str | None = None,
943943
existing_campaign_id: str | None = None,
944+
identity_id: str | None = None,
945+
identity_type: str | None = None,
944946
budget: dict[str, Any] | None = None,
945947
instagram_account_id: str | None = None,
946948
destination_type: str | None = None,
@@ -984,6 +986,8 @@ def boost_post(
984986
goal=goal,
985987
ad_set_id=ad_set_id,
986988
existing_campaign_id=existing_campaign_id,
989+
identity_id=identity_id,
990+
identity_type=identity_type,
987991
budget=budget,
988992
instagram_account_id=instagram_account_id,
989993
destination_type=destination_type,
@@ -1126,6 +1130,7 @@ def create_standalone_ad(
11261130
dsa_beneficiary: str | None = None,
11271131
dsa_payor: str | None = None,
11281132
brand_identity: dict[str, Any] | None = None,
1133+
identity_id: str | None = None,
11291134
identity_type: str | None = None,
11301135
smart_plus: bool | None = None,
11311136
user_os: list[str] | None = None,
@@ -1235,6 +1240,7 @@ def create_standalone_ad(
12351240
dsa_beneficiary=dsa_beneficiary,
12361241
dsa_payor=dsa_payor,
12371242
brand_identity=brand_identity,
1243+
identity_id=identity_id,
12381244
identity_type=identity_type,
12391245
smart_plus=smart_plus,
12401246
user_os=user_os,
@@ -2132,6 +2138,8 @@ async def aboost_post(
21322138
ad_set_name: str | None = None,
21332139
ad_set_id: str | None = None,
21342140
existing_campaign_id: str | None = None,
2141+
identity_id: str | None = None,
2142+
identity_type: str | None = None,
21352143
budget: dict[str, Any] | None = None,
21362144
instagram_account_id: str | None = None,
21372145
destination_type: str | None = None,
@@ -2175,6 +2183,8 @@ async def aboost_post(
21752183
goal=goal,
21762184
ad_set_id=ad_set_id,
21772185
existing_campaign_id=existing_campaign_id,
2186+
identity_id=identity_id,
2187+
identity_type=identity_type,
21782188
budget=budget,
21792189
instagram_account_id=instagram_account_id,
21802190
destination_type=destination_type,
@@ -2317,6 +2327,7 @@ async def acreate_standalone_ad(
23172327
dsa_beneficiary: str | None = None,
23182328
dsa_payor: str | None = None,
23192329
brand_identity: dict[str, Any] | None = None,
2330+
identity_id: str | None = None,
23202331
identity_type: str | None = None,
23212332
smart_plus: bool | None = None,
23222333
user_os: list[str] | None = None,
@@ -2426,6 +2437,7 @@ async def acreate_standalone_ad(
24262437
dsa_beneficiary=dsa_beneficiary,
24272438
dsa_payor=dsa_payor,
24282439
brand_identity=brand_identity,
2440+
identity_id=identity_id,
24292441
identity_type=identity_type,
24302442
smart_plus=smart_plus,
24312443
user_os=user_os,

‎src/late/resources/_generated/ad_creatives.py‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ def get_ad_media(self, ad_id: str) -> dict[str, Any]:
105105
"""Direct video and image URLs for an ad"""
106106
return self._client._get(f"/v1/ads/{ad_id}/media")
107107

108+
def list_ads_tik_tok_identities(
109+
self, account_id: str, ad_account_id: str
110+
) -> dict[str, Any]:
111+
"""List TikTok ad identities"""
112+
params = self._build_params(
113+
account_id=account_id,
114+
ad_account_id=ad_account_id,
115+
)
116+
return self._client._get("/v1/ads/tiktok-identities", params=params)
117+
108118
def list_ad_creatives(
109119
self,
110120
account_id: str,
@@ -344,6 +354,16 @@ async def aget_ad_media(self, ad_id: str) -> dict[str, Any]:
344354
"""Direct video and image URLs for an ad (async)"""
345355
return await self._client._aget(f"/v1/ads/{ad_id}/media")
346356

357+
async def alist_ads_tik_tok_identities(
358+
self, account_id: str, ad_account_id: str
359+
) -> dict[str, Any]:
360+
"""List TikTok ad identities (async)"""
361+
params = self._build_params(
362+
account_id=account_id,
363+
ad_account_id=ad_account_id,
364+
)
365+
return await self._client._aget("/v1/ads/tiktok-identities", params=params)
366+
347367
async def alist_ad_creatives(
348368
self,
349369
account_id: str,

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)