@graph8/sdk 0.251.0 → 0.262.0

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.
Files changed (350) hide show
  1. package/README.md +9 -2
  2. package/dist/cli.js +216 -0
  3. package/dist/index.d.mts +105 -7
  4. package/dist/index.d.ts +105 -7
  5. package/dist/index.js +44 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +44 -3
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/react.d.mts +103 -7
  10. package/dist/react.d.ts +103 -7
  11. package/dist/react.js +62 -11
  12. package/dist/react.js.map +1 -1
  13. package/dist/react.mjs +53 -12
  14. package/dist/react.mjs.map +1 -1
  15. package/dist/types/README.md +7 -0
  16. package/dist/types/agency.d.ts +20 -0
  17. package/dist/types/agentSetup.d.ts +57 -0
  18. package/dist/types/api.d.ts +127 -0
  19. package/dist/types/appClient.d.ts +99 -0
  20. package/dist/types/appPlatform.d.ts +269 -0
  21. package/dist/types/appTokens.d.ts +125 -0
  22. package/dist/types/apps.d.ts +130 -0
  23. package/dist/types/audiences.d.ts +88 -0
  24. package/dist/types/calendar.d.ts +55 -0
  25. package/dist/types/campaigns.d.ts +61 -0
  26. package/dist/types/chat.d.ts +35 -0
  27. package/dist/types/cli.d.ts +14 -0
  28. package/dist/types/companies.d.ts +123 -0
  29. package/dist/types/contacts.d.ts +200 -0
  30. package/dist/types/copilot.d.ts +31 -0
  31. package/dist/types/core.d.ts +1052 -0
  32. package/dist/types/deals.d.ts +215 -0
  33. package/dist/types/enrich.d.ts +51 -0
  34. package/dist/types/fields.d.ts +84 -0
  35. package/dist/types/forms.d.ts +16 -0
  36. package/dist/types/http.d.ts +141 -0
  37. package/dist/types/inbox.d.ts +123 -0
  38. package/dist/types/index.d.ts +63 -0
  39. package/dist/types/intent.d.ts +196 -0
  40. package/dist/types/lists.d.ts +44 -0
  41. package/dist/types/mailboxes.d.ts +240 -0
  42. package/dist/types/marketplace.d.ts +62 -0
  43. package/dist/types/meetings.d.ts +70 -0
  44. package/dist/types/newsletter.d.ts +212 -0
  45. package/dist/types/notes.d.ts +57 -0
  46. package/dist/types/objects.d.ts +281 -0
  47. package/dist/types/pipelines.d.ts +135 -0
  48. package/dist/types/quotes.d.ts +143 -0
  49. package/dist/types/react.d.ts +978 -0
  50. package/dist/types/search.d.ts +99 -0
  51. package/dist/types/sequences.d.ts +255 -0
  52. package/dist/types/signals.d.ts +28 -0
  53. package/dist/types/skills.d.ts +176 -0
  54. package/dist/types/snippet.d.ts +24 -0
  55. package/dist/types/studio.d.ts +161 -0
  56. package/dist/types/tasks.d.ts +101 -0
  57. package/dist/types/types.d.ts +45 -0
  58. package/dist/types/utils.d.ts +21 -0
  59. package/dist/types/version.d.ts +10 -0
  60. package/dist/types/visitors.d.ts +29 -0
  61. package/dist/types/voice.d.ts +304 -0
  62. package/dist/types/webhooks.d.ts +71 -0
  63. package/dist/types/workflows.d.ts +229 -0
  64. package/docs/agents.md +748 -0
  65. package/docs/api/README.md +165 -0
  66. package/docs/api/accounts.d.ts +396 -0
  67. package/docs/api/accounts.md +644 -0
  68. package/docs/api/adCampaigns.d.ts +707 -0
  69. package/docs/api/adCampaigns.md +1091 -0
  70. package/docs/api/adCreatives.d.ts +996 -0
  71. package/docs/api/adCreatives.md +1708 -0
  72. package/docs/api/agency.d.ts +556 -0
  73. package/docs/api/agency.md +845 -0
  74. package/docs/api/agent.d.ts +330 -0
  75. package/docs/api/agent.md +514 -0
  76. package/docs/api/agents.d.ts +1622 -0
  77. package/docs/api/agents.md +2860 -0
  78. package/docs/api/aiInbox.d.ts +1984 -0
  79. package/docs/api/aiInbox.md +3490 -0
  80. package/docs/api/analytics.d.ts +1273 -0
  81. package/docs/api/analytics.md +2095 -0
  82. package/docs/api/apiKeys.d.ts +252 -0
  83. package/docs/api/apiKeys.md +318 -0
  84. package/docs/api/appDeployments.d.ts +236 -0
  85. package/docs/api/appDeployments.md +471 -0
  86. package/docs/api/appDomains.d.ts +171 -0
  87. package/docs/api/appDomains.md +281 -0
  88. package/docs/api/appLogs.d.ts +120 -0
  89. package/docs/api/appLogs.md +159 -0
  90. package/docs/api/appObjects.d.ts +415 -0
  91. package/docs/api/appObjects.md +568 -0
  92. package/docs/api/appPages.d.ts +557 -0
  93. package/docs/api/appPages.md +796 -0
  94. package/docs/api/appPlatformTokens.d.ts +123 -0
  95. package/docs/api/appPlatformTokens.md +172 -0
  96. package/docs/api/appointments.d.ts +2361 -0
  97. package/docs/api/appointments.md +3917 -0
  98. package/docs/api/apps.d.ts +822 -0
  99. package/docs/api/apps.md +1342 -0
  100. package/docs/api/assertUpsert.d.ts +286 -0
  101. package/docs/api/assertUpsert.md +370 -0
  102. package/docs/api/audienceSyncs.d.ts +259 -0
  103. package/docs/api/audienceSyncs.md +395 -0
  104. package/docs/api/brandKit.d.ts +686 -0
  105. package/docs/api/brandKit.md +1133 -0
  106. package/docs/api/bugReports.d.ts +181 -0
  107. package/docs/api/bugReports.md +268 -0
  108. package/docs/api/by-path.md +3260 -0
  109. package/docs/api/calendarInvites.d.ts +117 -0
  110. package/docs/api/calendarInvites.md +148 -0
  111. package/docs/api/campaignWorkflows.d.ts +152 -0
  112. package/docs/api/campaignWorkflows.md +200 -0
  113. package/docs/api/campaigns.d.ts +721 -0
  114. package/docs/api/campaigns.md +1236 -0
  115. package/docs/api/channels.d.ts +171 -0
  116. package/docs/api/channels.md +235 -0
  117. package/docs/api/cliCampaigns.d.ts +205 -0
  118. package/docs/api/cliCampaigns.md +256 -0
  119. package/docs/api/cliPipelines.d.ts +324 -0
  120. package/docs/api/cliPipelines.md +562 -0
  121. package/docs/api/clickHouse.d.ts +115 -0
  122. package/docs/api/clickHouse.md +138 -0
  123. package/docs/api/companies.d.ts +1636 -0
  124. package/docs/api/companies.md +2211 -0
  125. package/docs/api/companyIntelligence.d.ts +299 -0
  126. package/docs/api/companyIntelligence.md +488 -0
  127. package/docs/api/contacts.d.ts +2173 -0
  128. package/docs/api/contacts.md +3143 -0
  129. package/docs/api/content.d.ts +968 -0
  130. package/docs/api/content.md +1667 -0
  131. package/docs/api/contentGridSkills.d.ts +177 -0
  132. package/docs/api/contentGridSkills.md +271 -0
  133. package/docs/api/copilot.d.ts +1017 -0
  134. package/docs/api/copilot.md +1765 -0
  135. package/docs/api/crmSyncs.d.ts +215 -0
  136. package/docs/api/crmSyncs.md +301 -0
  137. package/docs/api/customerSuccess.d.ts +491 -0
  138. package/docs/api/customerSuccess.md +776 -0
  139. package/docs/api/deals.d.ts +1697 -0
  140. package/docs/api/deals.md +2436 -0
  141. package/docs/api/deliverability.d.ts +418 -0
  142. package/docs/api/deliverability.md +677 -0
  143. package/docs/api/desk.d.ts +1765 -0
  144. package/docs/api/desk.md +3007 -0
  145. package/docs/api/dialer.d.ts +1185 -0
  146. package/docs/api/dialer.md +2166 -0
  147. package/docs/api/dialerAnalytics.d.ts +187 -0
  148. package/docs/api/dialerAnalytics.md +257 -0
  149. package/docs/api/documents.d.ts +895 -0
  150. package/docs/api/documents.md +1440 -0
  151. package/docs/api/duplicates.d.ts +195 -0
  152. package/docs/api/duplicates.md +315 -0
  153. package/docs/api/eSign.d.ts +38 -0
  154. package/docs/api/eSign.md +54 -0
  155. package/docs/api/eSignature.d.ts +242 -0
  156. package/docs/api/eSignature.md +341 -0
  157. package/docs/api/enrichment.d.ts +3207 -0
  158. package/docs/api/enrichment.md +5225 -0
  159. package/docs/api/events.d.ts +115 -0
  160. package/docs/api/events.md +105 -0
  161. package/docs/api/fields.d.ts +482 -0
  162. package/docs/api/fields.md +566 -0
  163. package/docs/api/forms.d.ts +1012 -0
  164. package/docs/api/forms.md +1542 -0
  165. package/docs/api/gtmCampaigns.d.ts +662 -0
  166. package/docs/api/gtmCampaigns.md +1044 -0
  167. package/docs/api/gtmContext.d.ts +1187 -0
  168. package/docs/api/gtmContext.md +2112 -0
  169. package/docs/api/gtmDeliverability.d.ts +60 -0
  170. package/docs/api/gtmDeliverability.md +63 -0
  171. package/docs/api/gtmKnowledgeBase.d.ts +76 -0
  172. package/docs/api/gtmKnowledgeBase.md +91 -0
  173. package/docs/api/gtmLaunchHelpers.d.ts +123 -0
  174. package/docs/api/gtmLaunchHelpers.md +148 -0
  175. package/docs/api/gtmLibrary.d.ts +448 -0
  176. package/docs/api/gtmLibrary.md +780 -0
  177. package/docs/api/health.d.ts +39 -0
  178. package/docs/api/health.md +58 -0
  179. package/docs/api/imageLibrary.d.ts +341 -0
  180. package/docs/api/imageLibrary.md +569 -0
  181. package/docs/api/imports.d.ts +157 -0
  182. package/docs/api/imports.md +174 -0
  183. package/docs/api/inbox.d.ts +709 -0
  184. package/docs/api/inbox.md +1067 -0
  185. package/docs/api/install.d.ts +213 -0
  186. package/docs/api/install.md +317 -0
  187. package/docs/api/installedApps.d.ts +131 -0
  188. package/docs/api/installedApps.md +241 -0
  189. package/docs/api/integrationStatus.d.ts +142 -0
  190. package/docs/api/integrationStatus.md +205 -0
  191. package/docs/api/integrations.d.ts +2327 -0
  192. package/docs/api/integrations.md +3791 -0
  193. package/docs/api/intent.d.ts +482 -0
  194. package/docs/api/intent.md +858 -0
  195. package/docs/api/knowledge.d.ts +501 -0
  196. package/docs/api/knowledge.md +843 -0
  197. package/docs/api/knowledgeBase.d.ts +84 -0
  198. package/docs/api/knowledgeBase.md +96 -0
  199. package/docs/api/landingPages.d.ts +1411 -0
  200. package/docs/api/landingPages.md +2488 -0
  201. package/docs/api/leads.d.ts +133 -0
  202. package/docs/api/leads.md +180 -0
  203. package/docs/api/library.d.ts +217 -0
  204. package/docs/api/library.md +338 -0
  205. package/docs/api/linkedIn.d.ts +227 -0
  206. package/docs/api/linkedIn.md +289 -0
  207. package/docs/api/linkedInOutreach.d.ts +727 -0
  208. package/docs/api/linkedInOutreach.md +990 -0
  209. package/docs/api/lists.d.ts +1106 -0
  210. package/docs/api/lists.md +1609 -0
  211. package/docs/api/logs.d.ts +71 -0
  212. package/docs/api/logs.md +70 -0
  213. package/docs/api/mailboxes.d.ts +1050 -0
  214. package/docs/api/mailboxes.md +1690 -0
  215. package/docs/api/marketingIntelligence.d.ts +256 -0
  216. package/docs/api/marketingIntelligence.md +454 -0
  217. package/docs/api/marketplace.d.ts +3173 -0
  218. package/docs/api/marketplace.md +5953 -0
  219. package/docs/api/mcp.d.ts +69 -0
  220. package/docs/api/mcp.md +69 -0
  221. package/docs/api/me.d.ts +54 -0
  222. package/docs/api/me.md +56 -0
  223. package/docs/api/meetings.d.ts +539 -0
  224. package/docs/api/meetings.md +747 -0
  225. package/docs/api/newsletter.d.ts +1613 -0
  226. package/docs/api/newsletter.md +2746 -0
  227. package/docs/api/notes.d.ts +517 -0
  228. package/docs/api/notes.md +888 -0
  229. package/docs/api/notifications.d.ts +94 -0
  230. package/docs/api/notifications.md +105 -0
  231. package/docs/api/objects.d.ts +621 -0
  232. package/docs/api/objects.md +1098 -0
  233. package/docs/api/openSearch.d.ts +234 -0
  234. package/docs/api/openSearch.md +297 -0
  235. package/docs/api/ops.d.ts +299 -0
  236. package/docs/api/ops.md +339 -0
  237. package/docs/api/orgGovernance.d.ts +393 -0
  238. package/docs/api/orgGovernance.md +623 -0
  239. package/docs/api/orgVideos.d.ts +184 -0
  240. package/docs/api/orgVideos.md +252 -0
  241. package/docs/api/organizationSettings.d.ts +626 -0
  242. package/docs/api/organizationSettings.md +911 -0
  243. package/docs/api/phoneNumbers.d.ts +484 -0
  244. package/docs/api/phoneNumbers.md +777 -0
  245. package/docs/api/profile.d.ts +329 -0
  246. package/docs/api/profile.md +540 -0
  247. package/docs/api/programmaticPages.d.ts +400 -0
  248. package/docs/api/programmaticPages.md +626 -0
  249. package/docs/api/providerDomains.d.ts +866 -0
  250. package/docs/api/providerDomains.md +1446 -0
  251. package/docs/api/providerUsage.d.ts +129 -0
  252. package/docs/api/providerUsage.md +186 -0
  253. package/docs/api/public.d.ts +69 -0
  254. package/docs/api/public.md +78 -0
  255. package/docs/api/publicCopilot.d.ts +67 -0
  256. package/docs/api/publicCopilot.md +80 -0
  257. package/docs/api/publicSignals.d.ts +66 -0
  258. package/docs/api/publicSignals.md +71 -0
  259. package/docs/api/publicVisitors.d.ts +97 -0
  260. package/docs/api/publicVisitors.md +118 -0
  261. package/docs/api/quotes.d.ts +1564 -0
  262. package/docs/api/quotes.md +2553 -0
  263. package/docs/api/radar.d.ts +808 -0
  264. package/docs/api/radar.md +1431 -0
  265. package/docs/api/radarReports.d.ts +208 -0
  266. package/docs/api/radarReports.md +306 -0
  267. package/docs/api/recordRoles.d.ts +143 -0
  268. package/docs/api/recordRoles.md +175 -0
  269. package/docs/api/repos.d.ts +146 -0
  270. package/docs/api/repos.md +211 -0
  271. package/docs/api/research.d.ts +295 -0
  272. package/docs/api/research.md +534 -0
  273. package/docs/api/revenue.d.ts +402 -0
  274. package/docs/api/revenue.md +608 -0
  275. package/docs/api/revenueAnalytics.d.ts +147 -0
  276. package/docs/api/revenueAnalytics.md +212 -0
  277. package/docs/api/revenueLifecycle.d.ts +207 -0
  278. package/docs/api/revenueLifecycle.md +274 -0
  279. package/docs/api/revenueRecords.d.ts +372 -0
  280. package/docs/api/revenueRecords.md +563 -0
  281. package/docs/api/roles.d.ts +431 -0
  282. package/docs/api/roles.md +812 -0
  283. package/docs/api/salesCoach.d.ts +877 -0
  284. package/docs/api/salesCoach.md +1540 -0
  285. package/docs/api/sandbox.d.ts +210 -0
  286. package/docs/api/sandbox.md +380 -0
  287. package/docs/api/scans.d.ts +104 -0
  288. package/docs/api/scans.md +136 -0
  289. package/docs/api/scheduleBuy.d.ts +293 -0
  290. package/docs/api/scheduleBuy.md +431 -0
  291. package/docs/api/scraping.d.ts +266 -0
  292. package/docs/api/scraping.md +383 -0
  293. package/docs/api/sdrAnalytics.d.ts +138 -0
  294. package/docs/api/sdrAnalytics.md +246 -0
  295. package/docs/api/search.d.ts +598 -0
  296. package/docs/api/search.md +866 -0
  297. package/docs/api/seo.d.ts +447 -0
  298. package/docs/api/seo.md +660 -0
  299. package/docs/api/sequenceLifecycle.d.ts +439 -0
  300. package/docs/api/sequenceLifecycle.md +513 -0
  301. package/docs/api/sequences.d.ts +1936 -0
  302. package/docs/api/sequences.md +3232 -0
  303. package/docs/api/settings.d.ts +448 -0
  304. package/docs/api/settings.md +731 -0
  305. package/docs/api/signals.d.ts +1441 -0
  306. package/docs/api/signals.md +2526 -0
  307. package/docs/api/signatures.d.ts +719 -0
  308. package/docs/api/signatures.md +1247 -0
  309. package/docs/api/skills.d.ts +230 -0
  310. package/docs/api/skills.md +466 -0
  311. package/docs/api/snippet.d.ts +85 -0
  312. package/docs/api/snippet.md +106 -0
  313. package/docs/api/socialPublishing.d.ts +824 -0
  314. package/docs/api/socialPublishing.md +1245 -0
  315. package/docs/api/studioDocuments.d.ts +244 -0
  316. package/docs/api/studioDocuments.md +348 -0
  317. package/docs/api/support.d.ts +90 -0
  318. package/docs/api/support.md +76 -0
  319. package/docs/api/suppressions.d.ts +241 -0
  320. package/docs/api/suppressions.md +343 -0
  321. package/docs/api/surveys.d.ts +847 -0
  322. package/docs/api/surveys.md +1223 -0
  323. package/docs/api/tasks.d.ts +813 -0
  324. package/docs/api/tasks.md +1344 -0
  325. package/docs/api/teamMembers.d.ts +668 -0
  326. package/docs/api/teamMembers.md +1040 -0
  327. package/docs/api/teams.d.ts +784 -0
  328. package/docs/api/teams.md +1395 -0
  329. package/docs/api/usage.d.ts +277 -0
  330. package/docs/api/usage.md +389 -0
  331. package/docs/api/visitors.d.ts +690 -0
  332. package/docs/api/visitors.md +1075 -0
  333. package/docs/api/voice.d.ts +4661 -0
  334. package/docs/api/voice.md +7905 -0
  335. package/docs/api/webAnalytics.d.ts +964 -0
  336. package/docs/api/webAnalytics.md +1452 -0
  337. package/docs/api/webChat.d.ts +1704 -0
  338. package/docs/api/webChat.md +2048 -0
  339. package/docs/api/webhooks.d.ts +251 -0
  340. package/docs/api/webhooks.md +386 -0
  341. package/docs/api/websiteEditor.d.ts +324 -0
  342. package/docs/api/websiteEditor.md +517 -0
  343. package/docs/api/work.d.ts +2298 -0
  344. package/docs/api/work.md +3096 -0
  345. package/docs/api/workbench.d.ts +2962 -0
  346. package/docs/api/workbench.md +4884 -0
  347. package/docs/api/workflows.d.ts +1218 -0
  348. package/docs/api/workflows.md +2302 -0
  349. package/docs/sdk-clients.md +4339 -0
  350. package/package.json +10 -3
