@graph8/sdk 0.245.0 → 0.260.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 +19 -5
  2. package/dist/cli.js +216 -0
  3. package/dist/index.d.mts +283 -12
  4. package/dist/index.d.ts +283 -12
  5. package/dist/index.js +88 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +88 -2
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/react.d.mts +274 -12
  10. package/dist/react.d.ts +274 -12
  11. package/dist/react.js +106 -10
  12. package/dist/react.js.map +1 -1
  13. package/dist/react.mjs +97 -11
  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 +1696 -0
  140. package/docs/api/deals.md +2432 -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,2112 @@
1
+ <!-- Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. -->
2
+
3
+ # `g8.api.gtmContext`: GTM Context
4
+
5
+ 51 operations (17 read, 23 write, 6 destructive, 5 billable).
6
+
7
+ 13 of these also have a hand-written method (`g8.mailboxes`, `g8.studio`), marked **★** below. Prefer the hand-written method when one exists: it unwraps the `data` envelope and takes friendlier arguments. See [../sdk-clients.md](../sdk-clients.md).
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: [gtmContext.d.ts](gtmContext.d.ts).
20
+
21
+ ## Operations
22
+
23
+ | Call | HTTP | Tier | Scope | Summary |
24
+ |---|---|---|---|---|
25
+ | [`approveCompanyProfile`](#op-approvecompanyprofile) | `POST /api/v1/company-profile/approve` | write | `campaigns:write` | Approve Company Profile |
26
+ | [`approveCompanyProfileKeywords`](#op-approvecompanyprofilekeywords) | `POST /api/v1/company-profile/keywords/approve` | write | `campaigns:write` | Approve Company Profile Keywords |
27
+ | [`archiveIcp`](#op-archiveicp) ★ | `POST /api/v1/icps/{icp_id}/archive` | destructive | `campaigns:delete` | Archive Icp |
28
+ | [`archivePersona`](#op-archivepersona) ★ | `POST /api/v1/personas/{persona_id}/archive` | destructive | `campaigns:delete` | Archive Persona |
29
+ | [`createIcp`](#op-createicp) ★ | `POST /api/v1/icps` | write | `campaigns:write` | Create Icp |
30
+ | [`createPersona`](#op-createpersona) ★ | `POST /api/v1/personas` | write | `campaigns:write` | Create Persona |
31
+ | [`deleteAllDocuments`](#op-deletealldocuments) | `DELETE /api/v1/global-context/documents` | destructive | `campaigns:delete` | Delete All Documents |
32
+ | [`deleteDocument`](#op-deletedocument) | `DELETE /api/v1/global-context/documents/{doc_type}` | destructive | `campaigns:delete` | Delete Document |
33
+ | [`extractCompanyData`](#op-extractcompanydata) | `POST /api/v1/global-context/extract-company-data` | write | `campaigns:write` | Extract Company Data |
34
+ | [`generateAllDocuments`](#op-generatealldocuments) | `POST /api/v1/global-context/generate-all` | billable | `campaigns:run` | Generate All Documents |
35
+ | [`generateCompanyProfile`](#op-generatecompanyprofile) | `POST /api/v1/company-profile/generate` | billable | `campaigns:run` | Generate Company Profile |
36
+ | [`getBuyingJourneyCrmStatus`](#op-getbuyingjourneycrmstatus) | `GET /api/v1/global-context/documents/buying-journey/crm-status` | read | `campaigns:read` | Get Buying Journey Crm Status |
37
+ | [`getCompanyProfile`](#op-getcompanyprofile) | `GET /api/v1/company-profile` | read | `campaigns:read` | Get Company Profile |
38
+ | [`getCompanyProfileWorkflowStatus`](#op-getcompanyprofileworkflowstatus) | `GET /api/v1/company-profile/workflow-status` | read | `campaigns:read` | Get Company Profile Workflow Status |
39
+ | [`getDocHighlights`](#op-getdochighlights) | `GET /api/v1/global-context/doc/{doc_type}/highlights` | read | `campaigns:read` | Get Doc Highlights |
40
+ | [`getDocumentsAnalytics`](#op-getdocumentsanalytics) | `GET /api/v1/global-context/documents/analytics` | read | `campaigns:read` | Get Documents Analytics |
41
+ | [`getGlobalContextDocument`](#op-getglobalcontextdocument) | `GET /api/v1/global-context/documents/{doc_id}` | read | `campaigns:read` | Get Global Context Document |
42
+ | [`getLatestPipeline`](#op-getlatestpipeline) | `GET /api/v1/global-context/pipeline/latest` | read | `campaigns:read` | Get Latest Pipeline |
43
+ | [`getMailboxWarmupAnalytics`](#op-getmailboxwarmupanalytics) ★ | `GET /api/v1/mailboxes/{mailbox_id}/warmup` | read | `campaigns:read` | Get Mailbox Warmup Analytics |
44
+ | [`getPipelineStatus`](#op-getpipelinestatus) | `GET /api/v1/global-context/pipeline/{pipeline_id}` | read | `campaigns:read` | Get Pipeline Status |
45
+ | [`listActivities`](#op-listactivities) | `GET /api/v1/activities` | read | `campaigns:read` | List Activities |
46
+ | [`listGlobalContextDocuments`](#op-listglobalcontextdocuments) ★ | `GET /api/v1/global-context/documents` | read | `campaigns:read` | List Global Context Documents |
47
+ | [`listIcps`](#op-listicps) ★ | `GET /api/v1/icps` | read | `campaigns:read` | List Icps |
48
+ | [`listIntelligenceData`](#op-listintelligencedata) ★ | `GET /api/v1/intelligence-data` | read | `campaigns:read` | List Intelligence Data |
49
+ | [`listMailboxes`](#op-listmailboxes) ★ | `GET /api/v1/mailboxes` | read | `campaigns:read` | List Mailboxes |
50
+ | [`listPersonas`](#op-listpersonas) ★ | `GET /api/v1/personas` | read | `campaigns:read` | List Personas |
51
+ | [`listPipelines`](#op-listpipelines) | `GET /api/v1/global-context/pipelines` | read | `campaigns:read` | List Pipelines |
52
+ | [`listResearchReports`](#op-listresearchreports) ★ | `GET /api/v1/research-reports` | read | `campaigns:read` | List Research Reports |
53
+ | [`regenerateGlobalContext`](#op-regenerateglobalcontext) | `POST /api/v1/global-context/regenerate` | write | `campaigns:write` | Regenerate Global Context |
54
+ | [`regenerateOneDocument`](#op-regenerateonedocument) | `POST /api/v1/global-context/{doc_id}/regenerate` | write | `campaigns:write` | Regenerate One Document |
55
+ | [`reindexAllDocuments`](#op-reindexalldocuments) | `POST /api/v1/global-context/reindex-all` | write | `campaigns:write` | Reindex All Documents |
56
+ | [`reindexCompanyProfile`](#op-reindexcompanyprofile) | `POST /api/v1/company-profile/reindex` | billable | `campaigns:run` | Reindex Company Profile |
57
+ | [`resetCompanyProfileKeywords`](#op-resetcompanyprofilekeywords) | `DELETE /api/v1/company-profile/keywords` | destructive | `campaigns:delete` | Reset Company Profile Keywords |
58
+ | [`resetStuckDocuments`](#op-resetstuckdocuments) | `POST /api/v1/global-context/reset-stuck-documents` | destructive | `campaigns:delete` | Reset Stuck Documents |
59
+ | [`resumePipeline`](#op-resumepipeline) | `POST /api/v1/global-context/resume-pipeline` | write | `campaigns:write` | Resume Pipeline |
60
+ | [`retryCompanyProfile`](#op-retrycompanyprofile) | `POST /api/v1/company-profile/retry` | billable | `campaigns:run` | Retry Company Profile |
61
+ | [`saveBuyingJourneyInterview`](#op-savebuyingjourneyinterview) | `POST /api/v1/global-context/documents/buying-journey/interview` | write | `campaigns:write` | Save Buying Journey Interview |
62
+ | [`scaffoldAllDocuments`](#op-scaffoldalldocuments) | `POST /api/v1/global-context/scaffold` | write | `campaigns:write` | Scaffold All Documents |
63
+ | [`scaffoldCompanyKeywords`](#op-scaffoldcompanykeywords) | `POST /api/v1/global-context/scaffold-company-keywords` | write | `campaigns:write` | Scaffold Company Keywords |
64
+ | [`scaffoldCompanyProfile`](#op-scaffoldcompanyprofile) | `POST /api/v1/global-context/scaffold-company-profile` | write | `campaigns:write` | Scaffold Company Profile |
65
+ | [`stopAllGeneration`](#op-stopallgeneration) | `POST /api/v1/global-context/stop-all-generation` | write | `campaigns:write` | Stop All Generation |
66
+ | [`submitDocumentFeedback`](#op-submitdocumentfeedback) | `POST /api/v1/global-context/documents/{doc_id}/feedback` | write | `campaigns:write` | Submit Document Feedback |
67
+ | [`trackDocumentUsage`](#op-trackdocumentusage) | `POST /api/v1/global-context/documents/{doc_id}/track-usage` | write | `campaigns:write` | Track Document Usage |
68
+ | [`unapproveCompanyProfile`](#op-unapprovecompanyprofile) | `POST /api/v1/company-profile/unapprove` | write | `campaigns:write` | Unapprove Company Profile |
69
+ | [`updateCompanyProfile`](#op-updatecompanyprofile) | `PUT /api/v1/company-profile` | write | `campaigns:write` | Update Company Profile |
70
+ | [`updateGlobalContextDocument`](#op-updateglobalcontextdocument) | `PATCH /api/v1/global-context/documents/{doc_id}` | write | `campaigns:write` | Update Global Context Document |
71
+ | [`updateIcp`](#op-updateicp) ★ | `PATCH /api/v1/icps/{icp_id}` | write | `campaigns:write` | Update Icp |
72
+ | [`updatePersona`](#op-updatepersona) ★ | `PATCH /api/v1/personas/{persona_id}` | write | `campaigns:write` | Update Persona |
73
+ | [`updateResearchReport`](#op-updateresearchreport) | `PATCH /api/v1/research-reports/{report_id}` | billable | `campaigns:run` | Update Research Report |
74
+ | [`uploadCompanyProfileLogo`](#op-uploadcompanyprofilelogo) | `POST /api/v1/company-profile/logo` | write | `campaigns:write` | Upload Company Profile Logo |
75
+ | [`uploadEnablementAsset`](#op-uploadenablementasset) | `POST /api/v1/enablement/assets` | write | `campaigns:write` | Upload Enablement Asset |
76
+
77
+ ---
78
+
79
+ <a id="op-approvecompanyprofile"></a>
80
+
81
+ ### `g8.api.gtmContext.approveCompanyProfile(input)`
82
+
83
+ **Approve Company Profile**
84
+
85
+ - HTTP: `POST /api/v1/company-profile/approve`
86
+ - operationId: `approve_company_profile_company_profile_approve_post` (also callable as `g8.api.call("approve_company_profile_company_profile_approve_post", input)`)
87
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
88
+ - API-key scope: `campaigns:write`
89
+
90
+ Approve the profile. It becomes the org's source of truth and is locked.
91
+
92
+ Refused until the first generation run has completed. Undo with
93
+ `POST /company-profile/unapprove`.
94
+
95
+ **Input**
96
+
97
+ | Field | Type | Required | Description |
98
+ |---|---|---|---|
99
+ | `body` | `ProfileWebsiteRequest` | yes | Request body; fields below. |
100
+
101
+ Body fields (`ProfileWebsiteRequest`):
102
+
103
+ | Field | Type | Required | Description |
104
+ |---|---|---|---|
105
+ | `body.website_url` | `string` | yes | Website the profile was built from. Matched on its canonical domain. |
106
+
107
+ **Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
108
+
109
+ Other envelope fields: `pagination` (PaginationMeta).
110
+
111
+ **Example**
112
+
113
+ ```ts
114
+ const result = await g8.api.gtmContext.approveCompanyProfile({ body: { website_url: "https://example.com" } });
115
+ ```
116
+
117
+ ---
118
+
119
+ <a id="op-approvecompanyprofilekeywords"></a>
120
+
121
+ ### `g8.api.gtmContext.approveCompanyProfileKeywords(input)`
122
+
123
+ **Approve Company Profile Keywords**
124
+
125
+ - HTTP: `POST /api/v1/company-profile/keywords/approve`
126
+ - operationId: `approve_company_profile_keywords_company_profile_keywords_approve_post` (also callable as `g8.api.call("approve_company_profile_keywords_company_profile_keywords_approve_post", input)`)
127
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
128
+ - API-key scope: `campaigns:write`
129
+
130
+ Approve the profile's keyword set. 404 until a profile with keywords exists.
131
+
132
+ **Input**
133
+
134
+ | Field | Type | Required | Description |
135
+ |---|---|---|---|
136
+ | `body` | `ProfileWebsiteRequest` | yes | Request body; fields below. |
137
+
138
+ Body fields (`ProfileWebsiteRequest`):
139
+
140
+ | Field | Type | Required | Description |
141
+ |---|---|---|---|
142
+ | `body.website_url` | `string` | yes | Website the profile was built from. Matched on its canonical domain. |
143
+
144
+ **Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
145
+
146
+ Other envelope fields: `pagination` (PaginationMeta).
147
+
148
+ **Example**
149
+
150
+ ```ts
151
+ const result = await g8.api.gtmContext.approveCompanyProfileKeywords({ body: { website_url: "https://example.com" } });
152
+ ```
153
+
154
+ ---
155
+
156
+ <a id="op-archiveicp"></a>
157
+
158
+ ### `g8.api.gtmContext.archiveIcp(input)`
159
+
160
+ **Archive Icp**
161
+
162
+ - HTTP: `POST /api/v1/icps/{icp_id}/archive`
163
+ - operationId: `archive_icp_icps__icp_id__archive_post` (also callable as `g8.api.call("archive_icp_icps__icp_id__archive_post", input)`)
164
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
165
+ - API-key scope: `campaigns:delete`
166
+ - ★ Hand-written: [`g8.studio.archiveIcp()`](../sdk-clients.md#g8-studio-archiveicp)
167
+
168
+ Archive a Studio ICP (soft delete - sets status='archived').
169
+
170
+ Archived ICPs drop out of the default ``GET /icps`` listing but remain fetchable
171
+ via ``?status=archived``. Returns 404 if the ICP does not exist.
172
+
173
+ **Input**
174
+
175
+ | Field | Type | Required | Description |
176
+ |---|---|---|---|
177
+ | `path.icp_id` | `string` | yes | ICP ID (UUID) |
178
+
179
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
180
+
181
+ Other envelope fields: `pagination` (PaginationMeta).
182
+
183
+ **Example**
184
+
185
+ ```ts
186
+ // destructive: deletes or archives data; confirm with a human before calling.
187
+ const result = await g8.api.gtmContext.archiveIcp({ path: { icp_id: "id" } });
188
+ ```
189
+
190
+ ---
191
+
192
+ <a id="op-archivepersona"></a>
193
+
194
+ ### `g8.api.gtmContext.archivePersona(input)`
195
+
196
+ **Archive Persona**
197
+
198
+ - HTTP: `POST /api/v1/personas/{persona_id}/archive`
199
+ - operationId: `archive_persona_personas__persona_id__archive_post` (also callable as `g8.api.call("archive_persona_personas__persona_id__archive_post", input)`)
200
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
201
+ - API-key scope: `campaigns:delete`
202
+ - ★ Hand-written: [`g8.studio.archivePersona()`](../sdk-clients.md#g8-studio-archivepersona)
203
+
204
+ Archive a Studio persona (soft delete - sets status='archived').
205
+
206
+ Archived personas drop out of the default ``GET /personas`` listing but remain
207
+ fetchable via ``?status=archived``. Returns 404 if the persona does not exist.
208
+
209
+ **Input**
210
+
211
+ | Field | Type | Required | Description |
212
+ |---|---|---|---|
213
+ | `path.persona_id` | `string` | yes | Persona ID (UUID) |
214
+
215
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
216
+
217
+ Other envelope fields: `pagination` (PaginationMeta).
218
+
219
+ **Example**
220
+
221
+ ```ts
222
+ // destructive: deletes or archives data; confirm with a human before calling.
223
+ const result = await g8.api.gtmContext.archivePersona({ path: { persona_id: "id" } });
224
+ ```
225
+
226
+ ---
227
+
228
+ <a id="op-createicp"></a>
229
+
230
+ ### `g8.api.gtmContext.createIcp(input)`
231
+
232
+ **Create Icp**
233
+
234
+ - HTTP: `POST /api/v1/icps`
235
+ - operationId: `create_icp_icps_post` (also callable as `g8.api.call("create_icp_icps_post", input)`)
236
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
237
+ - API-key scope: `campaigns:write`
238
+ - ★ Hand-written: [`g8.studio.createIcp()`](../sdk-clients.md#g8-studio-createicp)
239
+
240
+ Create a Studio ICP (manual - no AI generation).
241
+
242
+ Read-side counterpart already exists (``GET /icps``); this closes the
243
+ "read but can't create" gap for the ICP bucket. The new ICP is created with
244
+ status 'active' and returned in the same shape as ``GET /icps``.
245
+
246
+ **Input**
247
+
248
+ | Field | Type | Required | Description |
249
+ |---|---|---|---|
250
+ | `body` | `CreateIcpRequest` | yes | Request body; fields below. |
251
+
252
+ Body fields (`CreateIcpRequest`):
253
+
254
+ | Field | Type | Required | Description |
255
+ |---|---|---|---|
256
+ | `body.name` | `string` | yes | ICP name/title. |
257
+ | `body.website_url` | `string` | yes | The org website this ICP belongs to. |
258
+ | `body.buying_signals` | `Array<unknown> \| null` | no | List of buying-intent signals. |
259
+ | `body.description` | `string \| null` | no | Freeform ICP description. |
260
+ | `body.estimated_market_size` | `integer \| null` | no | Estimated addressable-market count. |
261
+ | `body.firmographics` | `Record<string, unknown> \| null` | no | Firmographic criteria (industry, size, geo, ...). |
262
+ | `body.tech_stack` | `Record<string, unknown> \| null` | no | Technology signals. |
263
+
264
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
265
+
266
+ Other envelope fields: `pagination` (PaginationMeta).
267
+
268
+ **Example**
269
+
270
+ ```ts
271
+ const result = await g8.api.gtmContext.createIcp({ body: { name: "Example", website_url: "https://example.com" } });
272
+ ```
273
+
274
+ ---
275
+
276
+ <a id="op-createpersona"></a>
277
+
278
+ ### `g8.api.gtmContext.createPersona(input)`
279
+
280
+ **Create Persona**
281
+
282
+ - HTTP: `POST /api/v1/personas`
283
+ - operationId: `create_persona_personas_post` (also callable as `g8.api.call("create_persona_personas_post", input)`)
284
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
285
+ - API-key scope: `campaigns:write`
286
+ - ★ Hand-written: [`g8.studio.createPersona()`](../sdk-clients.md#g8-studio-createpersona)
287
+
288
+ Create a Studio buyer persona (manual - no AI generation).
289
+
290
+ Read-side counterpart already exists (``GET /personas``); this closes the
291
+ "read but can't create" gap for the Persona bucket. The new persona is created
292
+ with status 'active' and returned in the same shape as ``GET /personas``.
293
+
294
+ **Input**
295
+
296
+ | Field | Type | Required | Description |
297
+ |---|---|---|---|
298
+ | `body` | `CreatePersonaRequest` | yes | Request body; fields below. |
299
+
300
+ Body fields (`CreatePersonaRequest`):
301
+
302
+ | Field | Type | Required | Description |
303
+ |---|---|---|---|
304
+ | `body.title` | `string` | yes | Persona title (e.g. 'Director of Marketing Operations'). |
305
+ | `body.website_url` | `string` | yes | The org website this persona belongs to. |
306
+ | `body.campaign_approach` | `string \| null` | no | Recommended campaign approach. |
307
+ | `body.confidence` | `string \| null` | no | Confidence label (e.g. 'high'/'medium'/'low'). Defaults to 'medium'. |
308
+ | `body.expected_receptivity` | `string \| null` | no | Expected receptivity note. |
309
+ | `body.key_signals` | `Array<unknown> \| null` | no | List of buying/intent signals. |
310
+ | `body.priority` | `integer \| null` | no | Display priority (lower sorts first). Defaults to 1. |
311
+ | `body.recommended_goal` | `string \| null` | no | Recommended campaign goal. |
312
+ | `body.source` | `string \| null` | no | Origin label for the persona. Defaults to 'manual'. |
313
+ | `body.why_target` | `string \| null` | no | Why this persona is worth targeting. |
314
+
315
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
316
+
317
+ Other envelope fields: `pagination` (PaginationMeta).
318
+
319
+ **Example**
320
+
321
+ ```ts
322
+ const result = await g8.api.gtmContext.createPersona({ body: { title: "Example", website_url: "https://example.com" } });
323
+ ```
324
+
325
+ ---
326
+
327
+ <a id="op-deletealldocuments"></a>
328
+
329
+ ### `g8.api.gtmContext.deleteAllDocuments(input?)`
330
+
331
+ **Delete All Documents**
332
+
333
+ - HTTP: `DELETE /api/v1/global-context/documents`
334
+ - operationId: `delete_all_documents_global_context_documents_delete` (also callable as `g8.api.call("delete_all_documents_global_context_documents_delete", input)`)
335
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
336
+ - API-key scope: `campaigns:delete`
337
+
338
+ Delete EVERY Global Context document for this organisation.
339
+
340
+ NOT REVERSIBLE, and it is the whole library: every ICP, persona, buying
341
+ journey and profile the org has. Everything downstream that grounds on them
342
+ - campaign generation, the copilot, retrieval - is generating from nothing
343
+ until they are rebuilt.
344
+
345
+ The narrower operation is `DELETE /global-context/documents/{doc_type}`.
346
+
347
+ **Input**: none.
348
+
349
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
350
+
351
+ Other envelope fields: `pagination` (PaginationMeta).
352
+
353
+ **Example**
354
+
355
+ ```ts
356
+ // destructive: deletes or archives data; confirm with a human before calling.
357
+ const result = await g8.api.gtmContext.deleteAllDocuments();
358
+ ```
359
+
360
+ ---
361
+
362
+ <a id="op-deletedocument"></a>
363
+
364
+ ### `g8.api.gtmContext.deleteDocument(input)`
365
+
366
+ **Delete Document**
367
+
368
+ - HTTP: `DELETE /api/v1/global-context/documents/{doc_type}`
369
+ - operationId: `delete_document_global_context_documents__doc_type__delete` (also callable as `g8.api.call("delete_document_global_context_documents__doc_type__delete", input)`)
370
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
371
+ - API-key scope: `campaigns:delete`
372
+
373
+ Delete ONE document, by TYPE rather than by id.
374
+
375
+ The path parameter is a type key, not a document id - deleting
376
+ `company_profile` removes whichever document currently holds that type.
377
+ Not reversible.
378
+
379
+ **Input**
380
+
381
+ | Field | Type | Required | Description |
382
+ |---|---|---|---|
383
+ | `path.doc_type` | `string` | yes | Document type key, e.g. `company_profile`, `icp_research`, `buying_journey`. Free-form on purpose: the set grows with the product and a closed list here would 422 a document the org already has. |
384
+
385
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
386
+
387
+ Other envelope fields: `pagination` (PaginationMeta).
388
+
389
+ **Example**
390
+
391
+ ```ts
392
+ // destructive: deletes or archives data; confirm with a human before calling.
393
+ const result = await g8.api.gtmContext.deleteDocument({ path: { doc_type: "example" } });
394
+ ```
395
+
396
+ ---
397
+
398
+ <a id="op-extractcompanydata"></a>
399
+
400
+ ### `g8.api.gtmContext.extractCompanyData(input)`
401
+
402
+ **Extract Company Data**
403
+
404
+ - HTTP: `POST /api/v1/global-context/extract-company-data`
405
+ - operationId: `extract_company_data_global_context_extract_company_data_post` (also callable as `g8.api.call("extract_company_data_global_context_extract_company_data_post", input)`)
406
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
407
+ - API-key scope: `campaigns:write`
408
+
409
+ Pull company facts out of scraped intelligence data.
410
+
411
+ SPENDS CREDITS when `enrich` is true (the default): the route is
412
+ credit-gated before the model call and answers 402 when the balance is
413
+ short. Send `enrich=false` for the scrape-derived fields alone, which costs
414
+ nothing extra.
415
+
416
+ The app takes an untyped body here; this contract types it, so a missing
417
+ `website_url` is a 422 naming the field rather than a 400 describing it.
418
+
419
+ **Input**
420
+
421
+ | Field | Type | Required | Description |
422
+ |---|---|---|---|
423
+ | `body` | `ExtractCompanyDataRequest` | yes | Request body; fields below. |
424
+
425
+ Body fields (`ExtractCompanyDataRequest`):
426
+
427
+ | Field | Type | Required | Description |
428
+ |---|---|---|---|
429
+ | `body.website_url` | `string` | yes | Company website to extract from. Intelligence data for it must already exist. min length 1 |
430
+ | `body.enrich` | `boolean` | no | Enrich the extracted fields through Apollo. SPENDS CREDITS - the call is credit-gated and answers 402 when the balance is short. default `true` |
431
+
432
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
433
+
434
+ Other envelope fields: `pagination` (PaginationMeta).
435
+
436
+ **Example**
437
+
438
+ ```ts
439
+ const result = await g8.api.gtmContext.extractCompanyData({ body: { website_url: "https://example.com" } });
440
+ ```
441
+
442
+ ---
443
+
444
+ <a id="op-generatealldocuments"></a>
445
+
446
+ ### `g8.api.gtmContext.generateAllDocuments(input)`
447
+
448
+ **Generate All Documents**
449
+
450
+ - HTTP: `POST /api/v1/global-context/generate-all`
451
+ - operationId: `generate_all_documents_global_context_generate_all_post` (also callable as `g8.api.call("generate_all_documents_global_context_generate_all_post", input)`)
452
+ - Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
453
+ - API-key scope: `campaigns:run`
454
+
455
+ Generate the whole Global Context set, in dependency order.
456
+
457
+ ONE-SHOT. The app refuses this with a 409 once a pipeline has completed for
458
+ the organisation - it is the onboarding path, not a rebuild. To rebuild
459
+ documents that already exist use `POST /global-context/regenerate`.
460
+
461
+ Requires intelligence data for `website_url` to exist already; without it
462
+ the documents would be generated from nothing.
463
+
464
+ **Input**
465
+
466
+ | Field | Type | Required | Description |
467
+ |---|---|---|---|
468
+ | `body` | `GenerateAllDocumentsRequest` | yes | Request body; fields below. |
469
+
470
+ Body fields (`GenerateAllDocumentsRequest`):
471
+
472
+ | Field | Type | Required | Description |
473
+ |---|---|---|---|
474
+ | `body.website_url` | `string` | yes | The company website every document is generated against. Intelligence data must already exist for it. |
475
+
476
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
477
+
478
+ Other envelope fields: `pagination` (PaginationMeta).
479
+
480
+ **Example**
481
+
482
+ ```ts
483
+ // billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
484
+ const result = await g8.api.gtmContext.generateAllDocuments({ body: { website_url: "https://example.com" } });
485
+ ```
486
+
487
+ ---
488
+
489
+ <a id="op-generatecompanyprofile"></a>
490
+
491
+ ### `g8.api.gtmContext.generateCompanyProfile(input)`
492
+
493
+ **Generate Company Profile**
494
+
495
+ - HTTP: `POST /api/v1/company-profile/generate`
496
+ - operationId: `generate_company_profile_company_profile_generate_post` (also callable as `g8.api.call("generate_company_profile_company_profile_generate_post", input)`)
497
+ - Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
498
+ - API-key scope: `campaigns:run`
499
+
500
+ (Re)build the profile's company data from the crawled site. SPENDS CREDITS.
501
+
502
+ Model calls plus a web-search enrichment; refused with 402 before any
503
+ call when the org is out of credits. REPLACES the unapproved profile data.
504
+
505
+ **Input**
506
+
507
+ | Field | Type | Required | Description |
508
+ |---|---|---|---|
509
+ | `body` | `ProfileFieldsRequest` | yes | Request body; fields below. |
510
+
511
+ Body fields (`ProfileFieldsRequest`):
512
+
513
+ | Field | Type | Required | Description |
514
+ |---|---|---|---|
515
+ | `body.fields` | `Record<string, unknown>` | yes | Which profile fields to generate, and their seeds. |
516
+ | `body.website_url` | `string` | yes | The org's website - the profile's key. |
517
+
518
+ **Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
519
+
520
+ Other envelope fields: `pagination` (PaginationMeta).
521
+
522
+ **Example**
523
+
524
+ ```ts
525
+ // billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
526
+ const result = await g8.api.gtmContext.generateCompanyProfile({ body: { fields: {}, website_url: "https://example.com" } });
527
+ ```
528
+
529
+ ---
530
+
531
+ <a id="op-getbuyingjourneycrmstatus"></a>
532
+
533
+ ### `g8.api.gtmContext.getBuyingJourneyCrmStatus(input?)`
534
+
535
+ **Get Buying Journey Crm Status**
536
+
537
+ - HTTP: `GET /api/v1/global-context/documents/buying-journey/crm-status`
538
+ - operationId: `get_buying_journey_crm_status_global_context_documents_buying_journey_crm_status_get` (also callable as `g8.api.call("get_buying_journey_crm_status_global_context_documents_buying_journey_crm_status_get", input)`)
539
+ - Tier: `read`: reads data; safe to call and to retry
540
+ - API-key scope: `campaigns:read`
541
+
542
+ Whether there is enough CRM data to ground the buying journey.
543
+
544
+ The buying journey document is only as good as the closed-won deals behind
545
+ it. This says whether a CRM is connected and how many deals it can see, so
546
+ a caller can find out BEFORE generating a document built on nothing.
547
+
548
+ **Input**: none.
549
+
550
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
551
+
552
+ Other envelope fields: `pagination` (PaginationMeta).
553
+
554
+ **Example**
555
+
556
+ ```ts
557
+ const result = await g8.api.gtmContext.getBuyingJourneyCrmStatus();
558
+ ```
559
+
560
+ ---
561
+
562
+ <a id="op-getcompanyprofile"></a>
563
+
564
+ ### `g8.api.gtmContext.getCompanyProfile(input?)`
565
+
566
+ **Get Company Profile**
567
+
568
+ - HTTP: `GET /api/v1/company-profile`
569
+ - operationId: `get_company_profile_company_profile_get` (also callable as `g8.api.call("get_company_profile_company_profile_get", input)`)
570
+ - Tier: `read`: reads data; safe to call and to retry
571
+ - API-key scope: `campaigns:read`
572
+
573
+ Read this org's company profile — the source Studio generation reads from.
574
+
575
+ Returns the most recently updated profile (``_ordered_profile_candidates``
576
+ orders by ``updated_at`` desc, then ``created_at`` desc, then ``id`` desc, and
577
+ this takes the first row). It does NOT filter by a confirmed domain, so after a
578
+ domain change the row you get back is whichever profile was touched last — call
579
+ ``PUT /company-profile`` to set the correct one if the latest is stale.
580
+
581
+ **Input**: none.
582
+
583
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
584
+
585
+ Other envelope fields: `pagination` (PaginationMeta).
586
+
587
+ **Example**
588
+
589
+ ```ts
590
+ const result = await g8.api.gtmContext.getCompanyProfile();
591
+ ```
592
+
593
+ ---
594
+
595
+ <a id="op-getcompanyprofileworkflowstatus"></a>
596
+
597
+ ### `g8.api.gtmContext.getCompanyProfileWorkflowStatus(input)`
598
+
599
+ **Get Company Profile Workflow Status**
600
+
601
+ - HTTP: `GET /api/v1/company-profile/workflow-status`
602
+ - operationId: `get_company_profile_workflow_status_company_profile_workflow_status_get` (also callable as `g8.api.call("get_company_profile_workflow_status_company_profile_workflow_status_get", input)`)
603
+ - Tier: `read`: reads data; safe to call and to retry
604
+ - API-key scope: `campaigns:read`
605
+
606
+ How far the profile-building pipeline has got, card by card.
607
+
608
+ Four stages - intelligence gathering, the merge, approval, and the profile
609
+ itself - each with its own state, so a caller can tell "still crawling"
610
+ from "waiting for a human" from "done".
611
+
612
+ The `website_url` echoed back is the string you sent; the lookup itself is
613
+ done against its canonical domain, so a match on a differently-spelled URL
614
+ is expected rather than a mismatch.
615
+
616
+ **Input**
617
+
618
+ | Field | Type | Required | Description |
619
+ |---|---|---|---|
620
+ | `query.website_url` | `string` | yes | The website the profile was built from. |
621
+
622
+ **Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
623
+
624
+ Other envelope fields: `pagination` (PaginationMeta).
625
+
626
+ **Example**
627
+
628
+ ```ts
629
+ const result = await g8.api.gtmContext.getCompanyProfileWorkflowStatus({ query: { website_url: "https://example.com" } });
630
+ ```
631
+
632
+ ---
633
+
634
+ <a id="op-getdochighlights"></a>
635
+
636
+ ### `g8.api.gtmContext.getDocHighlights(input)`
637
+
638
+ **Get Doc Highlights**
639
+
640
+ - HTTP: `GET /api/v1/global-context/doc/{doc_type}/highlights`
641
+ - operationId: `get_doc_highlights_global_context_doc__doc_type__highlights_get` (also callable as `g8.api.call("get_doc_highlights_global_context_doc__doc_type__highlights_get", input)`)
642
+ - Tier: `read`: reads data; safe to call and to retry
643
+ - API-key scope: `campaigns:read`
644
+
645
+ The short, quotable points from a completed document.
646
+
647
+ Built for grounding a chat turn without sending the whole document, so this
648
+ is the cheap read when you need a few facts rather than the text.
649
+
650
+ **Input**
651
+
652
+ | Field | Type | Required | Description |
653
+ |---|---|---|---|
654
+ | `path.doc_type` | `string` | yes | Document type key, e.g. `company_profile`, `icp_research`, `buying_journey`. Free-form on purpose: the set grows with the product and a closed list here would 422 a document the org already has. |
655
+
656
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
657
+
658
+ Other envelope fields: `pagination` (PaginationMeta).
659
+
660
+ **Example**
661
+
662
+ ```ts
663
+ const result = await g8.api.gtmContext.getDocHighlights({ path: { doc_type: "example" } });
664
+ ```
665
+
666
+ ---
667
+
668
+ <a id="op-getdocumentsanalytics"></a>
669
+
670
+ ### `g8.api.gtmContext.getDocumentsAnalytics(input?)`
671
+
672
+ **Get Documents Analytics**
673
+
674
+ - HTTP: `GET /api/v1/global-context/documents/analytics`
675
+ - operationId: `get_documents_analytics_global_context_documents_analytics_get` (also callable as `g8.api.call("get_documents_analytics_global_context_documents_analytics_get", input)`)
676
+ - Tier: `read`: reads data; safe to call and to retry
677
+ - API-key scope: `campaigns:read`
678
+
679
+ Every document with its usage counts.
680
+
681
+ Declared before `/documents/{doc_id}`: the parameter route would otherwise
682
+ match first and try to load a document called "analytics".
683
+
684
+ The answer to "which Studio documents are actually being read" - the input
685
+ to deciding what to regenerate and what to delete.
686
+
687
+ **Input**: none.
688
+
689
+ **Returns** `ApiResponse_StudioListPayload_`: the envelope `{ data: StudioListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
690
+
691
+ Other envelope fields: `pagination` (PaginationMeta).
692
+
693
+ `StudioListPayload` fields:
694
+
695
+ | Field | Type | Required | Description |
696
+ |---|---|---|---|
697
+ | `items` | `Array<unknown>` | no | |
698
+
699
+ **Example**
700
+
701
+ ```ts
702
+ const result = await g8.api.gtmContext.getDocumentsAnalytics();
703
+ ```
704
+
705
+ ---
706
+
707
+ <a id="op-getglobalcontextdocument"></a>
708
+
709
+ ### `g8.api.gtmContext.getGlobalContextDocument(input)`
710
+
711
+ **Get Global Context Document**
712
+
713
+ - HTTP: `GET /api/v1/global-context/documents/{doc_id}`
714
+ - operationId: `get_global_context_document_global_context_documents__doc_id__get` (also callable as `g8.api.call("get_global_context_document_global_context_documents__doc_id__get", input)`)
715
+ - Tier: `read`: reads data; safe to call and to retry
716
+ - API-key scope: `campaigns:read`
717
+
718
+ One document, with its full content.
719
+
720
+ `GET /global-context/documents` lists them; this returns a single one by id
721
+ or by type key.
722
+
723
+ **Input**
724
+
725
+ | Field | Type | Required | Description |
726
+ |---|---|---|---|
727
+ | `path.doc_id` | `string` | yes | Document id, OR a document TYPE key. The app resolves either, which is what makes `company_profile` a usable id. |
728
+
729
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
730
+
731
+ Other envelope fields: `pagination` (PaginationMeta).
732
+
733
+ **Example**
734
+
735
+ ```ts
736
+ const result = await g8.api.gtmContext.getGlobalContextDocument({ path: { doc_id: "id" } });
737
+ ```
738
+
739
+ ---
740
+
741
+ <a id="op-getlatestpipeline"></a>
742
+
743
+ ### `g8.api.gtmContext.getLatestPipeline(input?)`
744
+
745
+ **Get Latest Pipeline**
746
+
747
+ - HTTP: `GET /api/v1/global-context/pipeline/latest`
748
+ - operationId: `get_latest_pipeline_global_context_pipeline_latest_get` (also callable as `g8.api.call("get_latest_pipeline_global_context_pipeline_latest_get", input)`)
749
+ - Tier: `read`: reads data; safe to call and to retry
750
+ - API-key scope: `campaigns:read`
751
+
752
+ The most recent run.
753
+
754
+ Declared before `/pipeline/{pipeline_id}` so the literal wins - otherwise
755
+ the id route matches "latest" and looks for a pipeline with that id.
756
+
757
+ **Input**: none.
758
+
759
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
760
+
761
+ Other envelope fields: `pagination` (PaginationMeta).
762
+
763
+ **Example**
764
+
765
+ ```ts
766
+ const result = await g8.api.gtmContext.getLatestPipeline();
767
+ ```
768
+
769
+ ---
770
+
771
+ <a id="op-getmailboxwarmupanalytics"></a>
772
+
773
+ ### `g8.api.gtmContext.getMailboxWarmupAnalytics(input)`
774
+
775
+ **Get Mailbox Warmup Analytics**
776
+
777
+ - HTTP: `GET /api/v1/mailboxes/{mailbox_id}/warmup`
778
+ - operationId: `get_mailbox_warmup_analytics_mailboxes__mailbox_id__warmup_get` (also callable as `g8.api.call("get_mailbox_warmup_analytics_mailboxes__mailbox_id__warmup_get", input)`)
779
+ - Tier: `read`: reads data; safe to call and to retry
780
+ - API-key scope: `campaigns:read`
781
+ - ★ Hand-written: [`g8.mailboxes.warmup()`](../sdk-clients.md#g8-mailboxes-warmup)
782
+
783
+ Get live warmup analytics for a single mailbox.
784
+
785
+ Wraps the existing ``GET /warmup/{mailbox_id}/analytics`` flow so MCP
786
+ (API-key auth) can read warmup engagement / reputation without going
787
+ through cookie-based session auth.
788
+
789
+ Behavior:
790
+ - Looks up the mailbox in the API user's org schema. 404 if missing
791
+ or deleted. Tenant isolation comes from the per-org schema bind,
792
+ NOT from a row-level predicate.
793
+ - Hits the configured warmup provider (Instantly or SmartLead) over
794
+ HTTP — slow (~300-800ms typical). For warm bulk reads use
795
+ ``list_mailboxes`` and check the cheap DB-level ``warmup_status``.
796
+ - Returns ``{success, warmup_enabled, provider, analytics, warmup_settings}``
797
+ — same shape as the internal /warmup/{id}/analytics endpoint.
798
+
799
+ Backwards-compat: this is a brand-new route. The internal
800
+ /warmup/{id}/analytics (cookie auth) is unchanged.
801
+
802
+ Historical bug (fixed 2026-05-24, same root cause as list_mailboxes
803
+ above): the previous implementation appended
804
+ ``(t.org_id = :org_id OR m.created_by = :user_id)`` to the WHERE. Both
805
+ halves match zero rows in prod — ``mailboxes.team_id`` is NULL on every
806
+ row (no team pinning) and ``mailboxes.created_by`` stores email strings,
807
+ not propelauth UUIDs. Result: every warmup-analytics call 404'd even
808
+ for mailboxes that ``list_mailboxes`` happily returned. Dropping the
809
+ predicate restores parity; schema bind is the tenant boundary.
810
+
811
+ **Input**
812
+
813
+ | Field | Type | Required | Description |
814
+ |---|---|---|---|
815
+ | `path.mailbox_id` | `integer` | yes | |
816
+
817
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
818
+
819
+ Other envelope fields: `pagination` (PaginationMeta).
820
+
821
+ **Example**
822
+
823
+ ```ts
824
+ const result = await g8.api.gtmContext.getMailboxWarmupAnalytics({ path: { mailbox_id: 123 } });
825
+ ```
826
+
827
+ ---
828
+
829
+ <a id="op-getpipelinestatus"></a>
830
+
831
+ ### `g8.api.gtmContext.getPipelineStatus(input)`
832
+
833
+ **Get Pipeline Status**
834
+
835
+ - HTTP: `GET /api/v1/global-context/pipeline/{pipeline_id}`
836
+ - operationId: `get_pipeline_status_global_context_pipeline__pipeline_id__get` (also callable as `g8.api.call("get_pipeline_status_global_context_pipeline__pipeline_id__get", input)`)
837
+ - Tier: `read`: reads data; safe to call and to retry
838
+ - API-key scope: `campaigns:read`
839
+
840
+ Per-document status for ONE run.
841
+
842
+ This is where a stalled generation is diagnosed: which documents completed,
843
+ which are still generating, and which failed with what.
844
+
845
+ **Input**
846
+
847
+ | Field | Type | Required | Description |
848
+ |---|---|---|---|
849
+ | `path.pipeline_id` | `string` | yes | Pipeline id. |
850
+
851
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
852
+
853
+ Other envelope fields: `pagination` (PaginationMeta).
854
+
855
+ **Example**
856
+
857
+ ```ts
858
+ const result = await g8.api.gtmContext.getPipelineStatus({ path: { pipeline_id: "id" } });
859
+ ```
860
+
861
+ ---
862
+
863
+ <a id="op-listactivities"></a>
864
+
865
+ ### `g8.api.gtmContext.listActivities(input?)`
866
+
867
+ **List Activities**
868
+
869
+ - HTTP: `GET /api/v1/activities`
870
+ - operationId: `list_activities_activities_get` (also callable as `g8.api.call("list_activities_activities_get", input)`)
871
+ - Tier: `read`: reads data; safe to call and to retry
872
+ - API-key scope: `campaigns:read`
873
+
874
+ List recent activities for the authenticated organization.
875
+
876
+ **Input**
877
+
878
+ | Field | Type | Required | Description |
879
+ |---|---|---|---|
880
+ | `query.page` | `integer` | no | default `1` |
881
+ | `query.limit` | `integer` | no | default `50` |
882
+ | `query.activity_type` | `string \| null` | no | |
883
+ | `query.contact_id` | `string \| null` | no | |
884
+ | `query.company_id` | `string \| null` | no | |
885
+ | `query.mashup_contact_id` | `integer \| null` | no | |
886
+ | `query.mashup_company_id` | `integer \| null` | no | |
887
+ | `query.deal_id` | `string \| null` | no | |
888
+ | `query.occurred_after` | `string (date-time) \| null` | no | |
889
+ | `query.occurred_before` | `string (date-time) \| null` | no | |
890
+
891
+ **Returns** `ApiResponse_list_dict__`: the envelope `{ data: Array<Record<string, unknown>>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
892
+
893
+ Other envelope fields: `pagination` (PaginationMeta).
894
+
895
+ **Example**
896
+
897
+ ```ts
898
+ const result = await g8.api.gtmContext.listActivities();
899
+ ```
900
+
901
+ ---
902
+
903
+ <a id="op-listglobalcontextdocuments"></a>
904
+
905
+ ### `g8.api.gtmContext.listGlobalContextDocuments(input?)`
906
+
907
+ **List Global Context Documents**
908
+
909
+ - HTTP: `GET /api/v1/global-context/documents`
910
+ - operationId: `list_global_context_documents_global_context_documents_get` (also callable as `g8.api.call("list_global_context_documents_global_context_documents_get", input)`)
911
+ - Tier: `read`: reads data; safe to call and to retry
912
+ - API-key scope: `campaigns:read`
913
+ - ★ Hand-written: [`g8.studio.globalContext()`](../sdk-clients.md#g8-studio-globalcontext)
914
+
915
+ List global context documents for the authenticated organization.
916
+
917
+ Each row carries metadata (id, display_name, file_type, category,
918
+ folder_path, status, priority, version, timestamps). When
919
+ ``include_content`` is True (the default) the document body is included at
920
+ ``content`` (sourced from ``meta_data.content``) so callers can read what a
921
+ document actually says; pass ``include_content=false`` to omit the body for
922
+ a cheaper listing. The default stays True for backwards compatibility — the
923
+ MCP ``g8_gtm_get_global_context`` tool, the JS SDK ``studio.globalContext``
924
+ client, and the ``g8://global-context`` resource surfaces have always relied
925
+ on ``content`` being present.
926
+
927
+ **Input**
928
+
929
+ | Field | Type | Required | Description |
930
+ |---|---|---|---|
931
+ | `query.category` | `string \| null` | no | Filter by context category |
932
+ | `query.include_content` | `boolean` | no | Include each document's body text at `content` (read from meta_data.content). Default True preserves historical behavior (this endpoint has always returned content); pass false for a lighter metadata-only listing. default `true` |
933
+ | `query.limit` | `integer` | no | default `50` |
934
+
935
+ **Returns** `ApiResponse_list_dict__`: the envelope `{ data: Array<Record<string, unknown>>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
936
+
937
+ Other envelope fields: `pagination` (PaginationMeta).
938
+
939
+ **Example**
940
+
941
+ ```ts
942
+ const result = await g8.api.gtmContext.listGlobalContextDocuments();
943
+ ```
944
+
945
+ ---
946
+
947
+ <a id="op-listicps"></a>
948
+
949
+ ### `g8.api.gtmContext.listIcps(input?)`
950
+
951
+ **List Icps**
952
+
953
+ - HTTP: `GET /api/v1/icps`
954
+ - operationId: `list_icps_icps_get` (also callable as `g8.api.call("list_icps_icps_get", input)`)
955
+ - Tier: `read`: reads data; safe to call and to retry
956
+ - API-key scope: `campaigns:read`
957
+ - ★ Hand-written: [`g8.studio.icps()`](../sdk-clients.md#g8-studio-icps)
958
+
959
+ List campaign-builder ICPs for the authenticated organization.
960
+
961
+ **Input**
962
+
963
+ | Field | Type | Required | Description |
964
+ |---|---|---|---|
965
+ | `query.status` | `string \| null` | no | Filter by ICP status |
966
+ | `query.limit` | `integer` | no | default `50` |
967
+
968
+ **Returns** `ApiResponse_list_dict__`: the envelope `{ data: Array<Record<string, unknown>>, ... }`. `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
+ const result = await g8.api.gtmContext.listIcps();
976
+ ```
977
+
978
+ ---
979
+
980
+ <a id="op-listintelligencedata"></a>
981
+
982
+ ### `g8.api.gtmContext.listIntelligenceData(input?)`
983
+
984
+ **List Intelligence Data**
985
+
986
+ - HTTP: `GET /api/v1/intelligence-data`
987
+ - operationId: `list_intelligence_data_intelligence_data_get` (also callable as `g8.api.call("list_intelligence_data_intelligence_data_get", input)`)
988
+ - Tier: `read`: reads data; safe to call and to retry
989
+ - API-key scope: `campaigns:read`
990
+ - ★ Hand-written: [`g8.studio.intelligenceData()`](../sdk-clients.md#g8-studio-intelligencedata)
991
+
992
+ List intelligence-data documents (the ~16 docs in the Intelligence bucket).
993
+
994
+ Part of the 44-document Studio Global Document Architecture (21 context +
995
+ 16 intelligence + 6 research + 1 brief). The MCP campaign-ideation path
996
+ needs this bucket — historically only the ``cb_global_contexts`` (Context)
997
+ bucket was exposed via REST.
998
+
999
+ **Input**
1000
+
1001
+ | Field | Type | Required | Description |
1002
+ |---|---|---|---|
1003
+ | `query.data_type` | `string \| null` | no | Filter by data_type (website_scrape, company_enrichment, competitor_discovery, company_keywords, product_inventory, organic_keywords, paid_keywords, ...) |
1004
+ | `query.include_content` | `boolean` | no | Include the raw `data` JSONB blob (large; default omits) default `false` |
1005
+ | `query.limit` | `integer` | no | default `50` |
1006
+
1007
+ **Returns** `ApiResponse_list_dict__`: the envelope `{ data: Array<Record<string, unknown>>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1008
+
1009
+ Other envelope fields: `pagination` (PaginationMeta).
1010
+
1011
+ **Example**
1012
+
1013
+ ```ts
1014
+ const result = await g8.api.gtmContext.listIntelligenceData();
1015
+ ```
1016
+
1017
+ ---
1018
+
1019
+ <a id="op-listmailboxes"></a>
1020
+
1021
+ ### `g8.api.gtmContext.listMailboxes(input?)`
1022
+
1023
+ **List Mailboxes**
1024
+
1025
+ - HTTP: `GET /api/v1/mailboxes`
1026
+ - operationId: `list_mailboxes_mailboxes_get` (also callable as `g8.api.call("list_mailboxes_mailboxes_get", input)`)
1027
+ - Tier: `read`: reads data; safe to call and to retry
1028
+ - API-key scope: `campaigns:read`
1029
+ - ★ Hand-written: [`g8.mailboxes.list()`](../sdk-clients.md#g8-mailboxes-list)
1030
+
1031
+ List sending mailboxes the authenticated user can access in this org.
1032
+
1033
+ Backs the MCP "pick a mailbox before launching a campaign" flow.
1034
+
1035
+ Sources from the canonical ``mailboxes`` table (NOT the
1036
+ ``ai_inbox_email_cron_jobs`` table the FE picker previously used — that
1037
+ table is the AI-inbox sync state, not the source of truth for which
1038
+ mailboxes exist). See ``.claude/agent-context/mailbox-picker-sources-cron-table.md``.
1039
+
1040
+ Tenant scope: ``mailboxes`` lives in the per-org schema (NOT public —
1041
+ the earlier version of this comment was wrong; see
1042
+ ``select to_regclass('public.mailboxes')`` returning null vs. the
1043
+ per-org row count). Binding the session to ``schema=<org>`` IS the
1044
+ tenant boundary; no further org-filter predicate is needed.
1045
+
1046
+ Per-row RBAC (``ENFORCE_MAILBOX_PERMISSIONS`` soak flag) is NOT enforced
1047
+ here yet — Phase 3b on issue #7180 — keeping symmetry with the FE
1048
+ picker. When that flag flips on, this endpoint will adopt the scope
1049
+ filter alongside the cdp/mailboxes/fetch surface.
1050
+
1051
+ Historical bug (fixed 2026-05-22): the previous implementation appended
1052
+ ``(t.org_id = :org_id OR m.created_by = :user_id)`` to the WHERE. Both
1053
+ halves silently matched zero rows in prod — ``mailboxes.team_id`` is
1054
+ NULL on every row (no team pinning) and ``mailboxes.created_by`` stores
1055
+ email strings, not propelauth UUIDs. Result: the endpoint returned an
1056
+ empty list for every caller. Dropping the predicate restores the
1057
+ correct per-org listing; tenant isolation comes from the schema bind.
1058
+
1059
+ **Input**
1060
+
1061
+ | Field | Type | Required | Description |
1062
+ |---|---|---|---|
1063
+ | `query.limit` | `integer` | no | default `100` |
1064
+ | `query.include_archived` | `boolean` | no | Include archived mailboxes default `false` |
1065
+ | `query.connection_status` | `string \| null` | no | Filter by connection_status (active\|paused\|disconnected\|expired\|...) |
1066
+
1067
+ **Returns** `ApiResponse_list_dict__`: the envelope `{ data: Array<Record<string, unknown>>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1068
+
1069
+ Other envelope fields: `pagination` (PaginationMeta).
1070
+
1071
+ **Example**
1072
+
1073
+ ```ts
1074
+ const result = await g8.api.gtmContext.listMailboxes();
1075
+ ```
1076
+
1077
+ ---
1078
+
1079
+ <a id="op-listpersonas"></a>
1080
+
1081
+ ### `g8.api.gtmContext.listPersonas(input?)`
1082
+
1083
+ **List Personas**
1084
+
1085
+ - HTTP: `GET /api/v1/personas`
1086
+ - operationId: `list_personas_personas_get` (also callable as `g8.api.call("list_personas_personas_get", input)`)
1087
+ - Tier: `read`: reads data; safe to call and to retry
1088
+ - API-key scope: `campaigns:read`
1089
+ - ★ Hand-written: [`g8.studio.personas()`](../sdk-clients.md#g8-studio-personas)
1090
+
1091
+ List campaign-builder personas for the authenticated organization.
1092
+
1093
+ **Input**
1094
+
1095
+ | Field | Type | Required | Description |
1096
+ |---|---|---|---|
1097
+ | `query.status` | `string \| null` | no | Filter by persona status |
1098
+ | `query.limit` | `integer` | no | default `50` |
1099
+
1100
+ **Returns** `ApiResponse_list_dict__`: the envelope `{ data: Array<Record<string, unknown>>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1101
+
1102
+ Other envelope fields: `pagination` (PaginationMeta).
1103
+
1104
+ **Example**
1105
+
1106
+ ```ts
1107
+ const result = await g8.api.gtmContext.listPersonas();
1108
+ ```
1109
+
1110
+ ---
1111
+
1112
+ <a id="op-listpipelines"></a>
1113
+
1114
+ ### `g8.api.gtmContext.listPipelines(input?)`
1115
+
1116
+ **List Pipelines**
1117
+
1118
+ - HTTP: `GET /api/v1/global-context/pipelines`
1119
+ - operationId: `list_pipelines_global_context_pipelines_get` (also callable as `g8.api.call("list_pipelines_global_context_pipelines_get", input)`)
1120
+ - Tier: `read`: reads data; safe to call and to retry
1121
+ - API-key scope: `campaigns:read`
1122
+
1123
+ Recent Global Context generation runs, newest first.
1124
+
1125
+ **Input**
1126
+
1127
+ | Field | Type | Required | Description |
1128
+ |---|---|---|---|
1129
+ | `query.limit` | `integer` | no | How many recent runs to return. The app's default is 10. default `10` |
1130
+
1131
+ **Returns** `ApiResponse_StudioListPayload_`: the envelope `{ data: StudioListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1132
+
1133
+ Other envelope fields: `pagination` (PaginationMeta).
1134
+
1135
+ `StudioListPayload` fields:
1136
+
1137
+ | Field | Type | Required | Description |
1138
+ |---|---|---|---|
1139
+ | `items` | `Array<unknown>` | no | |
1140
+
1141
+ **Example**
1142
+
1143
+ ```ts
1144
+ const result = await g8.api.gtmContext.listPipelines();
1145
+ ```
1146
+
1147
+ ---
1148
+
1149
+ <a id="op-listresearchreports"></a>
1150
+
1151
+ ### `g8.api.gtmContext.listResearchReports(input?)`
1152
+
1153
+ **List Research Reports**
1154
+
1155
+ - HTTP: `GET /api/v1/research-reports`
1156
+ - operationId: `list_research_reports_research_reports_get` (also callable as `g8.api.call("list_research_reports_research_reports_get", input)`)
1157
+ - Tier: `read`: reads data; safe to call and to retry
1158
+ - API-key scope: `campaigns:read`
1159
+ - ★ Hand-written: [`g8.studio.researchReports()`](../sdk-clients.md#g8-studio-researchreports)
1160
+
1161
+ List research-report documents (the 6 docs in the Research bucket).
1162
+
1163
+ Part of the 44-document Studio Global Document Architecture (21 context +
1164
+ 16 intelligence + 6 research + 1 brief). The MCP ideation path needs this
1165
+ bucket alongside ``/intelligence-data`` to surface the full picture.
1166
+
1167
+ **Input**
1168
+
1169
+ | Field | Type | Required | Description |
1170
+ |---|---|---|---|
1171
+ | `query.report_type` | `string \| null` | no | Filter by report_type (buyer_psychology, competitive_teardown, gtm_channel, industry_analyst, review_sentiment, voice_of_customer) |
1172
+ | `query.include_content` | `boolean` | no | Include the structured `content` JSONB blob + markdown (large) default `false` |
1173
+ | `query.limit` | `integer` | no | default `50` |
1174
+
1175
+ **Returns** `ApiResponse_list_dict__`: the envelope `{ data: Array<Record<string, unknown>>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1176
+
1177
+ Other envelope fields: `pagination` (PaginationMeta).
1178
+
1179
+ **Example**
1180
+
1181
+ ```ts
1182
+ const result = await g8.api.gtmContext.listResearchReports();
1183
+ ```
1184
+
1185
+ ---
1186
+
1187
+ <a id="op-regenerateglobalcontext"></a>
1188
+
1189
+ ### `g8.api.gtmContext.regenerateGlobalContext(input)`
1190
+
1191
+ **Regenerate Global Context**
1192
+
1193
+ - HTTP: `POST /api/v1/global-context/regenerate`
1194
+ - operationId: `regenerate_global_context_global_context_regenerate_post` (also callable as `g8.api.call("regenerate_global_context_global_context_regenerate_post", input)`)
1195
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1196
+ - API-key scope: `campaigns:write`
1197
+
1198
+ Regenerate Studio (Global Context) documents against a website.
1199
+
1200
+ **Why this exists.** Studio docs are generated once at onboarding from the
1201
+ company profile's website. If that profile was wrong at the time — the common
1202
+ case for self-serve orgs, which seed graph8's own profile when no domain is
1203
+ given — every downstream ICP, persona, TAM and campaign is built on the wrong
1204
+ company, and there was no machine path to fix it:
1205
+
1206
+ * the internal ``POST /global-context/generate-all`` refuses forever once the
1207
+ first pipeline completes (``409 ... Contact support to reset and regenerate``);
1208
+ * ``POST /global-context/generate/{doc_type}`` has no such lock but was
1209
+ JWT-only, so an agent or API key could not call it.
1210
+
1211
+ This endpoint wraps the per-document path, which means it is **not** subject to
1212
+ the one-shot pipeline lock and can be run whenever the source of truth changes.
1213
+
1214
+ Requires intelligence data for ``website_url`` to exist already — run the
1215
+ intelligence analyze step first for a newly-changed domain, otherwise this
1216
+ returns 404 rather than regenerating stale content.
1217
+
1218
+ **Input**
1219
+
1220
+ | Field | Type | Required | Description |
1221
+ |---|---|---|---|
1222
+ | `body` | `RegenerateContextRequest` | yes | Request body; fields below. |
1223
+
1224
+ Body fields (`RegenerateContextRequest`):
1225
+
1226
+ | Field | Type | Required | Description |
1227
+ |---|---|---|---|
1228
+ | `body.website_url` | `string` | yes | Website to generate from. After a company-profile change this must be the NEW domain — intelligence is keyed by URL, so passing the old one silently regenerates the same stale content. |
1229
+ | `body.doc_types` | `Array<string> \| null` | no | Specific Studio doc types to regenerate (e.g. ['icp_research','persona_research']). Omit to regenerate every document that already exists in the org. |
1230
+
1231
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1232
+
1233
+ Other envelope fields: `pagination` (PaginationMeta).
1234
+
1235
+ **Example**
1236
+
1237
+ ```ts
1238
+ const result = await g8.api.gtmContext.regenerateGlobalContext({ body: { website_url: "https://example.com" } });
1239
+ ```
1240
+
1241
+ ---
1242
+
1243
+ <a id="op-regenerateonedocument"></a>
1244
+
1245
+ ### `g8.api.gtmContext.regenerateOneDocument(input)`
1246
+
1247
+ **Regenerate One Document**
1248
+
1249
+ - HTTP: `POST /api/v1/global-context/{doc_id}/regenerate`
1250
+ - operationId: `regenerate_one_document_global_context__doc_id__regenerate_post` (also callable as `g8.api.call("regenerate_one_document_global_context__doc_id__regenerate_post", input)`)
1251
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1252
+ - API-key scope: `campaigns:write`
1253
+
1254
+ Rewrite ONE document with AI, from the current intelligence data.
1255
+
1256
+ Different from `POST /global-context/regenerate`, which rebuilds a SET
1257
+ against a website: this takes a single document id and rewrites it in
1258
+ place. The old content is replaced.
1259
+
1260
+ Declared LAST on this router. `{doc_id}` occupies the same segment as every
1261
+ literal above it, so registered earlier it would swallow `/pipelines`,
1262
+ `/scaffold` and the rest.
1263
+
1264
+ **Input**
1265
+
1266
+ | Field | Type | Required | Description |
1267
+ |---|---|---|---|
1268
+ | `path.doc_id` | `string` | yes | Document id. |
1269
+
1270
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1271
+
1272
+ Other envelope fields: `pagination` (PaginationMeta).
1273
+
1274
+ **Example**
1275
+
1276
+ ```ts
1277
+ const result = await g8.api.gtmContext.regenerateOneDocument({ path: { doc_id: "id" } });
1278
+ ```
1279
+
1280
+ ---
1281
+
1282
+ <a id="op-reindexalldocuments"></a>
1283
+
1284
+ ### `g8.api.gtmContext.reindexAllDocuments(input?)`
1285
+
1286
+ **Reindex All Documents**
1287
+
1288
+ - HTTP: `POST /api/v1/global-context/reindex-all`
1289
+ - operationId: `reindex_all_documents_global_context_reindex_all_post` (also callable as `g8.api.call("reindex_all_documents_global_context_reindex_all_post", input)`)
1290
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1291
+ - API-key scope: `campaigns:write`
1292
+
1293
+ Re-index every document into retrieval.
1294
+
1295
+ Changes no document. It rebuilds the index the copilot and campaign
1296
+ generation search, which is the fix when a document reads correctly in the
1297
+ library but never shows up as grounding.
1298
+
1299
+ **Input**: none.
1300
+
1301
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1302
+
1303
+ Other envelope fields: `pagination` (PaginationMeta).
1304
+
1305
+ **Example**
1306
+
1307
+ ```ts
1308
+ const result = await g8.api.gtmContext.reindexAllDocuments();
1309
+ ```
1310
+
1311
+ ---
1312
+
1313
+ <a id="op-reindexcompanyprofile"></a>
1314
+
1315
+ ### `g8.api.gtmContext.reindexCompanyProfile(input)`
1316
+
1317
+ **Reindex Company Profile**
1318
+
1319
+ - HTTP: `POST /api/v1/company-profile/reindex`
1320
+ - operationId: `reindex_company_profile_company_profile_reindex_post` (also callable as `g8.api.call("reindex_company_profile_company_profile_reindex_post", input)`)
1321
+ - Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
1322
+ - API-key scope: `campaigns:run`
1323
+
1324
+ Rebuild the search index over this profile. SPENDS PROVIDER BUDGET.
1325
+
1326
+ Every call re-embeds the whole profile through the embedding provider -
1327
+ there is no dedupe, and the cost is proportional to how much is in the
1328
+ profile rather than to what changed. Tiered `billable` for that reason.
1329
+
1330
+ Worth calling after a profile edit: the published `PUT /company-profile`
1331
+ writes the row but does NOT re-index, so anything that reads the profile
1332
+ through search stays stale until this runs.
1333
+
1334
+ The website is taken in the BODY here. The app reads it as a query
1335
+ parameter on a POST, which is the kind of detail that only bites once.
1336
+
1337
+ **Input**
1338
+
1339
+ | Field | Type | Required | Description |
1340
+ |---|---|---|---|
1341
+ | `body` | `ProfileWebsiteRequest` | yes | Request body; fields below. |
1342
+
1343
+ Body fields (`ProfileWebsiteRequest`):
1344
+
1345
+ | Field | Type | Required | Description |
1346
+ |---|---|---|---|
1347
+ | `body.website_url` | `string` | yes | Website the profile was built from. Matched on its canonical domain. |
1348
+
1349
+ **Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1350
+
1351
+ Other envelope fields: `pagination` (PaginationMeta).
1352
+
1353
+ **Example**
1354
+
1355
+ ```ts
1356
+ // billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
1357
+ const result = await g8.api.gtmContext.reindexCompanyProfile({ body: { website_url: "https://example.com" } });
1358
+ ```
1359
+
1360
+ ---
1361
+
1362
+ <a id="op-resetcompanyprofilekeywords"></a>
1363
+
1364
+ ### `g8.api.gtmContext.resetCompanyProfileKeywords(input)`
1365
+
1366
+ **Reset Company Profile Keywords**
1367
+
1368
+ - HTTP: `DELETE /api/v1/company-profile/keywords`
1369
+ - operationId: `reset_company_profile_keywords_company_profile_keywords_delete` (also callable as `g8.api.call("reset_company_profile_keywords_company_profile_keywords_delete", input)`)
1370
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
1371
+ - API-key scope: `campaigns:delete`
1372
+
1373
+ Delete the keywords derived for this profile. NOT REVERSIBLE.
1374
+
1375
+ A hard delete with no soft-delete row behind it: the keywords are gone and
1376
+ the only way back is to regenerate them. Returns how many were removed.
1377
+
1378
+ **Input**
1379
+
1380
+ | Field | Type | Required | Description |
1381
+ |---|---|---|---|
1382
+ | `query.website_url` | `string` | yes | The website the profile was built from. |
1383
+
1384
+ **Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1385
+
1386
+ Other envelope fields: `pagination` (PaginationMeta).
1387
+
1388
+ **Example**
1389
+
1390
+ ```ts
1391
+ // destructive: deletes or archives data; confirm with a human before calling.
1392
+ const result = await g8.api.gtmContext.resetCompanyProfileKeywords({ query: { website_url: "https://example.com" } });
1393
+ ```
1394
+
1395
+ ---
1396
+
1397
+ <a id="op-resetstuckdocuments"></a>
1398
+
1399
+ ### `g8.api.gtmContext.resetStuckDocuments(input?)`
1400
+
1401
+ **Reset Stuck Documents**
1402
+
1403
+ - HTTP: `POST /api/v1/global-context/reset-stuck-documents`
1404
+ - operationId: `reset_stuck_documents_global_context_reset_stuck_documents_post` (also callable as `g8.api.call("reset_stuck_documents_global_context_reset_stuck_documents_post", input)`)
1405
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
1406
+ - API-key scope: `campaigns:delete`
1407
+
1408
+ Move documents wedged in `generating` back to a state you can act on.
1409
+
1410
+ A document whose worker died stays `generating` forever and blocks a
1411
+ retry. This unblocks them; it does not generate anything.
1412
+
1413
+ **Input**: none.
1414
+
1415
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1416
+
1417
+ Other envelope fields: `pagination` (PaginationMeta).
1418
+
1419
+ **Example**
1420
+
1421
+ ```ts
1422
+ // destructive: deletes or archives data; confirm with a human before calling.
1423
+ const result = await g8.api.gtmContext.resetStuckDocuments();
1424
+ ```
1425
+
1426
+ ---
1427
+
1428
+ <a id="op-resumepipeline"></a>
1429
+
1430
+ ### `g8.api.gtmContext.resumePipeline(input?)`
1431
+
1432
+ **Resume Pipeline**
1433
+
1434
+ - HTTP: `POST /api/v1/global-context/resume-pipeline`
1435
+ - operationId: `resume_pipeline_global_context_resume_pipeline_post` (also callable as `g8.api.call("resume_pipeline_global_context_resume_pipeline_post", input)`)
1436
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1437
+ - API-key scope: `campaigns:write`
1438
+
1439
+ Finish a run that stopped part way, generating only what is missing.
1440
+
1441
+ The repair for a pipeline that died mid-way. It does NOT rebuild documents
1442
+ that already completed, so it is cheap and safe to retry.
1443
+
1444
+ **Input**: none.
1445
+
1446
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1447
+
1448
+ Other envelope fields: `pagination` (PaginationMeta).
1449
+
1450
+ **Example**
1451
+
1452
+ ```ts
1453
+ const result = await g8.api.gtmContext.resumePipeline();
1454
+ ```
1455
+
1456
+ ---
1457
+
1458
+ <a id="op-retrycompanyprofile"></a>
1459
+
1460
+ ### `g8.api.gtmContext.retryCompanyProfile(input)`
1461
+
1462
+ **Retry Company Profile**
1463
+
1464
+ - HTTP: `POST /api/v1/company-profile/retry`
1465
+ - operationId: `retry_company_profile_company_profile_retry_post` (also callable as `g8.api.call("retry_company_profile_company_profile_retry_post", input)`)
1466
+ - Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
1467
+ - API-key scope: `campaigns:run`
1468
+
1469
+ Delete the profile and generate it again from intelligence. SPENDS CREDITS.
1470
+
1471
+ **Input**
1472
+
1473
+ | Field | Type | Required | Description |
1474
+ |---|---|---|---|
1475
+ | `body` | `ProfileWebsiteRequest` | yes | Request body; fields below. |
1476
+
1477
+ Body fields (`ProfileWebsiteRequest`):
1478
+
1479
+ | Field | Type | Required | Description |
1480
+ |---|---|---|---|
1481
+ | `body.website_url` | `string` | yes | Website the profile was built from. Matched on its canonical domain. |
1482
+
1483
+ **Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1484
+
1485
+ Other envelope fields: `pagination` (PaginationMeta).
1486
+
1487
+ **Example**
1488
+
1489
+ ```ts
1490
+ // billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
1491
+ const result = await g8.api.gtmContext.retryCompanyProfile({ body: { website_url: "https://example.com" } });
1492
+ ```
1493
+
1494
+ ---
1495
+
1496
+ <a id="op-savebuyingjourneyinterview"></a>
1497
+
1498
+ ### `g8.api.gtmContext.saveBuyingJourneyInterview(input)`
1499
+
1500
+ **Save Buying Journey Interview**
1501
+
1502
+ - HTTP: `POST /api/v1/global-context/documents/buying-journey/interview`
1503
+ - operationId: `save_buying_journey_interview_global_context_documents_buying_journey_interview_post` (also callable as `g8.api.call("save_buying_journey_interview_global_context_documents_buying_journey_interview_post", input)`)
1504
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1505
+ - API-key scope: `campaigns:write`
1506
+
1507
+ Record how this organisation actually sells, in its own words.
1508
+
1509
+ The answers are injected as HIGHEST-PRIORITY grounding the next time the
1510
+ buying journey is generated - they outrank the scraped and inferred
1511
+ material. The document must already exist; this grounds it, it does not
1512
+ create it.
1513
+
1514
+ Declared with a literal `buying-journey` second segment, so it does not
1515
+ collide with `/documents/{doc_id}/feedback`.
1516
+
1517
+ **Input**
1518
+
1519
+ | Field | Type | Required | Description |
1520
+ |---|---|---|---|
1521
+ | `body` | `BuyingJourneyInterviewRequest` | yes | Request body; fields below. |
1522
+
1523
+ Body fields (`BuyingJourneyInterviewRequest`):
1524
+
1525
+ | Field | Type | Required | Description |
1526
+ |---|---|---|---|
1527
+ | `body.answers` | `Record<string, unknown>` | yes | Structured interview answers about how this organisation sells. Injected as highest-priority grounding the next time the buying journey document is generated. |
1528
+
1529
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1530
+
1531
+ Other envelope fields: `pagination` (PaginationMeta).
1532
+
1533
+ **Example**
1534
+
1535
+ ```ts
1536
+ const result = await g8.api.gtmContext.saveBuyingJourneyInterview({ body: { answers: {} } });
1537
+ ```
1538
+
1539
+ ---
1540
+
1541
+ <a id="op-scaffoldalldocuments"></a>
1542
+
1543
+ ### `g8.api.gtmContext.scaffoldAllDocuments(input?)`
1544
+
1545
+ **Scaffold All Documents**
1546
+
1547
+ - HTTP: `POST /api/v1/global-context/scaffold`
1548
+ - operationId: `scaffold_all_documents_global_context_scaffold_post` (also callable as `g8.api.call("scaffold_all_documents_global_context_scaffold_post", input)`)
1549
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1550
+ - API-key scope: `campaigns:write`
1551
+
1552
+ Create every Global Context document as an EMPTY template.
1553
+
1554
+ Scaffolding is not generation: it creates the rows so the library has a
1555
+ shape, and leaves them empty. Useful when you want to fill documents
1556
+ yourself through `PATCH /global-context/documents/{doc_id}` rather than
1557
+ have them written for you.
1558
+
1559
+ **Input**: none.
1560
+
1561
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1562
+
1563
+ Other envelope fields: `pagination` (PaginationMeta).
1564
+
1565
+ **Example**
1566
+
1567
+ ```ts
1568
+ const result = await g8.api.gtmContext.scaffoldAllDocuments();
1569
+ ```
1570
+
1571
+ ---
1572
+
1573
+ <a id="op-scaffoldcompanykeywords"></a>
1574
+
1575
+ ### `g8.api.gtmContext.scaffoldCompanyKeywords(input?)`
1576
+
1577
+ **Scaffold Company Keywords**
1578
+
1579
+ - HTTP: `POST /api/v1/global-context/scaffold-company-keywords`
1580
+ - operationId: `scaffold_company_keywords_global_context_scaffold_company_keywords_post` (also callable as `g8.api.call("scaffold_company_keywords_global_context_scaffold_company_keywords_post", input)`)
1581
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1582
+ - API-key scope: `campaigns:write`
1583
+
1584
+ Create the Company Keywords template in the brand category. IDEMPOTENT.
1585
+
1586
+ **Input**: none.
1587
+
1588
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1589
+
1590
+ Other envelope fields: `pagination` (PaginationMeta).
1591
+
1592
+ **Example**
1593
+
1594
+ ```ts
1595
+ const result = await g8.api.gtmContext.scaffoldCompanyKeywords();
1596
+ ```
1597
+
1598
+ ---
1599
+
1600
+ <a id="op-scaffoldcompanyprofile"></a>
1601
+
1602
+ ### `g8.api.gtmContext.scaffoldCompanyProfile(input?)`
1603
+
1604
+ **Scaffold Company Profile**
1605
+
1606
+ - HTTP: `POST /api/v1/global-context/scaffold-company-profile`
1607
+ - operationId: `scaffold_company_profile_global_context_scaffold_company_profile_post` (also callable as `g8.api.call("scaffold_company_profile_global_context_scaffold_company_profile_post", input)`)
1608
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1609
+ - API-key scope: `campaigns:write`
1610
+
1611
+ Create the `company_profile` template if it does not exist.
1612
+
1613
+ IDEMPOTENT - an org that already has one gets the existing document back
1614
+ rather than a second copy. The company profile is the root of the
1615
+ dependency graph, so this is the one to create first when a library is
1616
+ missing it.
1617
+
1618
+ **Input**: none.
1619
+
1620
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1621
+
1622
+ Other envelope fields: `pagination` (PaginationMeta).
1623
+
1624
+ **Example**
1625
+
1626
+ ```ts
1627
+ const result = await g8.api.gtmContext.scaffoldCompanyProfile();
1628
+ ```
1629
+
1630
+ ---
1631
+
1632
+ <a id="op-stopallgeneration"></a>
1633
+
1634
+ ### `g8.api.gtmContext.stopAllGeneration(input?)`
1635
+
1636
+ **Stop All Generation**
1637
+
1638
+ - HTTP: `POST /api/v1/global-context/stop-all-generation`
1639
+ - operationId: `stop_all_generation_global_context_stop_all_generation_post` (also callable as `g8.api.call("stop_all_generation_global_context_stop_all_generation_post", input)`)
1640
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1641
+ - API-key scope: `campaigns:write`
1642
+
1643
+ Stop every in-flight generation for this organisation, immediately.
1644
+
1645
+ The kill switch. Work already done is kept; work in flight is abandoned,
1646
+ so a document caught mid-write comes back as failed rather than partial.
1647
+
1648
+ **Input**: none.
1649
+
1650
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1651
+
1652
+ Other envelope fields: `pagination` (PaginationMeta).
1653
+
1654
+ **Example**
1655
+
1656
+ ```ts
1657
+ const result = await g8.api.gtmContext.stopAllGeneration();
1658
+ ```
1659
+
1660
+ ---
1661
+
1662
+ <a id="op-submitdocumentfeedback"></a>
1663
+
1664
+ ### `g8.api.gtmContext.submitDocumentFeedback(input)`
1665
+
1666
+ **Submit Document Feedback**
1667
+
1668
+ - HTTP: `POST /api/v1/global-context/documents/{doc_id}/feedback`
1669
+ - operationId: `submit_document_feedback_global_context_documents__doc_id__feedback_post` (also callable as `g8.api.call("submit_document_feedback_global_context_documents__doc_id__feedback_post", input)`)
1670
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1671
+ - API-key scope: `campaigns:write`
1672
+
1673
+ Thumbs up or down on a document.
1674
+
1675
+ `usage_id` attaches the feedback to a specific USE of the document rather
1676
+ than to the document itself, which is what makes "this answer was wrong"
1677
+ distinguishable from "this document is wrong".
1678
+
1679
+ **Input**
1680
+
1681
+ | Field | Type | Required | Description |
1682
+ |---|---|---|---|
1683
+ | `path.doc_id` | `string` | yes | Document id. |
1684
+ | `body` | `DocumentFeedbackRequest` | yes | Request body; fields below. |
1685
+
1686
+ Body fields (`DocumentFeedbackRequest`):
1687
+
1688
+ | Field | Type | Required | Description |
1689
+ |---|---|---|---|
1690
+ | `body.feedback_type` | `"up" \| "down"` | yes | Thumbs up or thumbs down on the document. |
1691
+ | `body.usage_id` | `string \| null` | no | The usage record this feedback is about, when the feedback follows a specific use of the document rather than the document itself. |
1692
+
1693
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1694
+
1695
+ Other envelope fields: `pagination` (PaginationMeta).
1696
+
1697
+ **Example**
1698
+
1699
+ ```ts
1700
+ const result = await g8.api.gtmContext.submitDocumentFeedback({ path: { doc_id: "id" }, body: { feedback_type: "up" } });
1701
+ ```
1702
+
1703
+ ---
1704
+
1705
+ <a id="op-trackdocumentusage"></a>
1706
+
1707
+ ### `g8.api.gtmContext.trackDocumentUsage(input)`
1708
+
1709
+ **Track Document Usage**
1710
+
1711
+ - HTTP: `POST /api/v1/global-context/documents/{doc_id}/track-usage`
1712
+ - operationId: `track_document_usage_global_context_documents__doc_id__track_usage_post` (also callable as `g8.api.call("track_document_usage_global_context_documents__doc_id__track_usage_post", input)`)
1713
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1714
+ - API-key scope: `campaigns:write`
1715
+
1716
+ Record one use of a Global Context document.
1717
+
1718
+ Feeds `GET /global-context/documents/analytics`. 404 if the document does
1719
+ not exist in the caller's organisation.
1720
+
1721
+ **Input**
1722
+
1723
+ | Field | Type | Required | Description |
1724
+ |---|---|---|---|
1725
+ | `path.doc_id` | `string` | yes | Global Context document ID. |
1726
+ | `body` | `TrackDocumentUsageRequest` | yes | Request body; fields below. |
1727
+
1728
+ Body fields (`TrackDocumentUsageRequest`):
1729
+
1730
+ | Field | Type | Required | Description |
1731
+ |---|---|---|---|
1732
+ | `body.usage_type` | `"creation" \| "citation"` | yes | `creation`: the document was used to generate new content. `citation`: the document was quoted or referenced. |
1733
+ | `body.source_id` | `string \| null` | no | ID of the entity that used the document, if any. max length 128 |
1734
+ | `body.source_type` | `string \| null` | no | Where the use happened, e.g. `campaign`, `account`, `copilot`, `research`. Free-form. max length 64 |
1735
+
1736
+ **Returns** `ApiResponse_StudioPayload_`: the envelope `{ data: StudioPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1737
+
1738
+ Other envelope fields: `pagination` (PaginationMeta).
1739
+
1740
+ **Example**
1741
+
1742
+ ```ts
1743
+ const result = await g8.api.gtmContext.trackDocumentUsage({ path: { doc_id: "id" }, body: { usage_type: "creation" } });
1744
+ ```
1745
+
1746
+ ---
1747
+
1748
+ <a id="op-unapprovecompanyprofile"></a>
1749
+
1750
+ ### `g8.api.gtmContext.unapproveCompanyProfile(input)`
1751
+
1752
+ **Unapprove Company Profile**
1753
+
1754
+ - HTTP: `POST /api/v1/company-profile/unapprove`
1755
+ - operationId: `unapprove_company_profile_company_profile_unapprove_post` (also callable as `g8.api.call("unapprove_company_profile_company_profile_unapprove_post", input)`)
1756
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1757
+ - API-key scope: `campaigns:write`
1758
+
1759
+ Release a human's approval on the profile so it can be rewritten.
1760
+
1761
+ An approved profile is immutable through `PUT /company-profile` unless
1762
+ that call is sent with `unapprove_if_approved`. This is the standalone
1763
+ half: it clears the approval WITHOUT changing a field, which is what you
1764
+ want when the approval was premature rather than the content wrong.
1765
+
1766
+ Org-wide and immediate. Nothing re-approves automatically.
1767
+
1768
+ **Input**
1769
+
1770
+ | Field | Type | Required | Description |
1771
+ |---|---|---|---|
1772
+ | `body` | `ProfileWebsiteRequest` | yes | Request body; fields below. |
1773
+
1774
+ Body fields (`ProfileWebsiteRequest`):
1775
+
1776
+ | Field | Type | Required | Description |
1777
+ |---|---|---|---|
1778
+ | `body.website_url` | `string` | yes | Website the profile was built from. Matched on its canonical domain. |
1779
+
1780
+ **Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1781
+
1782
+ Other envelope fields: `pagination` (PaginationMeta).
1783
+
1784
+ **Example**
1785
+
1786
+ ```ts
1787
+ const result = await g8.api.gtmContext.unapproveCompanyProfile({ body: { website_url: "https://example.com" } });
1788
+ ```
1789
+
1790
+ ---
1791
+
1792
+ <a id="op-updatecompanyprofile"></a>
1793
+
1794
+ ### `g8.api.gtmContext.updateCompanyProfile(input)`
1795
+
1796
+ **Update Company Profile**
1797
+
1798
+ - HTTP: `PUT /api/v1/company-profile`
1799
+ - operationId: `update_company_profile_company_profile_put` (also callable as `g8.api.call("update_company_profile_company_profile_put", input)`)
1800
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1801
+ - API-key scope: `campaigns:write`
1802
+
1803
+ Set this org's company profile (website + fields).
1804
+
1805
+ **Why this exists.** The company profile is the source of truth for Studio
1806
+ generation. Self-serve orgs that sign up without a domain get a profile seeded
1807
+ with graph8's own details, so every generated document describes the wrong
1808
+ company — and the only write path was ``POST /company-profile``, an internal
1809
+ JWT route absent from both the developer API and MCP. An agent could therefore
1810
+ detect the problem but never fix it, and could not even read the field back to
1811
+ confirm a human had fixed it.
1812
+
1813
+ Approved profiles are immutable. Pass ``unapprove_if_approved: true`` to
1814
+ deliberately unlock and overwrite one; otherwise this returns 409 rather than
1815
+ quietly discarding a human's approval.
1816
+
1817
+ Changing the website does NOT regenerate existing Studio documents — they were
1818
+ generated from the old site. Follow with
1819
+ ``POST /api/v1/global-context/regenerate``.
1820
+
1821
+ **Input**
1822
+
1823
+ | Field | Type | Required | Description |
1824
+ |---|---|---|---|
1825
+ | `body` | `CompanyProfileUpdateRequest` | yes | Request body; fields below. |
1826
+
1827
+ Body fields (`CompanyProfileUpdateRequest`):
1828
+
1829
+ | Field | Type | Required | Description |
1830
+ |---|---|---|---|
1831
+ | `body.fields` | `Record<string, string>` | yes | Profile fields to save, e.g. {'company_name': 'Acme', 'industry': 'Manufacturing'}. Replaces the stored field set. |
1832
+ | `body.website_url` | `string` | yes | The client's real website. This is the source of truth Studio generation reads; setting it wrong is what makes every downstream ICP, persona and campaign describe the wrong company. |
1833
+ | `body.unapprove_if_approved` | `boolean` | no | Approved profiles are immutable by design. Set true to explicitly unlock and overwrite a human-approved profile. Left false, an approved profile returns 409 instead of being silently unapproved. default `false` |
1834
+
1835
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1836
+
1837
+ Other envelope fields: `pagination` (PaginationMeta).
1838
+
1839
+ **Example**
1840
+
1841
+ ```ts
1842
+ const result = await g8.api.gtmContext.updateCompanyProfile({ body: { fields: {}, website_url: "https://example.com" } });
1843
+ ```
1844
+
1845
+ ---
1846
+
1847
+ <a id="op-updateglobalcontextdocument"></a>
1848
+
1849
+ ### `g8.api.gtmContext.updateGlobalContextDocument(input)`
1850
+
1851
+ **Update Global Context Document**
1852
+
1853
+ - HTTP: `PATCH /api/v1/global-context/documents/{doc_id}`
1854
+ - operationId: `update_global_context_document_global_context_documents__doc_id__patch` (also callable as `g8.api.call("update_global_context_document_global_context_documents__doc_id__patch", input)`)
1855
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1856
+ - API-key scope: `campaigns:write`
1857
+
1858
+ Update a Global Context (Studio) document's content and/or status.
1859
+
1860
+ Read-side counterpart already exists (``GET /global-context/documents``);
1861
+ this closes the long-standing "read but can't update" gap for the Context
1862
+ bucket. Each save creates a ``DocumentVersion`` snapshot, identical to the
1863
+ internal Studio editor — so version history stays consistent regardless of
1864
+ whether the edit came from the UI, the developer API, or MCP.
1865
+
1866
+ Partial update: send ``content``, ``status``, or both. Returns 400 if
1867
+ neither is provided, 404 if the document does not exist in this org.
1868
+
1869
+ Note: the Intelligence bucket (``cb_intelligence_data``) is intentionally
1870
+ read-only — it is machine-generated and has no manual-edit path.
1871
+
1872
+ **Input**
1873
+
1874
+ | Field | Type | Required | Description |
1875
+ |---|---|---|---|
1876
+ | `path.doc_id` | `string` | yes | Global context document ID (UUID) |
1877
+ | `body` | `UpdateGlobalContextRequest` | yes | Request body; fields below. |
1878
+
1879
+ Body fields (`UpdateGlobalContextRequest`):
1880
+
1881
+ | Field | Type | Required | Description |
1882
+ |---|---|---|---|
1883
+ | `body.content` | `string \| null` | no | New document body. Stored at meta_data.content. Omit to leave unchanged. |
1884
+ | `body.status` | `string \| null` | no | New document status (e.g. 'completed', 'draft'). Omit to leave unchanged. |
1885
+
1886
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1887
+
1888
+ Other envelope fields: `pagination` (PaginationMeta).
1889
+
1890
+ **Example**
1891
+
1892
+ ```ts
1893
+ const result = await g8.api.gtmContext.updateGlobalContextDocument({ path: { doc_id: "id" }, body: {} });
1894
+ ```
1895
+
1896
+ ---
1897
+
1898
+ <a id="op-updateicp"></a>
1899
+
1900
+ ### `g8.api.gtmContext.updateIcp(input)`
1901
+
1902
+ **Update Icp**
1903
+
1904
+ - HTTP: `PATCH /api/v1/icps/{icp_id}`
1905
+ - operationId: `update_icp_icps__icp_id__patch` (also callable as `g8.api.call("update_icp_icps__icp_id__patch", input)`)
1906
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1907
+ - API-key scope: `campaigns:write`
1908
+ - ★ Hand-written: [`g8.studio.updateIcp()`](../sdk-clients.md#g8-studio-updateicp)
1909
+
1910
+ Update a Studio ICP's fields (partial update).
1911
+
1912
+ Send at least one field. To archive an ICP use ``POST /icps/{icp_id}/archive``.
1913
+ Returns 400 if no field is provided, 404 if the ICP does not exist in this org.
1914
+
1915
+ **Input**
1916
+
1917
+ | Field | Type | Required | Description |
1918
+ |---|---|---|---|
1919
+ | `path.icp_id` | `string` | yes | ICP ID (UUID) |
1920
+ | `body` | `UpdateIcpRequest` | yes | Request body; fields below. |
1921
+
1922
+ Body fields (`UpdateIcpRequest`):
1923
+
1924
+ | Field | Type | Required | Description |
1925
+ |---|---|---|---|
1926
+ | `body.buying_signals` | `Array<unknown> \| null` | no | New list of buying-intent signals. |
1927
+ | `body.description` | `string \| null` | no | New description. |
1928
+ | `body.estimated_market_size` | `integer \| null` | no | New estimated market-size count. |
1929
+ | `body.firmographics` | `Record<string, unknown> \| null` | no | New firmographic criteria. |
1930
+ | `body.name` | `string \| null` | no | New ICP name. |
1931
+ | `body.tech_stack` | `Record<string, unknown> \| null` | no | New technology signals. |
1932
+
1933
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1934
+
1935
+ Other envelope fields: `pagination` (PaginationMeta).
1936
+
1937
+ **Example**
1938
+
1939
+ ```ts
1940
+ const result = await g8.api.gtmContext.updateIcp({ path: { icp_id: "id" }, body: {} });
1941
+ ```
1942
+
1943
+ ---
1944
+
1945
+ <a id="op-updatepersona"></a>
1946
+
1947
+ ### `g8.api.gtmContext.updatePersona(input)`
1948
+
1949
+ **Update Persona**
1950
+
1951
+ - HTTP: `PATCH /api/v1/personas/{persona_id}`
1952
+ - operationId: `update_persona_personas__persona_id__patch` (also callable as `g8.api.call("update_persona_personas__persona_id__patch", input)`)
1953
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
1954
+ - API-key scope: `campaigns:write`
1955
+ - ★ Hand-written: [`g8.studio.updatePersona()`](../sdk-clients.md#g8-studio-updatepersona)
1956
+
1957
+ Update a Studio persona's fields and/or status (partial update).
1958
+
1959
+ Send at least one field. Passing ``status='archived'`` is equivalent to
1960
+ ``POST /personas/{persona_id}/archive``. Returns 400 if no field is provided,
1961
+ 404 if the persona does not exist in this org.
1962
+
1963
+ **Input**
1964
+
1965
+ | Field | Type | Required | Description |
1966
+ |---|---|---|---|
1967
+ | `path.persona_id` | `string` | yes | Persona ID (UUID) |
1968
+ | `body` | `UpdatePersonaRequest` | yes | Request body; fields below. |
1969
+
1970
+ Body fields (`UpdatePersonaRequest`):
1971
+
1972
+ | Field | Type | Required | Description |
1973
+ |---|---|---|---|
1974
+ | `body.campaign_approach` | `string \| null` | no | New campaign approach. |
1975
+ | `body.confidence` | `string \| null` | no | New confidence label. |
1976
+ | `body.expected_receptivity` | `string \| null` | no | New expected-receptivity note. |
1977
+ | `body.key_signals` | `Array<unknown> \| null` | no | New list of buying/intent signals. |
1978
+ | `body.priority` | `integer \| null` | no | New display priority. |
1979
+ | `body.recommended_goal` | `string \| null` | no | New recommended goal. |
1980
+ | `body.status` | `string \| null` | no | New status (e.g. 'active', 'archived'). |
1981
+ | `body.title` | `string \| null` | no | New persona title. |
1982
+ | `body.why_target` | `string \| null` | no | New 'why target' text. |
1983
+
1984
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1985
+
1986
+ Other envelope fields: `pagination` (PaginationMeta).
1987
+
1988
+ **Example**
1989
+
1990
+ ```ts
1991
+ const result = await g8.api.gtmContext.updatePersona({ path: { persona_id: "id" }, body: {} });
1992
+ ```
1993
+
1994
+ ---
1995
+
1996
+ <a id="op-updateresearchreport"></a>
1997
+
1998
+ ### `g8.api.gtmContext.updateResearchReport(input)`
1999
+
2000
+ **Update Research Report**
2001
+
2002
+ - HTTP: `PATCH /api/v1/research-reports/{report_id}`
2003
+ - operationId: `update_research_report_research_reports__report_id__patch` (also callable as `g8.api.call("update_research_report_research_reports__report_id__patch", input)`)
2004
+ - Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
2005
+ - API-key scope: `campaigns:run`
2006
+
2007
+ Update a Research report's markdown content and/or status.
2008
+
2009
+ Read-side counterpart already exists (``GET /research-reports``); this
2010
+ closes the "read but can't update" gap for the Research bucket. On a content
2011
+ change it creates a ``DocumentVersion`` snapshot AND re-indexes the report to
2012
+ the RAG knowledge base — identical to the internal Studio editor, so search
2013
+ never goes stale relative to an API-driven edit.
2014
+
2015
+ Partial update: send ``markdown_content``, ``status``, or both. Returns 400
2016
+ if neither is provided, 404 if the report does not exist in this org. A
2017
+ report already 'completed'/'approved' can only move between those two states.
2018
+
2019
+ **Input**
2020
+
2021
+ | Field | Type | Required | Description |
2022
+ |---|---|---|---|
2023
+ | `path.report_id` | `string` | yes | Research report ID (UUID) |
2024
+ | `body` | `UpdateResearchReportRequest` | yes | Request body; fields below. |
2025
+
2026
+ Body fields (`UpdateResearchReportRequest`):
2027
+
2028
+ | Field | Type | Required | Description |
2029
+ |---|---|---|---|
2030
+ | `body.markdown_content` | `string \| null` | no | New rendered markdown body. Omit to leave unchanged. Triggers RAG re-index. |
2031
+ | `body.status` | `string \| null` | no | New report status. A report already 'completed'/'approved' can only move between those two states (done reports stay done). |
2032
+
2033
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2034
+
2035
+ Other envelope fields: `pagination` (PaginationMeta).
2036
+
2037
+ **Example**
2038
+
2039
+ ```ts
2040
+ // billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
2041
+ const result = await g8.api.gtmContext.updateResearchReport({ path: { report_id: "id" }, body: {} });
2042
+ ```
2043
+
2044
+ ---
2045
+
2046
+ <a id="op-uploadcompanyprofilelogo"></a>
2047
+
2048
+ ### `g8.api.gtmContext.uploadCompanyProfileLogo(input?)`
2049
+
2050
+ **Upload Company Profile Logo**
2051
+
2052
+ - HTTP: `POST /api/v1/company-profile/logo`
2053
+ - operationId: `upload_company_profile_logo_company_profile_logo_post` (also callable as `g8.api.call("upload_company_profile_logo_company_profile_logo_post", input)`)
2054
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2055
+ - API-key scope: `campaigns:write`
2056
+
2057
+ Upload the org's logo and set it on the profile. Multipart.
2058
+
2059
+ The public booking page shows this logo.
2060
+
2061
+ **Input**: none.
2062
+
2063
+ **Returns** `ApiResponse_CrmRecordPayload_`: the envelope `{ data: CrmRecordPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2064
+
2065
+ Other envelope fields: `pagination` (PaginationMeta).
2066
+
2067
+ **Example**
2068
+
2069
+ ```ts
2070
+ const result = await g8.api.gtmContext.uploadCompanyProfileLogo();
2071
+ ```
2072
+
2073
+ ---
2074
+
2075
+ <a id="op-uploadenablementasset"></a>
2076
+
2077
+ ### `g8.api.gtmContext.uploadEnablementAsset(input)`
2078
+
2079
+ **Upload Enablement Asset**
2080
+
2081
+ - HTTP: `POST /api/v1/enablement/assets`
2082
+ - operationId: `upload_enablement_asset_enablement_assets_post` (also callable as `g8.api.call("upload_enablement_asset_enablement_assets_post", input)`)
2083
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2084
+ - API-key scope: `campaigns:write`
2085
+
2086
+ Upload an internal, org-scoped asset to Studio's Enablement library.
2087
+
2088
+ **Input**
2089
+
2090
+ | Field | Type | Required | Description |
2091
+ |---|---|---|---|
2092
+ | `body` | `EnablementAssetUploadRequest` | yes | Request body; fields below. |
2093
+
2094
+ Body fields (`EnablementAssetUploadRequest`):
2095
+
2096
+ | Field | Type | Required | Description |
2097
+ |---|---|---|---|
2098
+ | `body.content_base64` | `string` | yes | min length 1 |
2099
+ | `body.file_name` | `string` | yes | min length 1, max length 255 |
2100
+ | `body.folder` | `string \| null` | no | max length 50 |
2101
+ | `body.mime_type` | `string \| null` | no | max length 100 |
2102
+ | `body.tags` | `Array<string>` | no | max items 20 |
2103
+
2104
+ **Returns** `ApiResponse_dict_`: the envelope `{ data: Record<string, unknown>, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2105
+
2106
+ Other envelope fields: `pagination` (PaginationMeta).
2107
+
2108
+ **Example**
2109
+
2110
+ ```ts
2111
+ const result = await g8.api.gtmContext.uploadEnablementAsset({ body: { content_base64: "example", file_name: "Example" } });
2112
+ ```