@@ -0,0 +1,1091 @@
1
+ <!-- Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. -->
2
+
3
+ # `g8.api.adCampaigns`: Ad Campaigns
4
+
5
+ 19 operations (6 read, 2 destructive, 11 external).
6
+
7
+ No hand-written client covers this area. Call it through `g8.api.adCampaigns.*` as shown below, or by operationId with `g8.api.call(operationId, input)`.
8
+
9
+ Every example below assumes this setup (server-side, API key):
10
+
11
+ ```ts
12
+ import { g8 } from "@graph8/sdk";
13
+
14
+ g8.init({ apiKey: process.env.G8_API_KEY! });
15
+ ```
16
+
17
+ Example values are placeholders that match each field's type. Only required fields are shown. Every example is type-checked against the SDK in CI.
18
+
19
+ Exact TypeScript types for every operation on this page, and every schema they use: [adCampaigns.d.ts](adCampaigns.d.ts).
20
+
21
+ ## Operations
22
+
23
+ | Call | HTTP | Tier | Scope | Summary |
24
+ |---|---|---|---|---|
25
+ | [`archiveCampaignAd`](#op-archivecampaignad) | `DELETE /api/v1/ad-campaigns/{campaign_id}/ads/{ad_id}` | destructive | `ads:delete` | Archive Campaign Ad |
26
+ | [`createCampaignAd`](#op-createcampaignad) | `POST /api/v1/ad-campaigns/{campaign_id}/ads` | external | `ads:run` | Create Campaign Ad |
27
+ | [`createCampaignAdsBatch`](#op-createcampaignadsbatch) | `POST /api/v1/ad-campaigns/{campaign_id}/ads/batch` | external | `ads:run` | Create Campaign Ads Batch |
28
+ | [`deleteAdCampaign`](#op-deleteadcampaign) | `DELETE /api/v1/ad-campaigns/{campaign_id}` | destructive | `ads:delete` | Delete Ad Campaign |
29
+ | [`getAdCampaign`](#op-getadcampaign) | `GET /api/v1/ad-campaigns/{campaign_id}` | read | `ads:read` | Get Ad Campaign |
30
+ | [`getCampaignAd`](#op-getcampaignad) | `GET /api/v1/ad-campaigns/{campaign_id}/ads/{ad_id}` | read | `ads:read` | Get Campaign Ad |
31
+ | [`getCampaignEditableFields`](#op-getcampaigneditablefields) | `GET /api/v1/ad-campaigns/{campaign_id}/editable` | read | `ads:read` | Get Campaign Editable Fields |
32
+ | [`getPerCampaignMetrics`](#op-getpercampaignmetrics) | `GET /api/v1/ad-campaigns/metrics` | read | `ads:read` | Get Per Campaign Metrics |
33
+ | [`launchAdCampaign`](#op-launchadcampaign) | `POST /api/v1/audience-syncs/{config_id}/launch` | external | `ads:run` | Launch Ad Campaign |
34
+ | [`listAdCampaigns`](#op-listadcampaigns) | `GET /api/v1/ad-campaigns` | read | `ads:read` | List Ad Campaigns |
35
+ | [`listCampaignAds`](#op-listcampaignads) | `GET /api/v1/ad-campaigns/{campaign_id}/ads` | read | `ads:read` | List Campaign Ads |
36
+ | [`previewAdCampaignEdit`](#op-previewadcampaignedit) | `POST /api/v1/ad-campaigns/{campaign_id}/edit-preview` | external | `ads:run` | Preview Ad Campaign Edit |
37
+ | [`refreshAllCampaignStatuses`](#op-refreshallcampaignstatuses) | `POST /api/v1/ad-campaigns/status-refresh` | external | `ads:run` | Refresh All Campaign Statuses |
38
+ | [`refreshCampaignStatus`](#op-refreshcampaignstatus) | `POST /api/v1/ad-campaigns/{campaign_id}/status-refresh` | external | `ads:run` | Refresh Campaign Status |
39
+ | [`retryCampaignLaunch`](#op-retrycampaignlaunch) | `POST /api/v1/ad-campaigns/{campaign_id}/retry` | external | `ads:run` | Retry Campaign Launch |
40
+ | [`setCampaignAdStatus`](#op-setcampaignadstatus) | `POST /api/v1/ad-campaigns/{campaign_id}/ads/{ad_id}/status` | external | `ads:run` | Set Campaign Ad Status |
41
+ | [`updateAdCampaign`](#op-updateadcampaign) | `PUT /api/v1/ad-campaigns/{campaign_id}` | external | `ads:run` | Update Ad Campaign |
42
+ | [`updateCampaignAd`](#op-updatecampaignad) | `PATCH /api/v1/ad-campaigns/{campaign_id}/ads/{ad_id}` | external | `ads:run` | Update Campaign Ad |
43
+ | [`uploadAdImage`](#op-uploadadimage) | `POST /api/v1/ad-campaigns/images` | external | `ads:run` | Upload Ad Image |
44
+
45
+ ---
46
+
47
+ <a id="op-archivecampaignad"></a>
48
+
49
+ ### `g8.api.adCampaigns.archiveCampaignAd(input)`
50
+
51
+ **Archive Campaign Ad**
52
+
53
+ - HTTP: `DELETE /api/v1/ad-campaigns/{campaign_id}/ads/{ad_id}`
54
+ - operationId: `archive_campaign_ad_ad_campaigns__campaign_id__ads__ad_id__delete` (also callable as `g8.api.call("archive_campaign_ad_ad_campaigns__campaign_id__ads__ad_id__delete", input)`)
55
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
56
+ - API-key scope: `ads:delete`
57
+
58
+ Permanently stop one ad.
59
+
60
+ Archive, not hard-delete: Google's remove and LinkedIn's archive are both
61
+ one-way, so the ad is retained with ``status="archived"`` and the spend it
62
+ already incurred stays attributable. Refuses on a campaign's last remaining
63
+ ad — pause or delete the campaign instead of leaving it serving nothing.
64
+
65
+ **Input**
66
+
67
+ | Field | Type | Required | Description |
68
+ |---|---|---|---|
69
+ | `path.campaign_id` | `integer` | yes | Ad campaign ID |
70
+ | `path.ad_id` | `integer` | yes | graph8 ad ID |
71
+
72
+ **Returns** `ApiResponse_AdResponse_`: the envelope `{ data: AdResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
73
+
74
+ Other envelope fields: `pagination` (PaginationMeta).
75
+
76
+ `AdResponse` fields:
77
+
78
+ | Field | Type | Required | Description |
79
+ |---|---|---|---|
80
+ | `campaign_id` | `integer` | yes | |
81
+ | `slot_index` | `integer` | yes | |
82
+ | `status` | `string` | yes | draft \| launching \| active \| paused \| archived \| failed |
83
+ | `approval_nuance` | `string \| null` | no | |
84
+ | `copy_assets` | `Record<string, unknown> \| null` | no | Multi-asset copy, e.g. {rsa_headlines: [...], rsa_descriptions: [...]} |
85
+ | `created_at` | `string \| null` | no | |
86
+ | `creative_image_url` | `string \| null` | no | |
87
+ | `creative_image_url_portrait` | `string \| null` | no | |
88
+ | `creative_image_url_square` | `string \| null` | no | |
89
+ | `cta` | `string \| null` | no | |
90
+ | `description` | `string \| null` | no | |
91
+ | `destination_url` | `string \| null` | no | |
92
+ | `error_message` | `string \| null` | no | |
93
+ | `headline` | `string \| null` | no | |
94
+ | `id` | `integer \| null` | no | graph8 ad id, stable across creative replacements. Null only for a campaign launched before per-ad control, until its first read. |
95
+ | `launched_at` | `string \| null` | no | |
96
+ | `logo_image_url` | `string \| null` | no | |
97
+ | `name` | `string \| null` | no | |
98
+ | `platform_ad_id` | `string \| null` | no | Current platform handle. Changes when the creative is replaced. |
99
+ | `policy_topics` | `Array<Record<string, unknown>> \| null` | no | |
100
+ | `primary_text` | `string \| null` | no | |
101
+ | `source_ad_creative_id` | `string \| null` | no | The Studio creative this ad was built from, when it came from Studio |
102
+
103
+ **Example**
104
+
105
+ ```ts
106
+ // destructive: deletes or archives data; confirm with a human before calling.
107
+ const result = await g8.api.adCampaigns.archiveCampaignAd({ path: { campaign_id: 123, ad_id: 123 } });
108
+ ```
109
+
110
+ ---
111
+
112
+ <a id="op-createcampaignad"></a>
113
+
114
+ ### `g8.api.adCampaigns.createCampaignAd(input)`
115
+
116
+ **Create Campaign Ad**
117
+
118
+ - HTTP: `POST /api/v1/ad-campaigns/{campaign_id}/ads`
119
+ - operationId: `create_campaign_ad_ad_campaigns__campaign_id__ads_post` (also callable as `g8.api.call("create_campaign_ad_ad_campaigns__campaign_id__ads_post", input)`)
120
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
121
+ - API-key scope: `ads:run`
122
+
123
+ Add an ad to a campaign.
124
+
125
+ On a launched campaign the ad goes live immediately and begins consuming the
126
+ campaign's budget. This spends money, so the key needs ``ads:run``.
127
+
128
+ **Input**
129
+
130
+ | Field | Type | Required | Description |
131
+ |---|---|---|---|
132
+ | `path.campaign_id` | `integer` | yes | Ad campaign ID |
133
+ | `body` | `AdCreateRequest` | yes | Request body; fields below. |
134
+
135
+ Body fields (`AdCreateRequest`):
136
+
137
+ | Field | Type | Required | Description |
138
+ |---|---|---|---|
139
+ | `body.copy_assets` | `Record<string, unknown> \| null` | no | |
140
+ | `body.creative_image_url` | `string \| null` | no | max length 500 |
141
+ | `body.creative_image_url_portrait` | `string \| null` | no | max length 500 |
142
+ | `body.creative_image_url_square` | `string \| null` | no | max length 500 |
143
+ | `body.cta` | `string \| null` | no | max length 50 |
144
+ | `body.description` | `string \| null` | no | max length 1000 |
145
+ | `body.destination_url` | `string \| null` | no | max length 500 |
146
+ | `body.headline` | `string \| null` | no | max length 255 |
147
+ | `body.logo_image_url` | `string \| null` | no | max length 500 |
148
+ | `body.name` | `string \| null` | no | max length 255 |
149
+ | `body.primary_text` | `string \| null` | no | max length 1000 |
150
+ | `body.source_ad_creative_id` | `string \| null` | no | max length 64 |
151
+
152
+ **Returns** `ApiResponse_AdResponse_`: the envelope `{ data: AdResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
153
+
154
+ Other envelope fields: `pagination` (PaginationMeta).
155
+
156
+ `AdResponse` fields:
157
+
158
+ | Field | Type | Required | Description |
159
+ |---|---|---|---|
160
+ | `campaign_id` | `integer` | yes | |
161
+ | `slot_index` | `integer` | yes | |
162
+ | `status` | `string` | yes | draft \| launching \| active \| paused \| archived \| failed |
163
+ | `approval_nuance` | `string \| null` | no | |
164
+ | `copy_assets` | `Record<string, unknown> \| null` | no | Multi-asset copy, e.g. {rsa_headlines: [...], rsa_descriptions: [...]} |
165
+ | `created_at` | `string \| null` | no | |
166
+ | `creative_image_url` | `string \| null` | no | |
167
+ | `creative_image_url_portrait` | `string \| null` | no | |
168
+ | `creative_image_url_square` | `string \| null` | no | |
169
+ | `cta` | `string \| null` | no | |
170
+ | `description` | `string \| null` | no | |
171
+ | `destination_url` | `string \| null` | no | |
172
+ | `error_message` | `string \| null` | no | |
173
+ | `headline` | `string \| null` | no | |
174
+ | `id` | `integer \| null` | no | graph8 ad id, stable across creative replacements. Null only for a campaign launched before per-ad control, until its first read. |
175
+ | `launched_at` | `string \| null` | no | |
176
+ | `logo_image_url` | `string \| null` | no | |
177
+ | `name` | `string \| null` | no | |
178
+ | `platform_ad_id` | `string \| null` | no | Current platform handle. Changes when the creative is replaced. |
179
+ | `policy_topics` | `Array<Record<string, unknown>> \| null` | no | |
180
+ | `primary_text` | `string \| null` | no | |
181
+ | `source_ad_creative_id` | `string \| null` | no | The Studio creative this ad was built from, when it came from Studio |
182
+
183
+ **Example**
184
+
185
+ ```ts
186
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
187
+ const result = await g8.api.adCampaigns.createCampaignAd({ path: { campaign_id: 123 }, body: {} });
188
+ ```
189
+
190
+ ---
191
+
192
+ <a id="op-createcampaignadsbatch"></a>
193
+
194
+ ### `g8.api.adCampaigns.createCampaignAdsBatch(input)`
195
+
196
+ **Create Campaign Ads Batch**
197
+
198
+ - HTTP: `POST /api/v1/ad-campaigns/{campaign_id}/ads/batch`
199
+ - operationId: `create_campaign_ads_batch_ad_campaigns__campaign_id__ads_batch_post` (also callable as `g8.api.call("create_campaign_ads_batch_ad_campaigns__campaign_id__ads_batch_post", input)`)
200
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
201
+ - API-key scope: `ads:run`
202
+
203
+ Add several ads at once.
204
+
205
+ Returns ``status="partial"`` when any individual ad failed, with per-ad
206
+ outcomes in ``results``. Inspect those rather than treating a 200 as total
207
+ success — one creative rejected on policy does not stop its siblings.
208
+
209
+ **Input**
210
+
211
+ | Field | Type | Required | Description |
212
+ |---|---|---|---|
213
+ | `path.campaign_id` | `integer` | yes | Ad campaign ID |
214
+ | `body` | `AdBatchCreateRequest` | yes | Request body; fields below. |
215
+
216
+ Body fields (`AdBatchCreateRequest`):
217
+
218
+ | Field | Type | Required | Description |
219
+ |---|---|---|---|
220
+ | `body.ads` | `Array<AdCreateRequest>` | yes | min items 1, max items 20 |
221
+
222
+ **Returns** `ApiResponse_AdBatchCreateResponse_`: the envelope `{ data: AdBatchCreateResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
223
+
224
+ Other envelope fields: `pagination` (PaginationMeta).
225
+
226
+ `AdBatchCreateResponse` fields:
227
+
228
+ | Field | Type | Required | Description |
229
+ |---|---|---|---|
230
+ | `campaign_id` | `integer` | yes | |
231
+ | `failed` | `integer` | yes | |
232
+ | `requested` | `integer` | yes | |
233
+ | `results` | `Array<AdBatchResultItem>` | yes | |
234
+ | `status` | `string` | yes | ok \| partial — never render success off a 200 alone |
235
+ | `succeeded` | `integer` | yes | |
236
+ | `platform` | `string \| null` | no | |
237
+
238
+ **Example**
239
+
240
+ ```ts
241
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
242
+ const result = await g8.api.adCampaigns.createCampaignAdsBatch({ path: { campaign_id: 123 }, body: { ads: [{}] } });
243
+ ```
244
+
245
+ ---
246
+
247
+ <a id="op-deleteadcampaign"></a>
248
+
249
+ ### `g8.api.adCampaigns.deleteAdCampaign(input)`
250
+
251
+ **Delete Ad Campaign**
252
+
253
+ - HTTP: `DELETE /api/v1/ad-campaigns/{campaign_id}`
254
+ - operationId: `delete_ad_campaign_ad_campaigns__campaign_id__delete` (also callable as `g8.api.call("delete_ad_campaign_ad_campaigns__campaign_id__delete", input)`)
255
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
256
+ - API-key scope: `ads:delete`
257
+
258
+ Stop and remove a campaign.
259
+
260
+ THIS STOPS A LIVE CAMPAIGN ON THE PLATFORM FIRST, then removes graph8's
261
+ row. There is no undo: the platform-side removal is the platform's, and the
262
+ campaign's history goes with the local row.
263
+
264
+ 502 - not 404 - when the platform refuses the removal, because the campaign
265
+ is then still LIVE AND SPENDING and reporting success would be the worst
266
+ possible answer.
267
+
268
+ **Input**
269
+
270
+ | Field | Type | Required | Description |
271
+ |---|---|---|---|
272
+ | `path.campaign_id` | `integer` | yes | The ad campaign's id. |
273
+
274
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
275
+
276
+ Other envelope fields: `pagination` (PaginationMeta).
277
+
278
+ **Example**
279
+
280
+ ```ts
281
+ // destructive: deletes or archives data; confirm with a human before calling.
282
+ const result = await g8.api.adCampaigns.deleteAdCampaign({ path: { campaign_id: 123 } });
283
+ ```
284
+
285
+ ---
286
+
287
+ <a id="op-getadcampaign"></a>
288
+
289
+ ### `g8.api.adCampaigns.getAdCampaign(input)`
290
+
291
+ **Get Ad Campaign**
292
+
293
+ - HTTP: `GET /api/v1/ad-campaigns/{campaign_id}`
294
+ - operationId: `get_ad_campaign_ad_campaigns__campaign_id__get` (also callable as `g8.api.call("get_ad_campaign_ad_campaigns__campaign_id__get", input)`)
295
+ - Tier: `read`: reads data; safe to call and to retry
296
+ - API-key scope: `ads:read`
297
+
298
+ Fetch one paid ad campaign.
299
+
300
+ **Input**
301
+
302
+ | Field | Type | Required | Description |
303
+ |---|---|---|---|
304
+ | `path.campaign_id` | `integer` | yes | Ad campaign ID |
305
+
306
+ **Returns** `ApiResponse_AdCampaignResponse_`: the envelope `{ data: AdCampaignResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
307
+
308
+ Other envelope fields: `pagination` (PaginationMeta).
309
+
310
+ `AdCampaignResponse` fields:
311
+
312
+ | Field | Type | Required | Description |
313
+ |---|---|---|---|
314
+ | `id` | `integer` | yes | |
315
+ | `name` | `string` | yes | |
316
+ | `platform` | `string` | yes | |
317
+ | `status` | `string` | yes | |
318
+ | `sync_config_id` | `integer` | yes | |
319
+ | `ad_count` | `integer` | no | Number of live (non-archived) ads in this campaign default `0` |
320
+ | `created_at` | `string \| null` | no | |
321
+ | `currency` | `string \| null` | no | |
322
+ | `daily_budget` | `number \| null` | no | |
323
+ | `end_date` | `string \| null` | no | |
324
+ | `google_campaign_subtype` | `string \| null` | no | |
325
+ | `launched_at` | `string \| null` | no | |
326
+ | `objective` | `string \| null` | no | |
327
+ | `platform_campaign_id` | `string \| null` | no | |
328
+ | `start_date` | `string \| null` | no | |
329
+
330
+ **Example**
331
+
332
+ ```ts
333
+ const result = await g8.api.adCampaigns.getAdCampaign({ path: { campaign_id: 123 } });
334
+ ```
335
+
336
+ ---
337
+
338
+ <a id="op-getcampaignad"></a>
339
+
340
+ ### `g8.api.adCampaigns.getCampaignAd(input)`
341
+
342
+ **Get Campaign Ad**
343
+
344
+ - HTTP: `GET /api/v1/ad-campaigns/{campaign_id}/ads/{ad_id}`
345
+ - operationId: `get_campaign_ad_ad_campaigns__campaign_id__ads__ad_id__get` (also callable as `g8.api.call("get_campaign_ad_ad_campaigns__campaign_id__ads__ad_id__get", input)`)
346
+ - Tier: `read`: reads data; safe to call and to retry
347
+ - API-key scope: `ads:read`
348
+
349
+ Fetch one ad.
350
+
351
+ **Input**
352
+
353
+ | Field | Type | Required | Description |
354
+ |---|---|---|---|
355
+ | `path.campaign_id` | `integer` | yes | Ad campaign ID |
356
+ | `path.ad_id` | `integer` | yes | graph8 ad ID |
357
+
358
+ **Returns** `ApiResponse_AdResponse_`: the envelope `{ data: AdResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
359
+
360
+ Other envelope fields: `pagination` (PaginationMeta).
361
+
362
+ `AdResponse` fields:
363
+
364
+ | Field | Type | Required | Description |
365
+ |---|---|---|---|
366
+ | `campaign_id` | `integer` | yes | |
367
+ | `slot_index` | `integer` | yes | |
368
+ | `status` | `string` | yes | draft \| launching \| active \| paused \| archived \| failed |
369
+ | `approval_nuance` | `string \| null` | no | |
370
+ | `copy_assets` | `Record<string, unknown> \| null` | no | Multi-asset copy, e.g. {rsa_headlines: [...], rsa_descriptions: [...]} |
371
+ | `created_at` | `string \| null` | no | |
372
+ | `creative_image_url` | `string \| null` | no | |
373
+ | `creative_image_url_portrait` | `string \| null` | no | |
374
+ | `creative_image_url_square` | `string \| null` | no | |
375
+ | `cta` | `string \| null` | no | |
376
+ | `description` | `string \| null` | no | |
377
+ | `destination_url` | `string \| null` | no | |
378
+ | `error_message` | `string \| null` | no | |
379
+ | `headline` | `string \| null` | no | |
380
+ | `id` | `integer \| null` | no | graph8 ad id, stable across creative replacements. Null only for a campaign launched before per-ad control, until its first read. |
381
+ | `launched_at` | `string \| null` | no | |
382
+ | `logo_image_url` | `string \| null` | no | |
383
+ | `name` | `string \| null` | no | |
384
+ | `platform_ad_id` | `string \| null` | no | Current platform handle. Changes when the creative is replaced. |
385
+ | `policy_topics` | `Array<Record<string, unknown>> \| null` | no | |
386
+ | `primary_text` | `string \| null` | no | |
387
+ | `source_ad_creative_id` | `string \| null` | no | The Studio creative this ad was built from, when it came from Studio |
388
+
389
+ **Example**
390
+
391
+ ```ts
392
+ const result = await g8.api.adCampaigns.getCampaignAd({ path: { campaign_id: 123, ad_id: 123 } });
393
+ ```
394
+
395
+ ---
396
+
397
+ <a id="op-getcampaigneditablefields"></a>
398
+
399
+ ### `g8.api.adCampaigns.getCampaignEditableFields(input)`
400
+
401
+ **Get Campaign Editable Fields**
402
+
403
+ - HTTP: `GET /api/v1/ad-campaigns/{campaign_id}/editable`
404
+ - operationId: `get_campaign_editable_fields_ad_campaigns__campaign_id__editable_get` (also callable as `g8.api.call("get_campaign_editable_fields_ad_campaigns__campaign_id__editable_get", input)`)
405
+ - Tier: `read`: reads data; safe to call and to retry
406
+ - API-key scope: `ads:read`
407
+
408
+ Which of this campaign's fields the platform will actually let you change.
409
+
410
+ Platform- and state-dependent: a live Google Search campaign accepts a
411
+ budget change and refuses a channel change, and a campaign in review
412
+ accepts almost nothing. Read this before attempting an edit.
413
+
414
+ Gated on `ads:launch` rather than `ads:view`, as the app gates it: it
415
+ describes the money controls, and the app treats that whole surface as one
416
+ permission.
417
+
418
+ **Input**
419
+
420
+ | Field | Type | Required | Description |
421
+ |---|---|---|---|
422
+ | `path.campaign_id` | `integer` | yes | The ad campaign's id. |
423
+
424
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
425
+
426
+ Other envelope fields: `pagination` (PaginationMeta).
427
+
428
+ **Example**
429
+
430
+ ```ts
431
+ const result = await g8.api.adCampaigns.getCampaignEditableFields({ path: { campaign_id: 123 } });
432
+ ```
433
+
434
+ ---
435
+
436
+ <a id="op-getpercampaignmetrics"></a>
437
+
438
+ ### `g8.api.adCampaigns.getPerCampaignMetrics(input?)`
439
+
440
+ **Get Per Campaign Metrics**
441
+
442
+ - HTTP: `GET /api/v1/ad-campaigns/metrics`
443
+ - operationId: `get_per_campaign_metrics_ad_campaigns_metrics_get` (also callable as `g8.api.call("get_per_campaign_metrics_ad_campaigns_metrics_get", input)`)
444
+ - Tier: `read`: reads data; safe to call and to retry
445
+ - API-key scope: `ads:read`
446
+
447
+ Spend and performance broken down per campaign.
448
+
449
+ A two-segment LITERAL under a prefix that already has
450
+ `GET /ad-campaigns/{campaign_id}` typed `int`, so this router is included
451
+ first. The app's own router carries a comment about this exact endpoint
452
+ being shadowed once already.
453
+
454
+ **Input**
455
+
456
+ | Field | Type | Required | Description |
457
+ |---|---|---|---|
458
+ | `query.days` | `integer` | no | Days to look back. default `30` |
459
+ | `query.platform` | `"meta" \| "linkedin" \| "google" \| "x" \| null` | no | One platform. Omit for all. |
460
+ | `query.ad_account_id` | `string \| null` | no | |
461
+
462
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
463
+
464
+ Other envelope fields: `pagination` (PaginationMeta).
465
+
466
+ **Example**
467
+
468
+ ```ts
469
+ const result = await g8.api.adCampaigns.getPerCampaignMetrics();
470
+ ```
471
+
472
+ ---
473
+
474
+ <a id="op-launchadcampaign"></a>
475
+
476
+ ### `g8.api.adCampaigns.launchAdCampaign(input)`
477
+
478
+ **Launch Ad Campaign**
479
+
480
+ - HTTP: `POST /api/v1/audience-syncs/{config_id}/launch`
481
+ - operationId: `launch_ad_campaign_audience_syncs__config_id__launch_post` (also callable as `g8.api.call("launch_ad_campaign_audience_syncs__config_id__launch_post", input)`)
482
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
483
+ - API-key scope: `ads:run`
484
+
485
+ Launch a paid campaign on the platform, targeting this sync's audience.
486
+
487
+ THIS SPENDS THE CUSTOMER'S ADVERTISING BUDGET. The campaign goes live with
488
+ `daily_budget` in `currency` from `start_date`, and the platform starts
489
+ charging as soon as it serves. `spend_cap` and `auto_pause_at` are the
490
+ guard rails; set them. Upload the creative first with
491
+ `POST /ad-campaigns/images`.
492
+
493
+ READ `status` IN THE BODY. The app answers a refused launch (campaign not
494
+ found, the platform rejecting it) with a 200 whose `status` is `error`, and
495
+ this route passes that through unchanged rather than guessing an HTTP code
496
+ for it. A launch can also partly succeed - the platform accepts the campaign
497
+ and then rejects a creative in review - so follow up with
498
+ `POST /ad-campaigns/{campaign_id}/status-refresh`.
499
+
500
+ **Input**
501
+
502
+ | Field | Type | Required | Description |
503
+ |---|---|---|---|
504
+ | `path.config_id` | `integer` | yes | The sync config whose audience the campaign targets. |
505
+ | `body` | `LaunchAdCampaignRequest` | yes | Request body; fields below. |
506
+
507
+ Body fields (`LaunchAdCampaignRequest`):
508
+
509
+ | Field | Type | Required | Description |
510
+ |---|---|---|---|
511
+ | `body.ad_copy_variant_index` | `integer \| null` | no | |
512
+ | `body.ad_image_document_id` | `integer \| null` | no | |
513
+ | `body.auto_pause_at` | `string (date-time) \| null` | no | Absolute UTC instant to auto-pause at (ISO-8601 with offset) |
514
+ | `body.auto_pause_tz` | `string \| null` | no | IANA zone the user picked in (display/intent only) max length 64 |
515
+ | `body.creative_image_url` | `string \| null` | no | default `""`, max length 500 |
516
+ | `body.creative_image_url_portrait` | `string \| null` | no | default `""`, max length 500 |
517
+ | `body.creative_image_url_square` | `string \| null` | no | default `""`, max length 500 |
518
+ | `body.cta` | `string \| null` | no | default `"LEARN_MORE"` |
519
+ | `body.currency` | `string` | no | default `"USD"`, max length 3 |
520
+ | `body.custom_segment_keywords` | `Array<string> \| null` | no | Demand Gen only: intent keywords for a custom segment (people who search these) |
521
+ | `body.custom_segment_urls` | `Array<string> \| null` | no | Demand Gen only: competitor/relevant URLs for a custom segment (people who browse these) |
522
+ | `body.customer_match_mode` | `string \| null` | no | Google Customer Match mode: observation (default) \| targeting \| exclusion default `"observation"` |
523
+ | `body.daily_budget` | `number` | no | default `50`, > 0 |
524
+ | `body.destination_url` | `string \| null` | no | default `""`, max length 500 |
525
+ | `body.end_date` | `string (date) \| null` | no | |
526
+ | `body.geo_target_country` | `string \| null` | no | ISO 3166-1 alpha-2 country code for the location criterion (Google observation/exclusion modes) default `"US"`, min length 2, max length 2 |
527
+ | `body.google_campaign_subtype` | `string \| null` | no | Google campaign subtype: display (default) \| demand_gen \| search default `"display"` |
528
+ | `body.headline` | `string \| null` | no | default `""`, max length 255 |
529
+ | `body.include_lookalike_audiences` | `boolean \| null` | no | Demand Gen only: attach the lookalike segment derived from the Customer Match list default `false` |
530
+ | `body.logo_image_url` | `string \| null` | no | default `""`, max length 500 |
531
+ | `body.name` | `string \| null` | no | User-provided campaign name; auto-generated if empty default `""`, max length 255 |
532
+ | `body.objective` | `string` | no | default `"traffic"` |
533
+ | `body.primary_text` | `string \| null` | no | default `""`, max length 1000 |
534
+ | `body.rsa_descriptions` | `Array<string> \| null` | no | Google Search only: 2-4 Responsive Search Ad descriptions (≤90 chars each) |
535
+ | `body.rsa_headlines` | `Array<string> \| null` | no | Google Search only: 3-15 Responsive Search Ad headlines (≤30 chars each) |
536
+ | `body.search_keywords` | `Array<Record<string, unknown>> \| null` | no | Google Search only: [{text, match_type: broad\|phrase\|exact, negative: bool}] |
537
+ | `body.selected_channels` | `Record<string, boolean> \| null` | no | Google Video only: placement switches — youtube_in_stream \| youtube_in_feed \| youtube_shorts \| discover \| gmail \| display \| maps (true/false) |
538
+ | `body.special_ad_categories` | `Array<string> \| null` | no | Meta special ad categories: HOUSING \| EMPLOYMENT \| CREDIT \| FINANCIAL_PRODUCTS_SERVICES \| ISSUES_ELECTIONS_POLITICS \| ONLINE_GAMBLING_AND_GAMING \| NONE |
539
+ | `body.spend_cap` | `number \| null` | no | Auto-pause once lifetime SERVED spend reaches this (account currency) > 0 |
540
+ | `body.start_date` | `string (date)` | no | |
541
+ | `body.video_asset_ids` | `Array<integer> \| null` | no | Google Video only: 1-5 ids of the org's ad_video_assets rows to advertise |
542
+ | `body.video_business_name` | `string \| null` | no | Google Video only: advertiser/brand name shown on the ad (≤25 chars) default `""`, max length 25 |
543
+ | `body.video_cta` | `string \| null` | no | Google Video only: CallToActionType enum value (e.g. LEARN_MORE, SIGN_UP) default `"LEARN_MORE"` |
544
+ | `body.video_descriptions` | `Array<string> \| null` | no | Google Video only: 3-5 descriptions (≤90 chars each) |
545
+ | `body.video_headlines` | `Array<string> \| null` | no | Google Video only: 3-5 headlines (≤40 chars each) |
546
+ | `body.video_long_headlines` | `Array<string> \| null` | no | Google Video only: 3-5 long headlines (≤90 chars each) |
547
+
548
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
549
+
550
+ Other envelope fields: `pagination` (PaginationMeta).
551
+
552
+ **Example**
553
+
554
+ ```ts
555
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
556
+ const result = await g8.api.adCampaigns.launchAdCampaign({ path: { config_id: 123 }, body: {} });
557
+ ```
558
+
559
+ ---
560
+
561
+ <a id="op-listadcampaigns"></a>
562
+
563
+ ### `g8.api.adCampaigns.listAdCampaigns(input?)`
564
+
565
+ **List Ad Campaigns**
566
+
567
+ - HTTP: `GET /api/v1/ad-campaigns`
568
+ - operationId: `list_ad_campaigns_ad_campaigns_get` (also callable as `g8.api.call("list_ad_campaigns_ad_campaigns_get", input)`)
569
+ - Tier: `read`: reads data; safe to call and to retry
570
+ - API-key scope: `ads:read`
571
+
572
+ List the org's paid ad campaigns.
573
+
574
+ **Input**
575
+
576
+ | Field | Type | Required | Description |
577
+ |---|---|---|---|
578
+ | `query.platform` | `string \| null` | no | Filter by platform: google \| linkedin |
579
+
580
+ **Returns** `ApiResponse_list_AdCampaignResponse__`: the envelope `{ data: Array<AdCampaignResponse>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
581
+
582
+ Other envelope fields: `pagination` (PaginationMeta).
583
+
584
+ `AdCampaignResponse` fields:
585
+
586
+ | Field | Type | Required | Description |
587
+ |---|---|---|---|
588
+ | `id` | `integer` | yes | |
589
+ | `name` | `string` | yes | |
590
+ | `platform` | `string` | yes | |
591
+ | `status` | `string` | yes | |
592
+ | `sync_config_id` | `integer` | yes | |
593
+ | `ad_count` | `integer` | no | Number of live (non-archived) ads in this campaign default `0` |
594
+ | `created_at` | `string \| null` | no | |
595
+ | `currency` | `string \| null` | no | |
596
+ | `daily_budget` | `number \| null` | no | |
597
+ | `end_date` | `string \| null` | no | |
598
+ | `google_campaign_subtype` | `string \| null` | no | |
599
+ | `launched_at` | `string \| null` | no | |
600
+ | `objective` | `string \| null` | no | |
601
+ | `platform_campaign_id` | `string \| null` | no | |
602
+ | `start_date` | `string \| null` | no | |
603
+
604
+ **Example**
605
+
606
+ ```ts
607
+ const result = await g8.api.adCampaigns.listAdCampaigns();
608
+ ```
609
+
610
+ ---
611
+
612
+ <a id="op-listcampaignads"></a>
613
+
614
+ ### `g8.api.adCampaigns.listCampaignAds(input)`
615
+
616
+ **List Campaign Ads**
617
+
618
+ - HTTP: `GET /api/v1/ad-campaigns/{campaign_id}/ads`
619
+ - operationId: `list_campaign_ads_ad_campaigns__campaign_id__ads_get` (also callable as `g8.api.call("list_campaign_ads_ad_campaigns__campaign_id__ads_get", input)`)
620
+ - Tier: `read`: reads data; safe to call and to retry
621
+ - API-key scope: `ads:read`
622
+
623
+ List the ads in a campaign.
624
+
625
+ Always a collection. A campaign launched before per-ad control existed
626
+ returns its single implicit ad, promoted to a real slot on first read so the
627
+ caller receives a stable id it can act on.
628
+
629
+ **Input**
630
+
631
+ | Field | Type | Required | Description |
632
+ |---|---|---|---|
633
+ | `path.campaign_id` | `integer` | yes | Ad campaign ID |
634
+ | `query.include_archived` | `boolean` | no | default `false` |
635
+
636
+ **Returns** `ApiResponse_AdListResponse_`: the envelope `{ data: AdListResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
637
+
638
+ Other envelope fields: `pagination` (PaginationMeta).
639
+
640
+ `AdListResponse` fields:
641
+
642
+ | Field | Type | Required | Description |
643
+ |---|---|---|---|
644
+ | `ads` | `Array<AdResponse>` | yes | |
645
+ | `campaign_id` | `integer` | yes | |
646
+ | `count` | `integer` | yes | |
647
+ | `platform` | `string \| null` | no | |
648
+
649
+ **Example**
650
+
651
+ ```ts
652
+ const result = await g8.api.adCampaigns.listCampaignAds({ path: { campaign_id: 123 } });
653
+ ```
654
+
655
+ ---
656
+
657
+ <a id="op-previewadcampaignedit"></a>
658
+
659
+ ### `g8.api.adCampaigns.previewAdCampaignEdit(input)`
660
+
661
+ **Preview Ad Campaign Edit**
662
+
663
+ - HTTP: `POST /api/v1/ad-campaigns/{campaign_id}/edit-preview`
664
+ - operationId: `preview_ad_campaign_edit_ad_campaigns__campaign_id__edit_preview_post` (also callable as `g8.api.call("preview_ad_campaign_edit_ad_campaigns__campaign_id__edit_preview_post", input)`)
665
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
666
+ - API-key scope: `ads:run`
667
+
668
+ What an edit WOULD change, without applying any of it.
669
+
670
+ Same body and same response shape as `PUT /ad-campaigns/{campaign_id}`.
671
+ Reads the campaign's live platform state to diff against and changes
672
+ nothing. Run it first: some changes restart the platform's learning phase.
673
+
674
+ **Input**
675
+
676
+ | Field | Type | Required | Description |
677
+ |---|---|---|---|
678
+ | `path.campaign_id` | `integer` | yes | The ad campaign's id. |
679
+ | `body` | `UpdateAdCampaignRequest` | yes | Request body; fields below. |
680
+
681
+ Body fields (`UpdateAdCampaignRequest`):
682
+
683
+ | Field | Type | Required | Description |
684
+ |---|---|---|---|
685
+ | `body.action` | `string \| null` | no | |
686
+ | `body.auto_pause_at` | `string (date-time) \| null` | no | Absolute UTC instant to auto-pause at (ISO-8601 with offset) |
687
+ | `body.auto_pause_tz` | `string \| null` | no | max length 64 |
688
+ | `body.campaign_negative_keywords` | `Array<Record<string, unknown>> \| null` | no | Google only: COMPLETE desired campaign-level negative keywords [{text, match_type}] |
689
+ | `body.clear_auto_stop` | `boolean` | no | default `false` |
690
+ | `body.creative_image_url` | `string \| null` | no | max length 500 |
691
+ | `body.creative_image_url_portrait` | `string \| null` | no | max length 500 |
692
+ | `body.creative_image_url_square` | `string \| null` | no | max length 500 |
693
+ | `body.cta` | `string \| null` | no | |
694
+ | `body.daily_budget` | `number \| null` | no | > 0 |
695
+ | `body.destination_url` | `string \| null` | no | max length 500 |
696
+ | `body.end_date` | `string (date) \| null` | no | |
697
+ | `body.geo_targets` | `Array<string> \| null` | no | Google only: COMPLETE list of geo target constant ids, e.g. ["2840"] |
698
+ | `body.headline` | `string \| null` | no | max length 255 |
699
+ | `body.keywords` | `Array<Record<string, unknown>> \| null` | no | Google Search only: COMPLETE desired keyword list [{text, match_type, negative, paused, cpc_bid}] |
700
+ | `body.logo_image_url` | `string \| null` | no | max length 500 |
701
+ | `body.name` | `string \| null` | no | max length 255 |
702
+ | `body.primary_text` | `string \| null` | no | max length 1000 |
703
+ | `body.rsa_descriptions` | `Array<string> \| null` | no | Google Search only: COMPLETE list of 2-4 RSA descriptions (<=90 chars each) |
704
+ | `body.rsa_headlines` | `Array<string> \| null` | no | Google Search only: COMPLETE list of 3-15 RSA headlines (<=30 chars each) |
705
+ | `body.selected_channels` | `Record<string, boolean> \| null` | no | Google Video only: COMPLETE placement map (7 DemandGenSelectedChannels keys) |
706
+ | `body.spend_cap` | `number \| null` | no | > 0 |
707
+ | `body.video_asset_ids` | `Array<integer> \| null` | no | Google Video only: COMPLETE list of 1-5 ad_video_assets ids (None = unchanged) |
708
+ | `body.video_business_name` | `string \| null` | no | Google Video only: ≤25 chars max length 25 |
709
+ | `body.video_cta` | `string \| null` | no | Google Video only: CallToActionType value |
710
+ | `body.video_descriptions` | `Array<string> \| null` | no | Google Video only: COMPLETE list, 3-5 × ≤90 |
711
+ | `body.video_headlines` | `Array<string> \| null` | no | Google Video only: COMPLETE list, 3-5 × ≤40 |
712
+ | `body.video_long_headlines` | `Array<string> \| null` | no | Google Video only: COMPLETE list, 3-5 × ≤90 |
713
+
714
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
715
+
716
+ Other envelope fields: `pagination` (PaginationMeta).
717
+
718
+ **Example**
719
+
720
+ ```ts
721
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
722
+ const result = await g8.api.adCampaigns.previewAdCampaignEdit({ path: { campaign_id: 123 }, body: {} });
723
+ ```
724
+
725
+ ---
726
+
727
+ <a id="op-refreshallcampaignstatuses"></a>
728
+
729
+ ### `g8.api.adCampaigns.refreshAllCampaignStatuses(input?)`
730
+
731
+ **Refresh All Campaign Statuses**
732
+
733
+ - HTTP: `POST /api/v1/ad-campaigns/status-refresh`
734
+ - operationId: `refresh_all_campaign_statuses_ad_campaigns_status_refresh_post` (also callable as `g8.api.call("refresh_all_campaign_statuses_ad_campaigns_status_refresh_post", input)`)
735
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
736
+ - API-key scope: `ads:run`
737
+
738
+ Re-read every refreshable campaign's review state from its platform.
739
+
740
+ 504 if the platforms take too long; the campaigns that did refresh keep
741
+ their new state, so a retry is safe and picks up where it stopped.
742
+
743
+ **Input**: none.
744
+
745
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
746
+
747
+ Other envelope fields: `pagination` (PaginationMeta).
748
+
749
+ **Example**
750
+
751
+ ```ts
752
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
753
+ const result = await g8.api.adCampaigns.refreshAllCampaignStatuses();
754
+ ```
755
+
756
+ ---
757
+
758
+ <a id="op-refreshcampaignstatus"></a>
759
+
760
+ ### `g8.api.adCampaigns.refreshCampaignStatus(input)`
761
+
762
+ **Refresh Campaign Status**
763
+
764
+ - HTTP: `POST /api/v1/ad-campaigns/{campaign_id}/status-refresh`
765
+ - operationId: `refresh_campaign_status_ad_campaigns__campaign_id__status_refresh_post` (also callable as `g8.api.call("refresh_campaign_status_ad_campaigns__campaign_id__status_refresh_post", input)`)
766
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
767
+ - API-key scope: `ads:run`
768
+
769
+ Re-read one campaign's review state from its platform.
770
+
771
+ Policy review is ASYNCHRONOUS: a creative can be auto-rejected minutes
772
+ after the platform accepted the campaign, and graph8's copy still says it
773
+ launched. This promotes the platform's real state - `REJECTED`,
774
+ `NEEDS_REVIEW` - into it. A live platform read; nothing is changed on the
775
+ platform.
776
+
777
+ **Input**
778
+
779
+ | Field | Type | Required | Description |
780
+ |---|---|---|---|
781
+ | `path.campaign_id` | `integer` | yes | The ad campaign's id. |
782
+
783
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
784
+
785
+ Other envelope fields: `pagination` (PaginationMeta).
786
+
787
+ **Example**
788
+
789
+ ```ts
790
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
791
+ const result = await g8.api.adCampaigns.refreshCampaignStatus({ path: { campaign_id: 123 } });
792
+ ```
793
+
794
+ ---
795
+
796
+ <a id="op-retrycampaignlaunch"></a>
797
+
798
+ ### `g8.api.adCampaigns.retryCampaignLaunch(input)`
799
+
800
+ **Retry Campaign Launch**
801
+
802
+ - HTTP: `POST /api/v1/ad-campaigns/{campaign_id}/retry`
803
+ - operationId: `retry_campaign_launch_ad_campaigns__campaign_id__retry_post` (also callable as `g8.api.call("retry_campaign_launch_ad_campaigns__campaign_id__retry_post", input)`)
804
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
805
+ - API-key scope: `ads:run`
806
+
807
+ Re-attempt a launch that failed or stalled.
808
+
809
+ THIS SPENDS THE CUSTOMER'S ADVERTISING BUDGET when it succeeds - the
810
+ campaign goes live on the platform with the budget it was created with.
811
+ Like the launch, a refusal comes back as a 200 whose body `status` is
812
+ `error` - read it. Check `GET /ad-campaigns/{campaign_id}` first: a
813
+ campaign that is already live does not need this, and retrying one whose
814
+ creative was rejected will fail the same way until the creative changes.
815
+
816
+ **Input**
817
+
818
+ | Field | Type | Required | Description |
819
+ |---|---|---|---|
820
+ | `path.campaign_id` | `integer` | yes | The ad campaign's id. |
821
+
822
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
823
+
824
+ Other envelope fields: `pagination` (PaginationMeta).
825
+
826
+ **Example**
827
+
828
+ ```ts
829
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
830
+ const result = await g8.api.adCampaigns.retryCampaignLaunch({ path: { campaign_id: 123 } });
831
+ ```
832
+
833
+ ---
834
+
835
+ <a id="op-setcampaignadstatus"></a>
836
+
837
+ ### `g8.api.adCampaigns.setCampaignAdStatus(input)`
838
+
839
+ **Set Campaign Ad Status**
840
+
841
+ - HTTP: `POST /api/v1/ad-campaigns/{campaign_id}/ads/{ad_id}/status`
842
+ - operationId: `set_campaign_ad_status_ad_campaigns__campaign_id__ads__ad_id__status_post` (also callable as `g8.api.call("set_campaign_ad_status_ad_campaigns__campaign_id__ads__ad_id__status_post", input)`)
843
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
844
+ - API-key scope: `ads:run`
845
+
846
+ Pause or resume one ad, leaving its siblings and the campaign untouched.
847
+
848
+ Changes what the campaign's budget is spent on, so this needs ``ads:run``.
849
+ A LinkedIn creative still in policy review cannot be paused; that returns a
850
+ 400 with an actionable message rather than a raw platform error.
851
+
852
+ **Input**
853
+
854
+ | Field | Type | Required | Description |
855
+ |---|---|---|---|
856
+ | `path.campaign_id` | `integer` | yes | Ad campaign ID |
857
+ | `path.ad_id` | `integer` | yes | graph8 ad ID |
858
+ | `body` | `AdStatusRequest` | yes | Request body; fields below. |
859
+
860
+ Body fields (`AdStatusRequest`):
861
+
862
+ | Field | Type | Required | Description |
863
+ |---|---|---|---|
864
+ | `body.status` | `"active" \| "paused"` | yes | |
865
+
866
+ **Returns** `ApiResponse_AdResponse_`: the envelope `{ data: AdResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
867
+
868
+ Other envelope fields: `pagination` (PaginationMeta).
869
+
870
+ `AdResponse` fields:
871
+
872
+ | Field | Type | Required | Description |
873
+ |---|---|---|---|
874
+ | `campaign_id` | `integer` | yes | |
875
+ | `slot_index` | `integer` | yes | |
876
+ | `status` | `string` | yes | draft \| launching \| active \| paused \| archived \| failed |
877
+ | `approval_nuance` | `string \| null` | no | |
878
+ | `copy_assets` | `Record<string, unknown> \| null` | no | Multi-asset copy, e.g. {rsa_headlines: [...], rsa_descriptions: [...]} |
879
+ | `created_at` | `string \| null` | no | |
880
+ | `creative_image_url` | `string \| null` | no | |
881
+ | `creative_image_url_portrait` | `string \| null` | no | |
882
+ | `creative_image_url_square` | `string \| null` | no | |
883
+ | `cta` | `string \| null` | no | |
884
+ | `description` | `string \| null` | no | |
885
+ | `destination_url` | `string \| null` | no | |
886
+ | `error_message` | `string \| null` | no | |
887
+ | `headline` | `string \| null` | no | |
888
+ | `id` | `integer \| null` | no | graph8 ad id, stable across creative replacements. Null only for a campaign launched before per-ad control, until its first read. |
889
+ | `launched_at` | `string \| null` | no | |
890
+ | `logo_image_url` | `string \| null` | no | |
891
+ | `name` | `string \| null` | no | |
892
+ | `platform_ad_id` | `string \| null` | no | Current platform handle. Changes when the creative is replaced. |
893
+ | `policy_topics` | `Array<Record<string, unknown>> \| null` | no | |
894
+ | `primary_text` | `string \| null` | no | |
895
+ | `source_ad_creative_id` | `string \| null` | no | The Studio creative this ad was built from, when it came from Studio |
896
+
897
+ **Example**
898
+
899
+ ```ts
900
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
901
+ const result = await g8.api.adCampaigns.setCampaignAdStatus({ path: { campaign_id: 123, ad_id: 123 }, body: { status: "active" } });
902
+ ```
903
+
904
+ ---
905
+
906
+ <a id="op-updateadcampaign"></a>
907
+
908
+ ### `g8.api.adCampaigns.updateAdCampaign(input)`
909
+
910
+ **Update Ad Campaign**
911
+
912
+ - HTTP: `PUT /api/v1/ad-campaigns/{campaign_id}`
913
+ - operationId: `update_ad_campaign_ad_campaigns__campaign_id__put` (also callable as `g8.api.call("update_ad_campaign_ad_campaigns__campaign_id__put", input)`)
914
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
915
+ - API-key scope: `ads:run`
916
+
917
+ Edit a LIVE campaign: budget, schedule, creative, keywords, ad copy,
918
+ targeting, pause or resume.
919
+
920
+ Omitted fields are left alone; an unknown field is a 422 (the app's model
921
+ forbids extras, so a typo cannot silently do nothing). Read
922
+ `GET /ad-campaigns/{campaign_id}/editable` first - the platform refuses
923
+ some changes on some campaign types and states.
924
+
925
+ A 200 is NOT blanket success: the response `status` is `partial` whenever
926
+ any single change failed, and `changes[]` says which.
927
+
928
+ **Input**
929
+
930
+ | Field | Type | Required | Description |
931
+ |---|---|---|---|
932
+ | `path.campaign_id` | `integer` | yes | The ad campaign's id. |
933
+ | `body` | `UpdateAdCampaignRequest` | yes | Request body; fields below. |
934
+
935
+ Body fields (`UpdateAdCampaignRequest`):
936
+
937
+ | Field | Type | Required | Description |
938
+ |---|---|---|---|
939
+ | `body.action` | `string \| null` | no | |
940
+ | `body.auto_pause_at` | `string (date-time) \| null` | no | Absolute UTC instant to auto-pause at (ISO-8601 with offset) |
941
+ | `body.auto_pause_tz` | `string \| null` | no | max length 64 |
942
+ | `body.campaign_negative_keywords` | `Array<Record<string, unknown>> \| null` | no | Google only: COMPLETE desired campaign-level negative keywords [{text, match_type}] |
943
+ | `body.clear_auto_stop` | `boolean` | no | default `false` |
944
+ | `body.creative_image_url` | `string \| null` | no | max length 500 |
945
+ | `body.creative_image_url_portrait` | `string \| null` | no | max length 500 |
946
+ | `body.creative_image_url_square` | `string \| null` | no | max length 500 |
947
+ | `body.cta` | `string \| null` | no | |
948
+ | `body.daily_budget` | `number \| null` | no | > 0 |
949
+ | `body.destination_url` | `string \| null` | no | max length 500 |
950
+ | `body.end_date` | `string (date) \| null` | no | |
951
+ | `body.geo_targets` | `Array<string> \| null` | no | Google only: COMPLETE list of geo target constant ids, e.g. ["2840"] |
952
+ | `body.headline` | `string \| null` | no | max length 255 |
953
+ | `body.keywords` | `Array<Record<string, unknown>> \| null` | no | Google Search only: COMPLETE desired keyword list [{text, match_type, negative, paused, cpc_bid}] |
954
+ | `body.logo_image_url` | `string \| null` | no | max length 500 |
955
+ | `body.name` | `string \| null` | no | max length 255 |
956
+ | `body.primary_text` | `string \| null` | no | max length 1000 |
957
+ | `body.rsa_descriptions` | `Array<string> \| null` | no | Google Search only: COMPLETE list of 2-4 RSA descriptions (<=90 chars each) |
958
+ | `body.rsa_headlines` | `Array<string> \| null` | no | Google Search only: COMPLETE list of 3-15 RSA headlines (<=30 chars each) |
959
+ | `body.selected_channels` | `Record<string, boolean> \| null` | no | Google Video only: COMPLETE placement map (7 DemandGenSelectedChannels keys) |
960
+ | `body.spend_cap` | `number \| null` | no | > 0 |
961
+ | `body.video_asset_ids` | `Array<integer> \| null` | no | Google Video only: COMPLETE list of 1-5 ad_video_assets ids (None = unchanged) |
962
+ | `body.video_business_name` | `string \| null` | no | Google Video only: ≤25 chars max length 25 |
963
+ | `body.video_cta` | `string \| null` | no | Google Video only: CallToActionType value |
964
+ | `body.video_descriptions` | `Array<string> \| null` | no | Google Video only: COMPLETE list, 3-5 × ≤90 |
965
+ | `body.video_headlines` | `Array<string> \| null` | no | Google Video only: COMPLETE list, 3-5 × ≤40 |
966
+ | `body.video_long_headlines` | `Array<string> \| null` | no | Google Video only: COMPLETE list, 3-5 × ≤90 |
967
+
968
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
969
+
970
+ Other envelope fields: `pagination` (PaginationMeta).
971
+
972
+ **Example**
973
+
974
+ ```ts
975
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
976
+ const result = await g8.api.adCampaigns.updateAdCampaign({ path: { campaign_id: 123 }, body: {} });
977
+ ```
978
+
979
+ ---
980
+
981
+ <a id="op-updatecampaignad"></a>
982
+
983
+ ### `g8.api.adCampaigns.updateCampaignAd(input)`
984
+
985
+ **Update Campaign Ad**
986
+
987
+ - HTTP: `PATCH /api/v1/ad-campaigns/{campaign_id}/ads/{ad_id}`
988
+ - operationId: `update_campaign_ad_ad_campaigns__campaign_id__ads__ad_id__patch` (also callable as `g8.api.call("update_campaign_ad_ad_campaigns__campaign_id__ads__ad_id__patch", input)`)
989
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
990
+ - API-key scope: `ads:run`
991
+
992
+ Edit one ad's creative.
993
+
994
+ Check ``replaced_platform_ad`` in the response: on a live campaign most
995
+ creative edits archive the platform ad and create a new one, restarting
996
+ policy review and delivery learning. The graph8 ad id and its measurement
997
+ history survive that.
998
+
999
+ **Input**
1000
+
1001
+ | Field | Type | Required | Description |
1002
+ |---|---|---|---|
1003
+ | `path.campaign_id` | `integer` | yes | Ad campaign ID |
1004
+ | `path.ad_id` | `integer` | yes | graph8 ad ID |
1005
+ | `body` | `AdUpdateRequest` | yes | Request body; fields below. |
1006
+
1007
+ Body fields (`AdUpdateRequest`):
1008
+
1009
+ | Field | Type | Required | Description |
1010
+ |---|---|---|---|
1011
+ | `body.copy_assets` | `Record<string, unknown> \| null` | no | |
1012
+ | `body.creative_image_url` | `string \| null` | no | max length 500 |
1013
+ | `body.creative_image_url_portrait` | `string \| null` | no | max length 500 |
1014
+ | `body.creative_image_url_square` | `string \| null` | no | max length 500 |
1015
+ | `body.cta` | `string \| null` | no | max length 50 |
1016
+ | `body.description` | `string \| null` | no | max length 1000 |
1017
+ | `body.destination_url` | `string \| null` | no | max length 500 |
1018
+ | `body.headline` | `string \| null` | no | max length 255 |
1019
+ | `body.logo_image_url` | `string \| null` | no | max length 500 |
1020
+ | `body.name` | `string \| null` | no | max length 255 |
1021
+ | `body.primary_text` | `string \| null` | no | max length 1000 |
1022
+ | `body.source_ad_creative_id` | `string \| null` | no | max length 64 |
1023
+
1024
+ **Returns** `ApiResponse_AdUpdateResponse_`: the envelope `{ data: AdUpdateResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1025
+
1026
+ Other envelope fields: `pagination` (PaginationMeta).
1027
+
1028
+ `AdUpdateResponse` fields:
1029
+
1030
+ | Field | Type | Required | Description |
1031
+ |---|---|---|---|
1032
+ | `ad` | `AdResponse` | yes | |
1033
+ | `changed` | `Array<string>` | yes | |
1034
+ | `replaced_platform_ad` | `boolean` | yes | True when the platform ad was recreated; review and learning restart |
1035
+ | `consequences` | `Array<string>` | no | policy_review \| learning_reset |
1036
+
1037
+ **Example**
1038
+
1039
+ ```ts
1040
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
1041
+ const result = await g8.api.adCampaigns.updateCampaignAd({ path: { campaign_id: 123, ad_id: 123 }, body: {} });
1042
+ ```
1043
+
1044
+ ---
1045
+
1046
+ <a id="op-uploadadimage"></a>
1047
+
1048
+ ### `g8.api.adCampaigns.uploadAdImage(input?)`
1049
+
1050
+ **Upload Ad Image**
1051
+
1052
+ - HTTP: `POST /api/v1/ad-campaigns/images`
1053
+ - operationId: `upload_ad_image_ad_campaigns_images_post` (also callable as `g8.api.call("upload_ad_image_ad_campaigns_images_post", input)`)
1054
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
1055
+ - API-key scope: `ads:run`
1056
+
1057
+ Upload an ad creative image and get back the public URL a launch takes.
1058
+
1059
+ The app's own checks run unchanged: 10 MB, and the file's MAGIC BYTES decide
1060
+ its type rather than its name or declared content type. SVG is refused with
1061
+ a 422 - no ad platform accepts it; rasterise first.
1062
+
1063
+ **Input**: none.
1064
+
1065
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1066
+
1067
+ Other envelope fields: `pagination` (PaginationMeta).
1068
+
1069
+ **Example**
1070
+
1071
+ ```ts
1072
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
1073
+ const result = await g8.api.adCampaigns.uploadAdImage();
1074
+ ```
1075
+
1076
+ ---
1077
+
1078
+ ## Referenced types
1079
+
1080
+ Named types that appear in the tables above. Full TypeScript definitions: `G8Contract.<Name>` (`import type { G8Contract } from "@graph8/sdk"`).
1081
+
1082
+ <a id="type-adbatchresultitem"></a>
1083
+
1084
+ ### `AdBatchResultItem`
1085
+
1086
+ | Field | Type | Required | Description |
1087
+ |---|---|---|---|
1088
+ | `index` | `integer` | yes | |
1089
+ | `status` | `string` | yes | |
1090
+ | `ad` | `AdResponse \| null` | no | |
1091
+ | `error` | `string \| null` | no | |