@graph8/sdk 0.251.0 → 0.262.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/README.md +9 -2
  2. package/dist/cli.js +216 -0
  3. package/dist/index.d.mts +105 -7
  4. package/dist/index.d.ts +105 -7
  5. package/dist/index.js +44 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +44 -3
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/react.d.mts +103 -7
  10. package/dist/react.d.ts +103 -7
  11. package/dist/react.js +62 -11
  12. package/dist/react.js.map +1 -1
  13. package/dist/react.mjs +53 -12
  14. package/dist/react.mjs.map +1 -1
  15. package/dist/types/README.md +7 -0
  16. package/dist/types/agency.d.ts +20 -0
  17. package/dist/types/agentSetup.d.ts +57 -0
  18. package/dist/types/api.d.ts +127 -0
  19. package/dist/types/appClient.d.ts +99 -0
  20. package/dist/types/appPlatform.d.ts +269 -0
  21. package/dist/types/appTokens.d.ts +125 -0
  22. package/dist/types/apps.d.ts +130 -0
  23. package/dist/types/audiences.d.ts +88 -0
  24. package/dist/types/calendar.d.ts +55 -0
  25. package/dist/types/campaigns.d.ts +61 -0
  26. package/dist/types/chat.d.ts +35 -0
  27. package/dist/types/cli.d.ts +14 -0
  28. package/dist/types/companies.d.ts +123 -0
  29. package/dist/types/contacts.d.ts +200 -0
  30. package/dist/types/copilot.d.ts +31 -0
  31. package/dist/types/core.d.ts +1052 -0
  32. package/dist/types/deals.d.ts +215 -0
  33. package/dist/types/enrich.d.ts +51 -0
  34. package/dist/types/fields.d.ts +84 -0
  35. package/dist/types/forms.d.ts +16 -0
  36. package/dist/types/http.d.ts +141 -0
  37. package/dist/types/inbox.d.ts +123 -0
  38. package/dist/types/index.d.ts +63 -0
  39. package/dist/types/intent.d.ts +196 -0
  40. package/dist/types/lists.d.ts +44 -0
  41. package/dist/types/mailboxes.d.ts +240 -0
  42. package/dist/types/marketplace.d.ts +62 -0
  43. package/dist/types/meetings.d.ts +70 -0
  44. package/dist/types/newsletter.d.ts +212 -0
  45. package/dist/types/notes.d.ts +57 -0
  46. package/dist/types/objects.d.ts +281 -0
  47. package/dist/types/pipelines.d.ts +135 -0
  48. package/dist/types/quotes.d.ts +143 -0
  49. package/dist/types/react.d.ts +978 -0
  50. package/dist/types/search.d.ts +99 -0
  51. package/dist/types/sequences.d.ts +255 -0
  52. package/dist/types/signals.d.ts +28 -0
  53. package/dist/types/skills.d.ts +176 -0
  54. package/dist/types/snippet.d.ts +24 -0
  55. package/dist/types/studio.d.ts +161 -0
  56. package/dist/types/tasks.d.ts +101 -0
  57. package/dist/types/types.d.ts +45 -0
  58. package/dist/types/utils.d.ts +21 -0
  59. package/dist/types/version.d.ts +10 -0
  60. package/dist/types/visitors.d.ts +29 -0
  61. package/dist/types/voice.d.ts +304 -0
  62. package/dist/types/webhooks.d.ts +71 -0
  63. package/dist/types/workflows.d.ts +229 -0
  64. package/docs/agents.md +748 -0
  65. package/docs/api/README.md +165 -0
  66. package/docs/api/accounts.d.ts +396 -0
  67. package/docs/api/accounts.md +644 -0
  68. package/docs/api/adCampaigns.d.ts +707 -0
  69. package/docs/api/adCampaigns.md +1091 -0
  70. package/docs/api/adCreatives.d.ts +996 -0
  71. package/docs/api/adCreatives.md +1708 -0
  72. package/docs/api/agency.d.ts +556 -0
  73. package/docs/api/agency.md +845 -0
  74. package/docs/api/agent.d.ts +330 -0
  75. package/docs/api/agent.md +514 -0
  76. package/docs/api/agents.d.ts +1622 -0
  77. package/docs/api/agents.md +2860 -0
  78. package/docs/api/aiInbox.d.ts +1984 -0
  79. package/docs/api/aiInbox.md +3490 -0
  80. package/docs/api/analytics.d.ts +1273 -0
  81. package/docs/api/analytics.md +2095 -0
  82. package/docs/api/apiKeys.d.ts +252 -0
  83. package/docs/api/apiKeys.md +318 -0
  84. package/docs/api/appDeployments.d.ts +236 -0
  85. package/docs/api/appDeployments.md +471 -0
  86. package/docs/api/appDomains.d.ts +171 -0
  87. package/docs/api/appDomains.md +281 -0
  88. package/docs/api/appLogs.d.ts +120 -0
  89. package/docs/api/appLogs.md +159 -0
  90. package/docs/api/appObjects.d.ts +415 -0
  91. package/docs/api/appObjects.md +568 -0
  92. package/docs/api/appPages.d.ts +557 -0
  93. package/docs/api/appPages.md +796 -0
  94. package/docs/api/appPlatformTokens.d.ts +123 -0
  95. package/docs/api/appPlatformTokens.md +172 -0
  96. package/docs/api/appointments.d.ts +2361 -0
  97. package/docs/api/appointments.md +3917 -0
  98. package/docs/api/apps.d.ts +822 -0
  99. package/docs/api/apps.md +1342 -0
  100. package/docs/api/assertUpsert.d.ts +286 -0
  101. package/docs/api/assertUpsert.md +370 -0
  102. package/docs/api/audienceSyncs.d.ts +259 -0
  103. package/docs/api/audienceSyncs.md +395 -0
  104. package/docs/api/brandKit.d.ts +686 -0
  105. package/docs/api/brandKit.md +1133 -0
  106. package/docs/api/bugReports.d.ts +181 -0
  107. package/docs/api/bugReports.md +268 -0
  108. package/docs/api/by-path.md +3260 -0
  109. package/docs/api/calendarInvites.d.ts +117 -0
  110. package/docs/api/calendarInvites.md +148 -0
  111. package/docs/api/campaignWorkflows.d.ts +152 -0
  112. package/docs/api/campaignWorkflows.md +200 -0
  113. package/docs/api/campaigns.d.ts +721 -0
  114. package/docs/api/campaigns.md +1236 -0
  115. package/docs/api/channels.d.ts +171 -0
  116. package/docs/api/channels.md +235 -0
  117. package/docs/api/cliCampaigns.d.ts +205 -0
  118. package/docs/api/cliCampaigns.md +256 -0
  119. package/docs/api/cliPipelines.d.ts +324 -0
  120. package/docs/api/cliPipelines.md +562 -0
  121. package/docs/api/clickHouse.d.ts +115 -0
  122. package/docs/api/clickHouse.md +138 -0
  123. package/docs/api/companies.d.ts +1636 -0
  124. package/docs/api/companies.md +2211 -0
  125. package/docs/api/companyIntelligence.d.ts +299 -0
  126. package/docs/api/companyIntelligence.md +488 -0
  127. package/docs/api/contacts.d.ts +2173 -0
  128. package/docs/api/contacts.md +3143 -0
  129. package/docs/api/content.d.ts +968 -0
  130. package/docs/api/content.md +1667 -0
  131. package/docs/api/contentGridSkills.d.ts +177 -0
  132. package/docs/api/contentGridSkills.md +271 -0
  133. package/docs/api/copilot.d.ts +1017 -0
  134. package/docs/api/copilot.md +1765 -0
  135. package/docs/api/crmSyncs.d.ts +215 -0
  136. package/docs/api/crmSyncs.md +301 -0
  137. package/docs/api/customerSuccess.d.ts +491 -0
  138. package/docs/api/customerSuccess.md +776 -0
  139. package/docs/api/deals.d.ts +1697 -0
  140. package/docs/api/deals.md +2436 -0
  141. package/docs/api/deliverability.d.ts +418 -0
  142. package/docs/api/deliverability.md +677 -0
  143. package/docs/api/desk.d.ts +1765 -0
  144. package/docs/api/desk.md +3007 -0
  145. package/docs/api/dialer.d.ts +1185 -0
  146. package/docs/api/dialer.md +2166 -0
  147. package/docs/api/dialerAnalytics.d.ts +187 -0
  148. package/docs/api/dialerAnalytics.md +257 -0
  149. package/docs/api/documents.d.ts +895 -0
  150. package/docs/api/documents.md +1440 -0
  151. package/docs/api/duplicates.d.ts +195 -0
  152. package/docs/api/duplicates.md +315 -0
  153. package/docs/api/eSign.d.ts +38 -0
  154. package/docs/api/eSign.md +54 -0
  155. package/docs/api/eSignature.d.ts +242 -0
  156. package/docs/api/eSignature.md +341 -0
  157. package/docs/api/enrichment.d.ts +3207 -0
  158. package/docs/api/enrichment.md +5225 -0
  159. package/docs/api/events.d.ts +115 -0
  160. package/docs/api/events.md +105 -0
  161. package/docs/api/fields.d.ts +482 -0
  162. package/docs/api/fields.md +566 -0
  163. package/docs/api/forms.d.ts +1012 -0
  164. package/docs/api/forms.md +1542 -0
  165. package/docs/api/gtmCampaigns.d.ts +662 -0
  166. package/docs/api/gtmCampaigns.md +1044 -0
  167. package/docs/api/gtmContext.d.ts +1187 -0
  168. package/docs/api/gtmContext.md +2112 -0
  169. package/docs/api/gtmDeliverability.d.ts +60 -0
  170. package/docs/api/gtmDeliverability.md +63 -0
  171. package/docs/api/gtmKnowledgeBase.d.ts +76 -0
  172. package/docs/api/gtmKnowledgeBase.md +91 -0
  173. package/docs/api/gtmLaunchHelpers.d.ts +123 -0
  174. package/docs/api/gtmLaunchHelpers.md +148 -0
  175. package/docs/api/gtmLibrary.d.ts +448 -0
  176. package/docs/api/gtmLibrary.md +780 -0
  177. package/docs/api/health.d.ts +39 -0
  178. package/docs/api/health.md +58 -0
  179. package/docs/api/imageLibrary.d.ts +341 -0
  180. package/docs/api/imageLibrary.md +569 -0
  181. package/docs/api/imports.d.ts +157 -0
  182. package/docs/api/imports.md +174 -0
  183. package/docs/api/inbox.d.ts +709 -0
  184. package/docs/api/inbox.md +1067 -0
  185. package/docs/api/install.d.ts +213 -0
  186. package/docs/api/install.md +317 -0
  187. package/docs/api/installedApps.d.ts +131 -0
  188. package/docs/api/installedApps.md +241 -0
  189. package/docs/api/integrationStatus.d.ts +142 -0
  190. package/docs/api/integrationStatus.md +205 -0
  191. package/docs/api/integrations.d.ts +2327 -0
  192. package/docs/api/integrations.md +3791 -0
  193. package/docs/api/intent.d.ts +482 -0
  194. package/docs/api/intent.md +858 -0
  195. package/docs/api/knowledge.d.ts +501 -0
  196. package/docs/api/knowledge.md +843 -0
  197. package/docs/api/knowledgeBase.d.ts +84 -0
  198. package/docs/api/knowledgeBase.md +96 -0
  199. package/docs/api/landingPages.d.ts +1411 -0
  200. package/docs/api/landingPages.md +2488 -0
  201. package/docs/api/leads.d.ts +133 -0
  202. package/docs/api/leads.md +180 -0
  203. package/docs/api/library.d.ts +217 -0
  204. package/docs/api/library.md +338 -0
  205. package/docs/api/linkedIn.d.ts +227 -0
  206. package/docs/api/linkedIn.md +289 -0
  207. package/docs/api/linkedInOutreach.d.ts +727 -0
  208. package/docs/api/linkedInOutreach.md +990 -0
  209. package/docs/api/lists.d.ts +1106 -0
  210. package/docs/api/lists.md +1609 -0
  211. package/docs/api/logs.d.ts +71 -0
  212. package/docs/api/logs.md +70 -0
  213. package/docs/api/mailboxes.d.ts +1050 -0
  214. package/docs/api/mailboxes.md +1690 -0
  215. package/docs/api/marketingIntelligence.d.ts +256 -0
  216. package/docs/api/marketingIntelligence.md +454 -0
  217. package/docs/api/marketplace.d.ts +3173 -0
  218. package/docs/api/marketplace.md +5953 -0
  219. package/docs/api/mcp.d.ts +69 -0
  220. package/docs/api/mcp.md +69 -0
  221. package/docs/api/me.d.ts +54 -0
  222. package/docs/api/me.md +56 -0
  223. package/docs/api/meetings.d.ts +539 -0
  224. package/docs/api/meetings.md +747 -0
  225. package/docs/api/newsletter.d.ts +1613 -0
  226. package/docs/api/newsletter.md +2746 -0
  227. package/docs/api/notes.d.ts +517 -0
  228. package/docs/api/notes.md +888 -0
  229. package/docs/api/notifications.d.ts +94 -0
  230. package/docs/api/notifications.md +105 -0
  231. package/docs/api/objects.d.ts +621 -0
  232. package/docs/api/objects.md +1098 -0
  233. package/docs/api/openSearch.d.ts +234 -0
  234. package/docs/api/openSearch.md +297 -0
  235. package/docs/api/ops.d.ts +299 -0
  236. package/docs/api/ops.md +339 -0
  237. package/docs/api/orgGovernance.d.ts +393 -0
  238. package/docs/api/orgGovernance.md +623 -0
  239. package/docs/api/orgVideos.d.ts +184 -0
  240. package/docs/api/orgVideos.md +252 -0
  241. package/docs/api/organizationSettings.d.ts +626 -0
  242. package/docs/api/organizationSettings.md +911 -0
  243. package/docs/api/phoneNumbers.d.ts +484 -0
  244. package/docs/api/phoneNumbers.md +777 -0
  245. package/docs/api/profile.d.ts +329 -0
  246. package/docs/api/profile.md +540 -0
  247. package/docs/api/programmaticPages.d.ts +400 -0
  248. package/docs/api/programmaticPages.md +626 -0
  249. package/docs/api/providerDomains.d.ts +866 -0
  250. package/docs/api/providerDomains.md +1446 -0
  251. package/docs/api/providerUsage.d.ts +129 -0
  252. package/docs/api/providerUsage.md +186 -0
  253. package/docs/api/public.d.ts +69 -0
  254. package/docs/api/public.md +78 -0
  255. package/docs/api/publicCopilot.d.ts +67 -0
  256. package/docs/api/publicCopilot.md +80 -0
  257. package/docs/api/publicSignals.d.ts +66 -0
  258. package/docs/api/publicSignals.md +71 -0
  259. package/docs/api/publicVisitors.d.ts +97 -0
  260. package/docs/api/publicVisitors.md +118 -0
  261. package/docs/api/quotes.d.ts +1564 -0
  262. package/docs/api/quotes.md +2553 -0
  263. package/docs/api/radar.d.ts +808 -0
  264. package/docs/api/radar.md +1431 -0
  265. package/docs/api/radarReports.d.ts +208 -0
  266. package/docs/api/radarReports.md +306 -0
  267. package/docs/api/recordRoles.d.ts +143 -0
  268. package/docs/api/recordRoles.md +175 -0
  269. package/docs/api/repos.d.ts +146 -0
  270. package/docs/api/repos.md +211 -0
  271. package/docs/api/research.d.ts +295 -0
  272. package/docs/api/research.md +534 -0
  273. package/docs/api/revenue.d.ts +402 -0
  274. package/docs/api/revenue.md +608 -0
  275. package/docs/api/revenueAnalytics.d.ts +147 -0
  276. package/docs/api/revenueAnalytics.md +212 -0
  277. package/docs/api/revenueLifecycle.d.ts +207 -0
  278. package/docs/api/revenueLifecycle.md +274 -0
  279. package/docs/api/revenueRecords.d.ts +372 -0
  280. package/docs/api/revenueRecords.md +563 -0
  281. package/docs/api/roles.d.ts +431 -0
  282. package/docs/api/roles.md +812 -0
  283. package/docs/api/salesCoach.d.ts +877 -0
  284. package/docs/api/salesCoach.md +1540 -0
  285. package/docs/api/sandbox.d.ts +210 -0
  286. package/docs/api/sandbox.md +380 -0
  287. package/docs/api/scans.d.ts +104 -0
  288. package/docs/api/scans.md +136 -0
  289. package/docs/api/scheduleBuy.d.ts +293 -0
  290. package/docs/api/scheduleBuy.md +431 -0
  291. package/docs/api/scraping.d.ts +266 -0
  292. package/docs/api/scraping.md +383 -0
  293. package/docs/api/sdrAnalytics.d.ts +138 -0
  294. package/docs/api/sdrAnalytics.md +246 -0
  295. package/docs/api/search.d.ts +598 -0
  296. package/docs/api/search.md +866 -0
  297. package/docs/api/seo.d.ts +447 -0
  298. package/docs/api/seo.md +660 -0
  299. package/docs/api/sequenceLifecycle.d.ts +439 -0
  300. package/docs/api/sequenceLifecycle.md +513 -0
  301. package/docs/api/sequences.d.ts +1936 -0
  302. package/docs/api/sequences.md +3232 -0
  303. package/docs/api/settings.d.ts +448 -0
  304. package/docs/api/settings.md +731 -0
  305. package/docs/api/signals.d.ts +1441 -0
  306. package/docs/api/signals.md +2526 -0
  307. package/docs/api/signatures.d.ts +719 -0
  308. package/docs/api/signatures.md +1247 -0
  309. package/docs/api/skills.d.ts +230 -0
  310. package/docs/api/skills.md +466 -0
  311. package/docs/api/snippet.d.ts +85 -0
  312. package/docs/api/snippet.md +106 -0
  313. package/docs/api/socialPublishing.d.ts +824 -0
  314. package/docs/api/socialPublishing.md +1245 -0
  315. package/docs/api/studioDocuments.d.ts +244 -0
  316. package/docs/api/studioDocuments.md +348 -0
  317. package/docs/api/support.d.ts +90 -0
  318. package/docs/api/support.md +76 -0
  319. package/docs/api/suppressions.d.ts +241 -0
  320. package/docs/api/suppressions.md +343 -0
  321. package/docs/api/surveys.d.ts +847 -0
  322. package/docs/api/surveys.md +1223 -0
  323. package/docs/api/tasks.d.ts +813 -0
  324. package/docs/api/tasks.md +1344 -0
  325. package/docs/api/teamMembers.d.ts +668 -0
  326. package/docs/api/teamMembers.md +1040 -0
  327. package/docs/api/teams.d.ts +784 -0
  328. package/docs/api/teams.md +1395 -0
  329. package/docs/api/usage.d.ts +277 -0
  330. package/docs/api/usage.md +389 -0
  331. package/docs/api/visitors.d.ts +690 -0
  332. package/docs/api/visitors.md +1075 -0
  333. package/docs/api/voice.d.ts +4661 -0
  334. package/docs/api/voice.md +7905 -0
  335. package/docs/api/webAnalytics.d.ts +964 -0
  336. package/docs/api/webAnalytics.md +1452 -0
  337. package/docs/api/webChat.d.ts +1704 -0
  338. package/docs/api/webChat.md +2048 -0
  339. package/docs/api/webhooks.d.ts +251 -0
  340. package/docs/api/webhooks.md +386 -0
  341. package/docs/api/websiteEditor.d.ts +324 -0
  342. package/docs/api/websiteEditor.md +517 -0
  343. package/docs/api/work.d.ts +2298 -0
  344. package/docs/api/work.md +3096 -0
  345. package/docs/api/workbench.d.ts +2962 -0
  346. package/docs/api/workbench.md +4884 -0
  347. package/docs/api/workflows.d.ts +1218 -0
  348. package/docs/api/workflows.md +2302 -0
  349. package/docs/sdk-clients.md +4339 -0
  350. package/package.json +10 -3
@@ -0,0 +1,3791 @@
1
+ <!-- Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. -->
2
+
3
+ # `g8.api.integrations`: Integrations
4
+
5
+ 83 operations (39 read, 5 destructive, 39 external).
6
+
7
+ No hand-written client covers this area. Call it through `g8.api.integrations.*` as shown below, or by operationId with `g8.api.call(operationId, input)`.
8
+
9
+ Every example below assumes this setup (server-side, API key):
10
+
11
+ ```ts
12
+ import { g8 } from "@graph8/sdk";
13
+
14
+ g8.init({ apiKey: process.env.G8_API_KEY! });
15
+ ```
16
+
17
+ Example values are placeholders that match each field's type. Only required fields are shown. Every example is type-checked against the SDK in CI.
18
+
19
+ Exact TypeScript types for every operation on this page, and every schema they use: [integrations.d.ts](integrations.d.ts).
20
+
21
+ ## Operations
22
+
23
+ | Call | HTTP | Tier | Scope | Summary |
24
+ |---|---|---|---|---|
25
+ | [`batchCreateCrmContacts`](#op-batchcreatecrmcontacts) | `POST /api/v1/integrations/crm/connections/{connection_id}/batch/contacts` | external | `integrations:run` | Batch Create Crm Contacts |
26
+ | [`batchUpdateCrmContacts`](#op-batchupdatecrmcontacts) | `PUT /api/v1/integrations/crm/connections/{connection_id}/batch/contacts` | external | `integrations:run` | Batch Update Crm Contacts |
27
+ | [`cancelMigration`](#op-cancelmigration) | `POST /api/v1/integrations/migrations/{migration_id}/cancel` | destructive | `integrations:delete` | Cancel Migration |
28
+ | [`confirmMigration`](#op-confirmmigration) | `POST /api/v1/integrations/migrations/{migration_id}/confirm` | external | `integrations:run` | Confirm Migration |
29
+ | [`connectSugarcrm`](#op-connectsugarcrm) | `POST /api/v1/integrations/sugarcrm/connect` | external | `integrations:run` | Connect Sugarcrm |
30
+ | [`createConnectionSessionToken`](#op-createconnectionsessiontoken) | `POST /api/v1/integrations/connections/session-token` | external | `integrations:run` | Create Connection Session Token |
31
+ | [`createCrmCompany`](#op-createcrmcompany) | `POST /api/v1/integrations/crm/connections/{connection_id}/companies` | external | `integrations:run` | Create Crm Company |
32
+ | [`createCrmContact`](#op-createcrmcontact) | `POST /api/v1/integrations/crm/connections/{connection_id}/contacts` | external | `integrations:run` | Create Crm Contact |
33
+ | [`createCrmDeal`](#op-createcrmdeal) | `POST /api/v1/integrations/crm/connections/{connection_id}/deals` | external | `integrations:run` | Create Crm Deal |
34
+ | [`createCrmLead`](#op-createcrmlead) | `POST /api/v1/integrations/crm/connections/{connection_id}/leads` | external | `integrations:run` | Create Crm Lead |
35
+ | [`createCrmMeeting`](#op-createcrmmeeting) | `POST /api/v1/integrations/crm/meetings` | external | `integrations:run` | Create Crm Meeting |
36
+ | [`createGoogleConversionAction`](#op-creategoogleconversionaction) | `POST /api/v1/audience-syncs/google/conversion-actions` | external | `integrations:run` | Create Google Conversion Action |
37
+ | [`createVideoUploadUrl`](#op-createvideouploadurl) | `POST /api/v1/audience-syncs/google/video-assets/upload-urls` | external | `integrations:run` | Create Video Upload Url |
38
+ | [`deleteConnection`](#op-deleteconnection) | `DELETE /api/v1/integrations/connections/{connection_id}` | destructive | `integrations:delete` | Delete Connection |
39
+ | [`deleteCrmContact`](#op-deletecrmcontact) | `DELETE /api/v1/integrations/crm/connections/{connection_id}/contacts/{contact_id}` | destructive | `integrations:delete` | Delete Crm Contact |
40
+ | [`discardDraftSyncConfig`](#op-discarddraftsyncconfig) | `DELETE /api/v1/audience-syncs/{config_id}/draft` | destructive | `integrations:delete` | Discard Draft Sync Config |
41
+ | [`disconnectSugarcrm`](#op-disconnectsugarcrm) | `DELETE /api/v1/integrations/sugarcrm` | destructive | `integrations:delete` | Disconnect Sugarcrm |
42
+ | [`discoverCrmFields`](#op-discovercrmfields) | `GET /api/v1/integrations/crm/fields` | read | `integrations:read` | Discover Crm Fields |
43
+ | [`findCrmUserByEmail`](#op-findcrmuserbyemail) | `GET /api/v1/integrations/crm/users/by-email` | read | `integrations:read` | Find Crm User By Email |
44
+ | [`getAdAnalyticsSummary`](#op-getadanalyticssummary) | `GET /api/v1/audience-syncs/analytics/summary` | read | `integrations:read` | Get Ad Analytics Summary |
45
+ | [`getAdDailyTrend`](#op-getaddailytrend) | `GET /api/v1/audience-syncs/analytics/daily-trend` | read | `integrations:read` | Get Ad Daily Trend |
46
+ | [`getCrmCompany`](#op-getcrmcompany) | `GET /api/v1/integrations/crm/connections/{connection_id}/companies/{company_id}` | read | `integrations:read` | Get Crm Company |
47
+ | [`getCrmConnection`](#op-getcrmconnection) | `GET /api/v1/integrations/crm/connections/{connection_id}` | read | `integrations:read` | Get Crm Connection |
48
+ | [`getCrmConnectionMetadata`](#op-getcrmconnectionmetadata) | `GET /api/v1/integrations/crm/connections/{connection_id}/metadata` | read | `integrations:read` | Get Crm Connection Metadata |
49
+ | [`getCrmConnectionStatus`](#op-getcrmconnectionstatus) | `GET /api/v1/integrations/crm/connections/{connection_id}/status` | read | `integrations:read` | Get Crm Connection Status |
50
+ | [`getCrmContact`](#op-getcrmcontact) | `GET /api/v1/integrations/crm/connections/{connection_id}/contacts/{contact_id}` | read | `integrations:read` | Get Crm Contact |
51
+ | [`getCrmDeal`](#op-getcrmdeal) | `GET /api/v1/integrations/crm/connections/{connection_id}/deals/{deal_id}` | read | `integrations:read` | Get Crm Deal |
52
+ | [`getCrmLead`](#op-getcrmlead) | `GET /api/v1/integrations/crm/connections/{connection_id}/leads/{lead_id}` | read | `integrations:read` | Get Crm Lead |
53
+ | [`getGoogleConversionTracking`](#op-getgoogleconversiontracking) | `GET /api/v1/audience-syncs/google/conversion-tracking` | read | `integrations:read` | Get Google Conversion Tracking |
54
+ | [`getLastCompletedMigration`](#op-getlastcompletedmigration) | `GET /api/v1/integrations/connections/{connection_id}/last-migration` | read | `integrations:read` | Get Last Completed Migration |
55
+ | [`getMigrationStatus`](#op-getmigrationstatus) | `GET /api/v1/integrations/migrations/{migration_id}` | read | `integrations:read` | Get Migration Status |
56
+ | [`getOrCreateCrmAudience`](#op-getorcreatecrmaudience) | `POST /api/v1/integrations/crm-sync/audiences` | external | `integrations:run` | Get Or Create Crm Audience |
57
+ | [`getOrCreateCrmList`](#op-getorcreatecrmlist) | `POST /api/v1/integrations/crm/lists` | external | `integrations:run` | Get Or Create Crm List |
58
+ | [`getSyncConfigAnalytics`](#op-getsyncconfiganalytics) | `GET /api/v1/audience-syncs/{config_id}/analytics` | read | `integrations:read` | Get Sync Config Analytics |
59
+ | [`getSyncJob`](#op-getsyncjob) | `GET /api/v1/integrations/crm-sync/jobs/{job_id}` | read | `integrations:read` | Get Sync Job |
60
+ | [`getSyncSegmentStatus`](#op-getsyncsegmentstatus) | `GET /api/v1/audience-syncs/{config_id}/segment-status` | read | `integrations:read` | Get Sync Segment Status |
61
+ | [`getVideoAsset`](#op-getvideoasset) | `GET /api/v1/audience-syncs/google/video-assets/{asset_id}` | read | `integrations:read` | Get Video Asset |
62
+ | [`listAdAccountHealth`](#op-listadaccounthealth) | `GET /api/v1/audience-syncs/account-health` | read | `integrations:read` | List Ad Account Health |
63
+ | [`listAdAccounts`](#op-listadaccounts) | `GET /api/v1/audience-syncs/accounts` | read | `integrations:read` | List Ad Accounts |
64
+ | [`listAdPlatforms`](#op-listadplatforms) | `GET /api/v1/audience-syncs/platforms` | read | `integrations:read` | List Ad Platforms |
65
+ | [`listCompanyActivitiesByGraph8Id`](#op-listcompanyactivitiesbygraph8id) | `GET /api/v1/integrations/crm/company-activities` | read | `integrations:read` | List Company Activities By Graph8 Id |
66
+ | [`listConnections`](#op-listconnections) | `GET /api/v1/integrations/connections` | read | `integrations:read` | List Connections |
67
+ | [`listContactActivitiesByGraph8Id`](#op-listcontactactivitiesbygraph8id) | `GET /api/v1/integrations/crm/contact-activities` | read | `integrations:read` | List Contact Activities By Graph8 Id |
68
+ | [`listCrmActivities`](#op-listcrmactivities) | `GET /api/v1/integrations/crm/activities` | read | `integrations:read` | List Crm Activities |
69
+ | [`listCrmCompanies`](#op-listcrmcompanies) | `GET /api/v1/integrations/crm/connections/{connection_id}/companies` | read | `integrations:read` | List Crm Companies |
70
+ | [`listCrmContactActivities`](#op-listcrmcontactactivities) | `GET /api/v1/integrations/crm/connections/{connection_id}/contacts/{contact_id}/activities` | read | `integrations:read` | List Crm Contact Activities |
71
+ | [`listCrmContacts`](#op-listcrmcontacts) | `GET /api/v1/integrations/crm/connections/{connection_id}/contacts` | read | `integrations:read` | List Crm Contacts |
72
+ | [`listCrmDeals`](#op-listcrmdeals) | `GET /api/v1/integrations/crm/connections/{connection_id}/deals` | read | `integrations:read` | List Crm Deals |
73
+ | [`listCrmLeads`](#op-listcrmleads) | `GET /api/v1/integrations/crm/connections/{connection_id}/leads` | read | `integrations:read` | List Crm Leads |
74
+ | [`listCrmLists`](#op-listcrmlists) | `GET /api/v1/integrations/crm/lists` | read | `integrations:read` | List Crm Lists |
75
+ | [`listCrmMeetings`](#op-listcrmmeetings) | `GET /api/v1/integrations/crm/meetings` | read | `integrations:read` | List Crm Meetings |
76
+ | [`listCrmUsers`](#op-listcrmusers) | `GET /api/v1/integrations/crm/users` | read | `integrations:read` | List Crm Users |
77
+ | [`listLeadStatuses`](#op-listleadstatuses) | `GET /api/v1/integrations/crm-sync/leads/statuses` | read | `integrations:read` | List Lead Statuses |
78
+ | [`listMappableGraph8Fields`](#op-listmappablegraph8fields) | `GET /api/v1/integrations/crm/fields/mappable` | read | `integrations:read` | List Mappable Graph8 Fields |
79
+ | [`listVideoAssets`](#op-listvideoassets) | `GET /api/v1/audience-syncs/google/video-assets` | read | `integrations:read` | List Video Assets |
80
+ | [`lookupCrmContactsByEmail`](#op-lookupcrmcontactsbyemail) | `POST /api/v1/integrations/crm/connections/{connection_id}/batch/contacts/lookup-by-email` | read | `integrations:read` | Lookup Crm Contacts By Email |
81
+ | [`modifyCrmListMemberships`](#op-modifycrmlistmemberships) | `POST /api/v1/integrations/crm/lists/memberships` | external | `integrations:run` | Modify Crm List Memberships |
82
+ | [`previewLeadPush`](#op-previewleadpush) | `GET /api/v1/integrations/crm-sync/leads/push-preview` | read | `integrations:read` | Preview Lead Push |
83
+ | [`pullAllContacts`](#op-pullallcontacts) | `POST /api/v1/integrations/crm-sync/contacts/pull` | external | `integrations:run` | Pull All Contacts |
84
+ | [`pullAllDeals`](#op-pullalldeals) | `POST /api/v1/integrations/crm-sync/deals/pull` | external | `integrations:run` | Pull All Deals |
85
+ | [`pullAllLeads`](#op-pullallleads) | `POST /api/v1/integrations/crm-sync/leads/pull` | external | `integrations:run` | Pull All Leads |
86
+ | [`pullCrmList`](#op-pullcrmlist) | `POST /api/v1/integrations/crm-sync/pull` | external | `integrations:run` | Pull Crm List |
87
+ | [`pushAllContacts`](#op-pushallcontacts) | `POST /api/v1/integrations/crm-sync/contacts/push` | external | `integrations:run` | Push All Contacts |
88
+ | [`pushAllDeals`](#op-pushalldeals) | `POST /api/v1/integrations/crm-sync/deals/push` | external | `integrations:run` | Push All Deals |
89
+ | [`pushAllLeads`](#op-pushallleads) | `POST /api/v1/integrations/crm-sync/leads/push` | external | `integrations:run` | Push All Leads |
90
+ | [`pushAudience`](#op-pushaudience) | `POST /api/v1/integrations/crm-sync/push` | external | `integrations:run` | Push Audience |
91
+ | [`reconnectSugarcrm`](#op-reconnectsugarcrm) | `POST /api/v1/integrations/sugarcrm/reconnect` | external | `integrations:run` | Reconnect Sugarcrm |
92
+ | [`registerUploadedVideoAsset`](#op-registeruploadedvideoasset) | `POST /api/v1/audience-syncs/google/video-assets/uploads` | external | `integrations:run` | Register Uploaded Video Asset |
93
+ | [`registerVideoAssetFromLibrary`](#op-registervideoassetfromlibrary) | `POST /api/v1/audience-syncs/google/video-assets/library` | external | `integrations:run` | Register Video Asset From Library |
94
+ | [`registerVideoAssetFromLink`](#op-registervideoassetfromlink) | `POST /api/v1/audience-syncs/google/video-assets/links` | external | `integrations:run` | Register Video Asset From Link |
95
+ | [`saveConnection`](#op-saveconnection) | `POST /api/v1/integrations/connections` | external | `integrations:run` | Save Connection |
96
+ | [`setPullSyncEnabled`](#op-setpullsyncenabled) | `PUT /api/v1/integrations/crm-sync/pull-enabled` | external | `integrations:run` | Set Pull Sync Enabled |
97
+ | [`setPushSyncEnabled`](#op-setpushsyncenabled) | `PUT /api/v1/integrations/crm-sync/push-enabled` | external | `integrations:run` | Set Push Sync Enabled |
98
+ | [`startDeltaSync`](#op-startdeltasync) | `POST /api/v1/integrations/migrations/delta-sync` | external | `integrations:run` | Start Delta Sync |
99
+ | [`startLeadPreview`](#op-startleadpreview) | `POST /api/v1/integrations/crm-sync/leads/previews` | external | `integrations:run` | Start Lead Preview |
100
+ | [`startMigrationDiscovery`](#op-startmigrationdiscovery) | `POST /api/v1/integrations/migrations/discovery` | external | `integrations:run` | Start Migration Discovery |
101
+ | [`updateCrmCompany`](#op-updatecrmcompany) | `PUT /api/v1/integrations/crm/connections/{connection_id}/companies/{company_id}` | external | `integrations:run` | Update Crm Company |
102
+ | [`updateCrmContact`](#op-updatecrmcontact) | `PUT /api/v1/integrations/crm/connections/{connection_id}/contacts/{contact_id}` | external | `integrations:run` | Update Crm Contact |
103
+ | [`updateCrmDeal`](#op-updatecrmdeal) | `PUT /api/v1/integrations/crm/connections/{connection_id}/deals/{deal_id}` | external | `integrations:run` | Update Crm Deal |
104
+ | [`updateCrmLead`](#op-updatecrmlead) | `PUT /api/v1/integrations/crm/connections/{connection_id}/leads/{lead_id}` | external | `integrations:run` | Update Crm Lead |
105
+ | [`updateCrmMeeting`](#op-updatecrmmeeting) | `PATCH /api/v1/integrations/crm/meetings/{event_id}` | external | `integrations:run` | Update Crm Meeting |
106
+ | [`uploadGoogleConversions`](#op-uploadgoogleconversions) | `POST /api/v1/audience-syncs/google/conversions` | external | `integrations:run` | Upload Google Conversions |
107
+ | [`validateSugarcrm`](#op-validatesugarcrm) | `POST /api/v1/integrations/sugarcrm/validate` | read | `integrations:read` | Validate Sugarcrm |
108
+
109
+ ---
110
+
111
+ <a id="op-batchcreatecrmcontacts"></a>
112
+
113
+ ### `g8.api.integrations.batchCreateCrmContacts(input)`
114
+
115
+ **Batch Create Crm Contacts**
116
+
117
+ - HTTP: `POST /api/v1/integrations/crm/connections/{connection_id}/batch/contacts`
118
+ - operationId: `batch_create_crm_contacts_integrations_crm_connections__connection_id__batch_contacts_post` (also callable as `g8.api.call("batch_create_crm_contacts_integrations_crm_connections__connection_id__batch_contacts_post", input)`)
119
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
120
+ - API-key scope: `integrations:run`
121
+
122
+ Create many contacts in one provider round trip.
123
+
124
+ PARTIAL SUCCESS IS POSSIBLE. The response carries per-record outcomes;
125
+ a 201 does not mean every record landed. Read them before retrying, or a
126
+ retry duplicates the ones that succeeded.
127
+
128
+ **Input**
129
+
130
+ | Field | Type | Required | Description |
131
+ |---|---|---|---|
132
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
133
+ | `body` | `BatchContactsRequest` | yes | Request body; fields below. |
134
+
135
+ Body fields (`BatchContactsRequest`):
136
+
137
+ | Field | Type | Required | Description |
138
+ |---|---|---|---|
139
+ | `body.contacts` | `Array<BatchContactRequest>` | yes | min items 1 |
140
+
141
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
142
+
143
+ Other envelope fields: `pagination` (PaginationMeta).
144
+
145
+ **Example**
146
+
147
+ ```ts
148
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
149
+ const result = await g8.api.integrations.batchCreateCrmContacts({
150
+ path: { connection_id: "id" },
151
+ body: { contacts: [{ email: "jane@acme.com" }] },
152
+ });
153
+ ```
154
+
155
+ ---
156
+
157
+ <a id="op-batchupdatecrmcontacts"></a>
158
+
159
+ ### `g8.api.integrations.batchUpdateCrmContacts(input)`
160
+
161
+ **Batch Update Crm Contacts**
162
+
163
+ - HTTP: `PUT /api/v1/integrations/crm/connections/{connection_id}/batch/contacts`
164
+ - operationId: `batch_update_crm_contacts_integrations_crm_connections__connection_id__batch_contacts_put` (also callable as `g8.api.call("batch_update_crm_contacts_integrations_crm_connections__connection_id__batch_contacts_put", input)`)
165
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
166
+ - API-key scope: `integrations:run`
167
+
168
+ Update many contacts in one provider round trip.
169
+
170
+ Each entry needs `crm_id` - on this path it identifies the record to
171
+ update, and an entry without one cannot be matched. Partial success is
172
+ possible here too.
173
+
174
+ **Input**
175
+
176
+ | Field | Type | Required | Description |
177
+ |---|---|---|---|
178
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
179
+ | `body` | `BatchContactsRequest` | yes | Request body; fields below. |
180
+
181
+ Body fields (`BatchContactsRequest`):
182
+
183
+ | Field | Type | Required | Description |
184
+ |---|---|---|---|
185
+ | `body.contacts` | `Array<BatchContactRequest>` | yes | min items 1 |
186
+
187
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
188
+
189
+ Other envelope fields: `pagination` (PaginationMeta).
190
+
191
+ **Example**
192
+
193
+ ```ts
194
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
195
+ const result = await g8.api.integrations.batchUpdateCrmContacts({
196
+ path: { connection_id: "id" },
197
+ body: { contacts: [{ email: "jane@acme.com" }] },
198
+ });
199
+ ```
200
+
201
+ ---
202
+
203
+ <a id="op-cancelmigration"></a>
204
+
205
+ ### `g8.api.integrations.cancelMigration(input)`
206
+
207
+ **Cancel Migration**
208
+
209
+ - HTTP: `POST /api/v1/integrations/migrations/{migration_id}/cancel`
210
+ - operationId: `cancel_migration_integrations_migrations__migration_id__cancel_post` (also callable as `g8.api.call("cancel_migration_integrations_migrations__migration_id__cancel_post", input)`)
211
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
212
+ - API-key scope: `integrations:delete`
213
+
214
+ Stop a running migration.
215
+
216
+ Records already imported STAY - this stops the import, it does not undo
217
+ it. The status goes to `cancelling` rather than `cancelled`, because work
218
+ already in flight has to finish first.
219
+
220
+ **Input**
221
+
222
+ | Field | Type | Required | Description |
223
+ |---|---|---|---|
224
+ | `path.migration_id` | `string` | yes | Migration id. |
225
+
226
+ **Returns** `ApiResponse_ConnectionPayload_`: the envelope `{ data: ConnectionPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
227
+
228
+ Other envelope fields: `pagination` (PaginationMeta).
229
+
230
+ **Example**
231
+
232
+ ```ts
233
+ // destructive: deletes or archives data; confirm with a human before calling.
234
+ const result = await g8.api.integrations.cancelMigration({ path: { migration_id: "id" } });
235
+ ```
236
+
237
+ ---
238
+
239
+ <a id="op-confirmmigration"></a>
240
+
241
+ ### `g8.api.integrations.confirmMigration(input)`
242
+
243
+ **Confirm Migration**
244
+
245
+ - HTTP: `POST /api/v1/integrations/migrations/{migration_id}/confirm`
246
+ - operationId: `confirm_migration_integrations_migrations__migration_id__confirm_post` (also callable as `g8.api.call("confirm_migration_integrations_migrations__migration_id__confirm_post", input)`)
247
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
248
+ - API-key scope: `integrations:run`
249
+
250
+ Accept the discovery and START IMPORTING. Records begin landing.
251
+
252
+ A migration cannot be un-run - only cancelled part-way, leaving whatever
253
+ already arrived. Read the status first: its `warnings` are the things
254
+ discovery could not resolve on its own.
255
+
256
+ An empty body accepts the discovery as proposed, which is the point of
257
+ previewing it. Org admin, matching the app.
258
+
259
+ **Input**
260
+
261
+ | Field | Type | Required | Description |
262
+ |---|---|---|---|
263
+ | `path.migration_id` | `string` | yes | Migration id from discovery. |
264
+ | `body` | `ConfirmMigrationRequest` | no | Request body; fields below. |
265
+
266
+ Body fields (`ConfirmMigrationRequest`):
267
+
268
+ | Field | Type | Required | Description |
269
+ |---|---|---|---|
270
+ | `body.field_mappings_override` | `Record<string, Array<Record<string, unknown>>> \| null` | no | Per entity type, the mappings to use instead of the discovered ones. Omit to accept what discovery proposed. |
271
+ | `body.selected_list_ids` | `Array<string> \| null` | no | Import only these CRM lists. Omit to take every discovered list. |
272
+
273
+ **Returns** `ApiResponse_ConnectionPayload_`: the envelope `{ data: ConnectionPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
274
+
275
+ Other envelope fields: `pagination` (PaginationMeta).
276
+
277
+ **Example**
278
+
279
+ ```ts
280
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
281
+ const result = await g8.api.integrations.confirmMigration({ path: { migration_id: "id" } });
282
+ ```
283
+
284
+ ---
285
+
286
+ <a id="op-connectsugarcrm"></a>
287
+
288
+ ### `g8.api.integrations.connectSugarcrm(input)`
289
+
290
+ **Connect Sugarcrm**
291
+
292
+ - HTTP: `POST /api/v1/integrations/sugarcrm/connect`
293
+ - operationId: `connect_sugarcrm_integrations_sugarcrm_connect_post` (also callable as `g8.api.call("connect_sugarcrm_integrations_sugarcrm_connect_post", input)`)
294
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
295
+ - API-key scope: `integrations:run`
296
+
297
+ Connect SugarCRM. REACHES YOUR SUGARCRM to authenticate first.
298
+
299
+ 409 when a SugarCRM connection already exists - rotate its credentials
300
+ with `/sugarcrm/reconnect` instead. 400 for an instance URL that does not
301
+ resolve to a public host, 401 when SugarCRM rejects the credentials.
302
+
303
+ **Input**
304
+
305
+ | Field | Type | Required | Description |
306
+ |---|---|---|---|
307
+ | `body` | `SugarCrmConnectRequest` | yes | Request body; fields below. |
308
+
309
+ Body fields (`SugarCrmConnectRequest`):
310
+
311
+ | Field | Type | Required | Description |
312
+ |---|---|---|---|
313
+ | `body.instance_url` | `string` | yes | Your SugarCRM instance, e.g. https://acme.sugarondemand.com. |
314
+ | `body.password` | `string` | yes | |
315
+ | `body.username` | `string` | yes | |
316
+ | `body.client_id` | `string` | no | OAuth client id configured in SugarCRM. default `"sugar"` |
317
+ | `body.client_secret` | `string` | no | OAuth client secret, if your client id has one. default `""` |
318
+
319
+ **Returns** `ApiResponse_IntegrationOpPayload_`: the envelope `{ data: IntegrationOpPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
320
+
321
+ Other envelope fields: `pagination` (PaginationMeta).
322
+
323
+ **Example**
324
+
325
+ ```ts
326
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
327
+ const result = await g8.api.integrations.connectSugarcrm({
328
+ body: {
329
+ instance_url: "https://example.com",
330
+ password: "example",
331
+ username: "Example",
332
+ },
333
+ });
334
+ ```
335
+
336
+ ---
337
+
338
+ <a id="op-createconnectionsessiontoken"></a>
339
+
340
+ ### `g8.api.integrations.createConnectionSessionToken(input?)`
341
+
342
+ **Create Connection Session Token**
343
+
344
+ - HTTP: `POST /api/v1/integrations/connections/session-token`
345
+ - operationId: `create_connection_session_token_integrations_connections_session_token_post` (also callable as `g8.api.call("create_connection_session_token_integrations_connections_session_token_post", input)`)
346
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
347
+ - API-key scope: `integrations:run`
348
+
349
+ Mint a short-lived token for the hosted OAuth flow.
350
+
351
+ The token is what a browser hands to the connection provider to run the
352
+ consent screen; this call does not connect anything by itself. The result
353
+ of that flow comes back to `POST /integrations/connections`.
354
+
355
+ The body is optional - omit it to take the app's default provider.
356
+
357
+ **Input**
358
+
359
+ | Field | Type | Required | Description |
360
+ |---|---|---|---|
361
+ | `body` | `SessionTokenRequest \| null` | no | Request body; fields below. |
362
+
363
+ Body fields:
364
+
365
+ | Field | Type | Required | Description |
366
+ |---|---|---|---|
367
+ | `body.provider` | `string \| null` | no | Stable graph8 provider name. |
368
+ | `body.provider_config_key` | `string \| null` | no | Provider config key on the connection provider. |
369
+
370
+ **Returns** `ApiResponse_ConnectionPayload_`: the envelope `{ data: ConnectionPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
371
+
372
+ Other envelope fields: `pagination` (PaginationMeta).
373
+
374
+ **Example**
375
+
376
+ ```ts
377
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
378
+ const result = await g8.api.integrations.createConnectionSessionToken();
379
+ ```
380
+
381
+ ---
382
+
383
+ <a id="op-createcrmcompany"></a>
384
+
385
+ ### `g8.api.integrations.createCrmCompany(input)`
386
+
387
+ **Create Crm Company**
388
+
389
+ - HTTP: `POST /api/v1/integrations/crm/connections/{connection_id}/companies`
390
+ - operationId: `create_crm_company_integrations_crm_connections__connection_id__companies_post` (also callable as `g8.api.call("create_crm_company_integrations_crm_connections__connection_id__companies_post", input)`)
391
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
392
+ - API-key scope: `integrations:run`
393
+
394
+ Create a company IN THE CUSTOMER'S CRM.
395
+
396
+ **Input**
397
+
398
+ | Field | Type | Required | Description |
399
+ |---|---|---|---|
400
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
401
+ | `body` | `CrmCompanyCreateRequest` | yes | Request body; fields below. |
402
+
403
+ Body fields (`CrmCompanyCreateRequest`):
404
+
405
+ | Field | Type | Required | Description |
406
+ |---|---|---|---|
407
+ | `body.name` | `string` | yes | |
408
+ | `body.address` | `CrmAddress \| null` | no | |
409
+ | `body.annual_revenue` | `number \| null` | no | |
410
+ | `body.custom_fields` | `Array<CrmCustomField>` | no | |
411
+ | `body.domain` | `string \| null` | no | |
412
+ | `body.employee_count` | `integer \| null` | no | |
413
+ | `body.industry` | `string \| null` | no | |
414
+ | `body.phone` | `string \| null` | no | |
415
+ | `body.website` | `string \| null` | no | |
416
+
417
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
418
+
419
+ Other envelope fields: `pagination` (PaginationMeta).
420
+
421
+ **Example**
422
+
423
+ ```ts
424
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
425
+ const result = await g8.api.integrations.createCrmCompany({ path: { connection_id: "id" }, body: { name: "Example" } });
426
+ ```
427
+
428
+ ---
429
+
430
+ <a id="op-createcrmcontact"></a>
431
+
432
+ ### `g8.api.integrations.createCrmContact(input)`
433
+
434
+ **Create Crm Contact**
435
+
436
+ - HTTP: `POST /api/v1/integrations/crm/connections/{connection_id}/contacts`
437
+ - operationId: `create_crm_contact_integrations_crm_connections__connection_id__contacts_post` (also callable as `g8.api.call("create_crm_contact_integrations_crm_connections__connection_id__contacts_post", input)`)
438
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
439
+ - API-key scope: `integrations:run`
440
+
441
+ Create a contact IN THE CUSTOMER'S CRM. This writes to their system.
442
+
443
+ **Input**
444
+
445
+ | Field | Type | Required | Description |
446
+ |---|---|---|---|
447
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
448
+ | `body` | `CrmContactCreateRequest` | yes | Request body; fields below. |
449
+
450
+ Body fields (`CrmContactCreateRequest`):
451
+
452
+ | Field | Type | Required | Description |
453
+ |---|---|---|---|
454
+ | `body.address` | `CrmAddress \| null` | no | |
455
+ | `body.company_id` | `string \| null` | no | The CRM's company id, not graph8's. |
456
+ | `body.company_name` | `string \| null` | no | |
457
+ | `body.custom_fields` | `Array<CrmCustomField>` | no | |
458
+ | `body.emails` | `Array<CrmEmail>` | no | |
459
+ | `body.first_name` | `string \| null` | no | |
460
+ | `body.last_name` | `string \| null` | no | |
461
+ | `body.name` | `string \| null` | no | |
462
+ | `body.phones` | `Array<CrmPhone>` | no | |
463
+ | `body.source` | `string \| null` | no | |
464
+ | `body.tags` | `Array<string>` | no | |
465
+ | `body.title` | `string \| null` | no | |
466
+ | `body.user_id` | `string \| null` | no | CRM owner. See `GET /integrations/crm/users`. |
467
+
468
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
469
+
470
+ Other envelope fields: `pagination` (PaginationMeta).
471
+
472
+ **Example**
473
+
474
+ ```ts
475
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
476
+ const result = await g8.api.integrations.createCrmContact({ path: { connection_id: "id" }, body: {} });
477
+ ```
478
+
479
+ ---
480
+
481
+ <a id="op-createcrmdeal"></a>
482
+
483
+ ### `g8.api.integrations.createCrmDeal(input)`
484
+
485
+ **Create Crm Deal**
486
+
487
+ - HTTP: `POST /api/v1/integrations/crm/connections/{connection_id}/deals`
488
+ - operationId: `create_crm_deal_integrations_crm_connections__connection_id__deals_post` (also callable as `g8.api.call("create_crm_deal_integrations_crm_connections__connection_id__deals_post", input)`)
489
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
490
+ - API-key scope: `integrations:run`
491
+
492
+ Create a deal IN THE CUSTOMER'S CRM.
493
+
494
+ **Input**
495
+
496
+ | Field | Type | Required | Description |
497
+ |---|---|---|---|
498
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
499
+ | `body` | `CrmDealCreateRequest` | yes | Request body; fields below. |
500
+
501
+ Body fields (`CrmDealCreateRequest`):
502
+
503
+ | Field | Type | Required | Description |
504
+ |---|---|---|---|
505
+ | `body.name` | `string` | yes | |
506
+ | `body.amount` | `number \| null` | no | |
507
+ | `body.close_date` | `string \| null` | no | ISO 8601 date. |
508
+ | `body.company_id` | `string \| null` | no | |
509
+ | `body.contact_id` | `string \| null` | no | |
510
+ | `body.custom_fields` | `Array<CrmCustomField>` | no | |
511
+ | `body.description` | `string \| null` | no | |
512
+ | `body.probability` | `number \| null` | no | |
513
+ | `body.stage` | `string \| null` | no | Provider's pipeline stage. Omit to take the provider's default stage. |
514
+ | `body.type` | `string \| null` | no | |
515
+ | `body.user_id` | `string \| null` | no | |
516
+
517
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
518
+
519
+ Other envelope fields: `pagination` (PaginationMeta).
520
+
521
+ **Example**
522
+
523
+ ```ts
524
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
525
+ const result = await g8.api.integrations.createCrmDeal({ path: { connection_id: "id" }, body: { name: "Example" } });
526
+ ```
527
+
528
+ ---
529
+
530
+ <a id="op-createcrmlead"></a>
531
+
532
+ ### `g8.api.integrations.createCrmLead(input)`
533
+
534
+ **Create Crm Lead**
535
+
536
+ - HTTP: `POST /api/v1/integrations/crm/connections/{connection_id}/leads`
537
+ - operationId: `create_crm_lead_integrations_crm_connections__connection_id__leads_post` (also callable as `g8.api.call("create_crm_lead_integrations_crm_connections__connection_id__leads_post", input)`)
538
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
539
+ - API-key scope: `integrations:run`
540
+
541
+ Create a Lead IN THE CUSTOMER'S SALESFORCE.
542
+
543
+ `last_name` and `company` are required by Salesforce itself. `status` is an
544
+ OPEN picklist - read the valid values from
545
+ `GET /integrations/crm-sync/leads/statuses` first, because an invented one
546
+ is stored rather than refused.
547
+
548
+ **Input**
549
+
550
+ | Field | Type | Required | Description |
551
+ |---|---|---|---|
552
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
553
+ | `body` | `LeadCreateRequest` | yes | Request body; fields below. |
554
+
555
+ Body fields (`LeadCreateRequest`):
556
+
557
+ | Field | Type | Required | Description |
558
+ |---|---|---|---|
559
+ | `body.company` | `string` | yes | |
560
+ | `body.last_name` | `string` | yes | |
561
+ | `body.address` | `CrmAddress \| null` | no | |
562
+ | `body.annual_revenue` | `number \| null` | no | |
563
+ | `body.custom_fields` | `Array<CrmCustomField>` | no | |
564
+ | `body.email` | `string \| null` | no | |
565
+ | `body.employee_count` | `integer \| null` | no | |
566
+ | `body.first_name` | `string \| null` | no | |
567
+ | `body.industry` | `string \| null` | no | |
568
+ | `body.lead_source` | `string \| null` | no | |
569
+ | `body.phone` | `string \| null` | no | |
570
+ | `body.status` | `string \| null` | no | Salesforce `Lead.Status` API name. Read the valid values from `GET /integrations/crm-sync/leads/statuses` - it is an OPEN picklist, so an invented value silently becomes a real status. |
571
+ | `body.title` | `string \| null` | no | |
572
+ | `body.user_id` | `string \| null` | no | |
573
+ | `body.website` | `string \| null` | no | |
574
+
575
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
576
+
577
+ Other envelope fields: `pagination` (PaginationMeta).
578
+
579
+ **Example**
580
+
581
+ ```ts
582
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
583
+ const result = await g8.api.integrations.createCrmLead({
584
+ path: { connection_id: "id" },
585
+ body: { company: "example", last_name: "Example" },
586
+ });
587
+ ```
588
+
589
+ ---
590
+
591
+ <a id="op-createcrmmeeting"></a>
592
+
593
+ ### `g8.api.integrations.createCrmMeeting(input)`
594
+
595
+ **Create Crm Meeting**
596
+
597
+ - HTTP: `POST /api/v1/integrations/crm/meetings`
598
+ - operationId: `create_crm_meeting_integrations_crm_meetings_post` (also callable as `g8.api.call("create_crm_meeting_integrations_crm_meetings_post", input)`)
599
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
600
+ - API-key scope: `integrations:run`
601
+
602
+ Create a meeting on the CRM's calendar and associate it with records.
603
+
604
+ This does not send an invitation - it records the meeting on the CRM
605
+ object. `/appointments/*` is the surface that books with a person.
606
+
607
+ **Input**
608
+
609
+ | Field | Type | Required | Description |
610
+ |---|---|---|---|
611
+ | `query.connection_id` | `string` | yes | |
612
+ | `body` | `CreateMeetingRequest` | yes | Request body; fields below. |
613
+
614
+ Body fields (`CreateMeetingRequest`):
615
+
616
+ | Field | Type | Required | Description |
617
+ |---|---|---|---|
618
+ | `body.company_ids` | `Array<string> \| null` | no | |
619
+ | `body.contact_ids` | `Array<string> \| null` | no | CRM contact ids to associate. |
620
+ | `body.deal_ids` | `Array<string> \| null` | no | |
621
+ | `body.description` | `string \| null` | no | |
622
+ | `body.end_at` | `string \| null` | no | ISO 8601. |
623
+ | `body.location` | `string \| null` | no | |
624
+ | `body.start_at` | `string \| null` | no | ISO 8601. |
625
+ | `body.title` | `string \| null` | no | |
626
+ | `body.user_id` | `string \| null` | no | |
627
+
628
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
629
+
630
+ Other envelope fields: `pagination` (PaginationMeta).
631
+
632
+ **Example**
633
+
634
+ ```ts
635
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
636
+ const result = await g8.api.integrations.createCrmMeeting({ query: { connection_id: "id" }, body: {} });
637
+ ```
638
+
639
+ ---
640
+
641
+ <a id="op-creategoogleconversionaction"></a>
642
+
643
+ ### `g8.api.integrations.createGoogleConversionAction(input?)`
644
+
645
+ **Create Google Conversion Action**
646
+
647
+ - HTTP: `POST /api/v1/audience-syncs/google/conversion-actions`
648
+ - operationId: `create_google_conversion_action_audience_syncs_google_conversion_actions_post` (also callable as `g8.api.call("create_google_conversion_action_audience_syncs_google_conversion_actions_post", input)`)
649
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
650
+ - API-key scope: `integrations:run`
651
+
652
+ Create a conversion action ON THE CUSTOMER'S GOOGLE ADS ACCOUNT.
653
+
654
+ IDEMPOTENT: an action with the same name is reused rather than duplicated,
655
+ so this is safe to call before every launch. An empty body provisions the
656
+ default primary landing-page action - the same one a Demand Gen or
657
+ Performance Max launch provisions for itself.
658
+
659
+ **Input**
660
+
661
+ | Field | Type | Required | Description |
662
+ |---|---|---|---|
663
+ | `query.ad_account_id` | `string \| null` | no | |
664
+ | `body` | `CreateConversionActionRequest \| null` | no | Request body; fields below. |
665
+
666
+ Body fields:
667
+
668
+ | Field | Type | Required | Description |
669
+ |---|---|---|---|
670
+ | `body.category` | `string` | no | default `"DEFAULT"` |
671
+ | `body.name` | `string` | no | default `"graph8 Landing Page Conversions"`, max length 200 |
672
+ | `body.primary_for_goal` | `boolean` | no | default `true` |
673
+
674
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
675
+
676
+ Other envelope fields: `pagination` (PaginationMeta).
677
+
678
+ **Example**
679
+
680
+ ```ts
681
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
682
+ const result = await g8.api.integrations.createGoogleConversionAction();
683
+ ```
684
+
685
+ ---
686
+
687
+ <a id="op-createvideouploadurl"></a>
688
+
689
+ ### `g8.api.integrations.createVideoUploadUrl(input)`
690
+
691
+ **Create Video Upload Url**
692
+
693
+ - HTTP: `POST /api/v1/audience-syncs/google/video-assets/upload-urls`
694
+ - operationId: `create_video_upload_url_audience_syncs_google_video_assets_upload_urls_post` (also callable as `g8.api.call("create_video_upload_url_audience_syncs_google_video_assets_upload_urls_post", input)`)
695
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
696
+ - API-key scope: `integrations:run`
697
+
698
+ Step 1 of 2 of a video upload: a presigned PUT for the file itself.
699
+
700
+ PUT the bytes to the returned URL - straight to storage, not through graph8
701
+ - with exactly `size_bytes` of body and the `content_type` given here; both
702
+ are signed into the URL and a mismatch is refused. Then register the
703
+ returned `key` with `POST /audience-syncs/google/video-assets/uploads`.
704
+
705
+ 503 when upload storage is not configured. Rate limited to 20 per minute
706
+ per org.
707
+
708
+ **Input**
709
+
710
+ | Field | Type | Required | Description |
711
+ |---|---|---|---|
712
+ | `body` | `CreateVideoUploadUrlRequest` | yes | Request body; fields below. |
713
+
714
+ Body fields (`CreateVideoUploadUrlRequest`):
715
+
716
+ | Field | Type | Required | Description |
717
+ |---|---|---|---|
718
+ | `body.content_type` | `string` | yes | video/mp4 \| video/quicktime \| video/webm max length 100 |
719
+ | `body.size_bytes` | `integer` | yes | Exact file size — signed into the PUT; a different body length is refused > 0 |
720
+
721
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
722
+
723
+ Other envelope fields: `pagination` (PaginationMeta).
724
+
725
+ **Example**
726
+
727
+ ```ts
728
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
729
+ const result = await g8.api.integrations.createVideoUploadUrl({ body: { content_type: "example", size_bytes: 1 } });
730
+ ```
731
+
732
+ ---
733
+
734
+ <a id="op-deleteconnection"></a>
735
+
736
+ ### `g8.api.integrations.deleteConnection(input)`
737
+
738
+ **Delete Connection**
739
+
740
+ - HTTP: `DELETE /api/v1/integrations/connections/{connection_id}`
741
+ - operationId: `delete_connection_integrations_connections__connection_id__delete` (also callable as `g8.api.call("delete_connection_integrations_connections__connection_id__delete", input)`)
742
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
743
+ - API-key scope: `integrations:delete`
744
+
745
+ Disconnect a CRM.
746
+
747
+ Anything already synced STAYS - this removes the connection, not the
748
+ records that came through it. Any sync configured against this connection
749
+ stops working, so check `/integrations/crm-sync/push-enabled` first if a
750
+ continuous sync is running.
751
+
752
+ **Input**
753
+
754
+ | Field | Type | Required | Description |
755
+ |---|---|---|---|
756
+ | `path.connection_id` | `string` | yes | Connection id. |
757
+ | `query.provider_config_key` | `string` | yes | Provider config key, e.g. `hubspot` or `salesforce`. REQUIRED: the same connection id can exist under more than one provider config, so the key is what identifies which one to remove. |
758
+
759
+ **Returns** `ApiResponse_ConnectionPayload_`: the envelope `{ data: ConnectionPayload, ... }`. `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
+ // destructive: deletes or archives data; confirm with a human before calling.
767
+ const result = await g8.api.integrations.deleteConnection({
768
+ path: { connection_id: "id" },
769
+ query: { provider_config_key: "example" },
770
+ });
771
+ ```
772
+
773
+ ---
774
+
775
+ <a id="op-deletecrmcontact"></a>
776
+
777
+ ### `g8.api.integrations.deleteCrmContact(input)`
778
+
779
+ **Delete Crm Contact**
780
+
781
+ - HTTP: `DELETE /api/v1/integrations/crm/connections/{connection_id}/contacts/{contact_id}`
782
+ - operationId: `delete_crm_contact_integrations_crm_connections__connection_id__contacts__contact_id__delete` (also callable as `g8.api.call("delete_crm_contact_integrations_crm_connections__connection_id__contacts__contact_id__delete", input)`)
783
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
784
+ - API-key scope: `integrations:delete`
785
+
786
+ Delete a contact from the CUSTOMER'S CRM.
787
+
788
+ Whether this is reversible is the provider's decision, not graph8's -
789
+ HubSpot moves the record to its recycling bin, Salesforce to its recycle
790
+ bin, and both expire. Treat it as permanent.
791
+
792
+ **Input**
793
+
794
+ | Field | Type | Required | Description |
795
+ |---|---|---|---|
796
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
797
+ | `path.contact_id` | `string` | yes | |
798
+
799
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
800
+
801
+ Other envelope fields: `pagination` (PaginationMeta).
802
+
803
+ **Example**
804
+
805
+ ```ts
806
+ // destructive: deletes or archives data; confirm with a human before calling.
807
+ const result = await g8.api.integrations.deleteCrmContact({ path: { connection_id: "id", contact_id: "id" } });
808
+ ```
809
+
810
+ ---
811
+
812
+ <a id="op-discarddraftsyncconfig"></a>
813
+
814
+ ### `g8.api.integrations.discardDraftSyncConfig(input)`
815
+
816
+ **Discard Draft Sync Config**
817
+
818
+ - HTTP: `DELETE /api/v1/audience-syncs/{config_id}/draft`
819
+ - operationId: `discard_draft_sync_config_audience_syncs__config_id__draft_delete` (also callable as `g8.api.call("discard_draft_sync_config_audience_syncs__config_id__draft_delete", input)`)
820
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
821
+ - API-key scope: `integrations:delete`
822
+
823
+ Throw away a sync config that was never launched.
824
+
825
+ REFUSED with a 409 once any campaign on it has a platform id - at that
826
+ point there is live platform state that discarding would orphan. Use
827
+ `DELETE /audience-syncs/{config_id}` for a config that has launched.
828
+
829
+ **Input**
830
+
831
+ | Field | Type | Required | Description |
832
+ |---|---|---|---|
833
+ | `path.config_id` | `integer` | yes | The sync config's id. |
834
+
835
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
836
+
837
+ Other envelope fields: `pagination` (PaginationMeta).
838
+
839
+ **Example**
840
+
841
+ ```ts
842
+ // destructive: deletes or archives data; confirm with a human before calling.
843
+ const result = await g8.api.integrations.discardDraftSyncConfig({ path: { config_id: 123 } });
844
+ ```
845
+
846
+ ---
847
+
848
+ <a id="op-disconnectsugarcrm"></a>
849
+
850
+ ### `g8.api.integrations.disconnectSugarcrm(input?)`
851
+
852
+ **Disconnect Sugarcrm**
853
+
854
+ - HTTP: `DELETE /api/v1/integrations/sugarcrm`
855
+ - operationId: `disconnect_sugarcrm_integrations_sugarcrm_delete` (also callable as `g8.api.call("disconnect_sugarcrm_integrations_sugarcrm_delete", input)`)
856
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
857
+ - API-key scope: `integrations:delete`
858
+
859
+ Disconnect SugarCRM: drop its tokens and remove the connection.
860
+
861
+ Records already synced into graph8 stay. Sync to and from SugarCRM stops.
862
+
863
+ **Input**: none.
864
+
865
+ **Returns** `ApiResponse_IntegrationOpPayload_`: the envelope `{ data: IntegrationOpPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
866
+
867
+ Other envelope fields: `pagination` (PaginationMeta).
868
+
869
+ **Example**
870
+
871
+ ```ts
872
+ // destructive: deletes or archives data; confirm with a human before calling.
873
+ const result = await g8.api.integrations.disconnectSugarcrm();
874
+ ```
875
+
876
+ ---
877
+
878
+ <a id="op-discovercrmfields"></a>
879
+
880
+ ### `g8.api.integrations.discoverCrmFields(input)`
881
+
882
+ **Discover Crm Fields**
883
+
884
+ - HTTP: `GET /api/v1/integrations/crm/fields`
885
+ - operationId: `discover_crm_fields_integrations_crm_fields_get` (also callable as `g8.api.call("discover_crm_fields_integrations_crm_fields_get", input)`)
886
+ - Tier: `read`: reads data; safe to call and to retry
887
+ - API-key scope: `integrations:read`
888
+
889
+ The CRM's own fields for one object, including its custom ones.
890
+
891
+ This is where a valid `custom_fields[].field_name` comes from. The provider
892
+ rejects a name it does not have, so read this before writing one.
893
+
894
+ **Input**
895
+
896
+ | Field | Type | Required | Description |
897
+ |---|---|---|---|
898
+ | `query.connection_id` | `string` | yes | |
899
+ | `query.entity_type` | `"contacts" \| "companies" \| "deals" \| "leads" \| "meetings" \| "tasks" \| "activities"` | no | Which CRM object to describe. `meetings`/`tasks` are Salesforce's Event/Task and `activities` is Pipedrive's; other providers fall back to contacts for an object they do not model. default `"contacts"` |
900
+
901
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
902
+
903
+ Other envelope fields: `pagination` (PaginationMeta).
904
+
905
+ `CrmCollection` fields:
906
+
907
+ | Field | Type | Required | Description |
908
+ |---|---|---|---|
909
+ | `items` | `Array<unknown>` | no | |
910
+
911
+ **Example**
912
+
913
+ ```ts
914
+ const result = await g8.api.integrations.discoverCrmFields({ query: { connection_id: "id" } });
915
+ ```
916
+
917
+ ---
918
+
919
+ <a id="op-findcrmuserbyemail"></a>
920
+
921
+ ### `g8.api.integrations.findCrmUserByEmail(input)`
922
+
923
+ **Find Crm User By Email**
924
+
925
+ - HTTP: `GET /api/v1/integrations/crm/users/by-email`
926
+ - operationId: `find_crm_user_by_email_integrations_crm_users_by_email_get` (also callable as `g8.api.call("find_crm_user_by_email_integrations_crm_users_by_email_get", input)`)
927
+ - Tier: `read`: reads data; safe to call and to retry
928
+ - API-key scope: `integrations:read`
929
+
930
+ Resolve one CRM user by email, for setting record ownership.
931
+
932
+ Returns a LIST, not one user: a CRM can hold more than one user against an
933
+ address, and picking one here would hide that from the caller.
934
+
935
+ **Input**
936
+
937
+ | Field | Type | Required | Description |
938
+ |---|---|---|---|
939
+ | `query.connection_id` | `string` | yes | |
940
+ | `query.email` | `string` | yes | The user's address in the CRM. |
941
+
942
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
943
+
944
+ Other envelope fields: `pagination` (PaginationMeta).
945
+
946
+ `CrmCollection` fields:
947
+
948
+ | Field | Type | Required | Description |
949
+ |---|---|---|---|
950
+ | `items` | `Array<unknown>` | no | |
951
+
952
+ **Example**
953
+
954
+ ```ts
955
+ const result = await g8.api.integrations.findCrmUserByEmail({ query: { connection_id: "id", email: "jane@acme.com" } });
956
+ ```
957
+
958
+ ---
959
+
960
+ <a id="op-getadanalyticssummary"></a>
961
+
962
+ ### `g8.api.integrations.getAdAnalyticsSummary(input?)`
963
+
964
+ **Get Ad Analytics Summary**
965
+
966
+ - HTTP: `GET /api/v1/audience-syncs/analytics/summary`
967
+ - operationId: `get_ad_analytics_summary_audience_syncs_analytics_summary_get` (also callable as `g8.api.call("get_ad_analytics_summary_audience_syncs_analytics_summary_get", input)`)
968
+ - Tier: `read`: reads data; safe to call and to retry
969
+ - API-key scope: `integrations:read`
970
+
971
+ Spend, impressions, clicks and conversions across every ad account.
972
+
973
+ **Input**
974
+
975
+ | Field | Type | Required | Description |
976
+ |---|---|---|---|
977
+ | `query.days` | `integer` | no | Days to look back. default `30` |
978
+ | `query.platform` | `"meta" \| "linkedin" \| "google" \| "x" \| null` | no | One platform. Omit for all. |
979
+ | `query.ad_account_id` | `string \| null` | no | |
980
+
981
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
982
+
983
+ Other envelope fields: `pagination` (PaginationMeta).
984
+
985
+ **Example**
986
+
987
+ ```ts
988
+ const result = await g8.api.integrations.getAdAnalyticsSummary();
989
+ ```
990
+
991
+ ---
992
+
993
+ <a id="op-getaddailytrend"></a>
994
+
995
+ ### `g8.api.integrations.getAdDailyTrend(input?)`
996
+
997
+ **Get Ad Daily Trend**
998
+
999
+ - HTTP: `GET /api/v1/audience-syncs/analytics/daily-trend`
1000
+ - operationId: `get_ad_daily_trend_audience_syncs_analytics_daily_trend_get` (also callable as `g8.api.call("get_ad_daily_trend_audience_syncs_analytics_daily_trend_get", input)`)
1001
+ - Tier: `read`: reads data; safe to call and to retry
1002
+ - API-key scope: `integrations:read`
1003
+
1004
+ The same numbers, one row per day.
1005
+
1006
+ **Input**
1007
+
1008
+ | Field | Type | Required | Description |
1009
+ |---|---|---|---|
1010
+ | `query.days` | `integer` | no | Days to look back. default `30` |
1011
+ | `query.platform` | `"meta" \| "linkedin" \| "google" \| "x" \| null` | no | One platform. Omit for all. |
1012
+ | `query.sync_config_id` | `integer \| null` | no | Scope to one sync config. |
1013
+ | `query.ad_account_id` | `string \| null` | no | |
1014
+
1015
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1016
+
1017
+ Other envelope fields: `pagination` (PaginationMeta).
1018
+
1019
+ **Example**
1020
+
1021
+ ```ts
1022
+ const result = await g8.api.integrations.getAdDailyTrend();
1023
+ ```
1024
+
1025
+ ---
1026
+
1027
+ <a id="op-getcrmcompany"></a>
1028
+
1029
+ ### `g8.api.integrations.getCrmCompany(input)`
1030
+
1031
+ **Get Crm Company**
1032
+
1033
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/companies/{company_id}`
1034
+ - operationId: `get_crm_company_integrations_crm_connections__connection_id__companies__company_id__get` (also callable as `g8.api.call("get_crm_company_integrations_crm_connections__connection_id__companies__company_id__get", input)`)
1035
+ - Tier: `read`: reads data; safe to call and to retry
1036
+ - API-key scope: `integrations:read`
1037
+
1038
+ One company, as the CRM holds it.
1039
+
1040
+ **Input**
1041
+
1042
+ | Field | Type | Required | Description |
1043
+ |---|---|---|---|
1044
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1045
+ | `path.company_id` | `string` | yes | The CRM's company id, not graph8's. |
1046
+
1047
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1048
+
1049
+ Other envelope fields: `pagination` (PaginationMeta).
1050
+
1051
+ **Example**
1052
+
1053
+ ```ts
1054
+ const result = await g8.api.integrations.getCrmCompany({ path: { connection_id: "id", company_id: "id" } });
1055
+ ```
1056
+
1057
+ ---
1058
+
1059
+ <a id="op-getcrmconnection"></a>
1060
+
1061
+ ### `g8.api.integrations.getCrmConnection(input)`
1062
+
1063
+ **Get Crm Connection**
1064
+
1065
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}`
1066
+ - operationId: `get_crm_connection_integrations_crm_connections__connection_id__get` (also callable as `g8.api.call("get_crm_connection_integrations_crm_connections__connection_id__get", input)`)
1067
+ - Tier: `read`: reads data; safe to call and to retry
1068
+ - API-key scope: `integrations:read`
1069
+
1070
+ What this connection is: which provider, which account, what it can do.
1071
+
1072
+ Read this first - the provider decides which of the routes below exist.
1073
+ Leads are Salesforce-only; list membership differs per provider.
1074
+
1075
+ **Input**
1076
+
1077
+ | Field | Type | Required | Description |
1078
+ |---|---|---|---|
1079
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1080
+
1081
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1082
+
1083
+ Other envelope fields: `pagination` (PaginationMeta).
1084
+
1085
+ **Example**
1086
+
1087
+ ```ts
1088
+ const result = await g8.api.integrations.getCrmConnection({ path: { connection_id: "id" } });
1089
+ ```
1090
+
1091
+ ---
1092
+
1093
+ <a id="op-getcrmconnectionmetadata"></a>
1094
+
1095
+ ### `g8.api.integrations.getCrmConnectionMetadata(input)`
1096
+
1097
+ **Get Crm Connection Metadata**
1098
+
1099
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/metadata`
1100
+ - operationId: `get_crm_connection_metadata_integrations_crm_connections__connection_id__metadata_get` (also callable as `g8.api.call("get_crm_connection_metadata_integrations_crm_connections__connection_id__metadata_get", input)`)
1101
+ - Tier: `read`: reads data; safe to call and to retry
1102
+ - API-key scope: `integrations:read`
1103
+
1104
+ Who connected this integration, and when.
1105
+
1106
+ Carries no credential - the token itself is never returned by this or any
1107
+ other route on this surface.
1108
+
1109
+ **Input**
1110
+
1111
+ | Field | Type | Required | Description |
1112
+ |---|---|---|---|
1113
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1114
+ | `query.crm_type` | `"hubspot" \| "salesforce" \| "pipedrive" \| "sugarcrm" \| "stripe" \| "zoho-crm" \| "freshworks" \| "facebook-ads" \| …` | yes | The provider this connection belongs to. A mismatch is a 404. |
1115
+
1116
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1117
+
1118
+ Other envelope fields: `pagination` (PaginationMeta).
1119
+
1120
+ **Example**
1121
+
1122
+ ```ts
1123
+ const result = await g8.api.integrations.getCrmConnectionMetadata({ path: { connection_id: "id" }, query: { crm_type: "hubspot" } });
1124
+ ```
1125
+
1126
+ ---
1127
+
1128
+ <a id="op-getcrmconnectionstatus"></a>
1129
+
1130
+ ### `g8.api.integrations.getCrmConnectionStatus(input)`
1131
+
1132
+ **Get Crm Connection Status**
1133
+
1134
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/status`
1135
+ - operationId: `get_crm_connection_status_integrations_crm_connections__connection_id__status_get` (also callable as `g8.api.call("get_crm_connection_status_integrations_crm_connections__connection_id__status_get", input)`)
1136
+ - Tier: `read`: reads data; safe to call and to retry
1137
+ - API-key scope: `integrations:read`
1138
+
1139
+ Is this connection working right now.
1140
+
1141
+ Distinct from `GET /connections/{id}`: that describes the connection, this
1142
+ one actually reaches the provider and reports whether the credentials still
1143
+ answer.
1144
+
1145
+ **Input**
1146
+
1147
+ | Field | Type | Required | Description |
1148
+ |---|---|---|---|
1149
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1150
+
1151
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1152
+
1153
+ Other envelope fields: `pagination` (PaginationMeta).
1154
+
1155
+ **Example**
1156
+
1157
+ ```ts
1158
+ const result = await g8.api.integrations.getCrmConnectionStatus({ path: { connection_id: "id" } });
1159
+ ```
1160
+
1161
+ ---
1162
+
1163
+ <a id="op-getcrmcontact"></a>
1164
+
1165
+ ### `g8.api.integrations.getCrmContact(input)`
1166
+
1167
+ **Get Crm Contact**
1168
+
1169
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/contacts/{contact_id}`
1170
+ - operationId: `get_crm_contact_integrations_crm_connections__connection_id__contacts__contact_id__get` (also callable as `g8.api.call("get_crm_contact_integrations_crm_connections__connection_id__contacts__contact_id__get", input)`)
1171
+ - Tier: `read`: reads data; safe to call and to retry
1172
+ - API-key scope: `integrations:read`
1173
+
1174
+ One contact, as the CRM holds it.
1175
+
1176
+ **Input**
1177
+
1178
+ | Field | Type | Required | Description |
1179
+ |---|---|---|---|
1180
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1181
+ | `path.contact_id` | `string` | yes | The CRM's contact id, not graph8's. |
1182
+
1183
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1184
+
1185
+ Other envelope fields: `pagination` (PaginationMeta).
1186
+
1187
+ **Example**
1188
+
1189
+ ```ts
1190
+ const result = await g8.api.integrations.getCrmContact({ path: { connection_id: "id", contact_id: "id" } });
1191
+ ```
1192
+
1193
+ ---
1194
+
1195
+ <a id="op-getcrmdeal"></a>
1196
+
1197
+ ### `g8.api.integrations.getCrmDeal(input)`
1198
+
1199
+ **Get Crm Deal**
1200
+
1201
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/deals/{deal_id}`
1202
+ - operationId: `get_crm_deal_integrations_crm_connections__connection_id__deals__deal_id__get` (also callable as `g8.api.call("get_crm_deal_integrations_crm_connections__connection_id__deals__deal_id__get", input)`)
1203
+ - Tier: `read`: reads data; safe to call and to retry
1204
+ - API-key scope: `integrations:read`
1205
+
1206
+ One deal, as the CRM holds it.
1207
+
1208
+ **Input**
1209
+
1210
+ | Field | Type | Required | Description |
1211
+ |---|---|---|---|
1212
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1213
+ | `path.deal_id` | `string` | yes | The CRM's deal id, not graph8's. |
1214
+
1215
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1216
+
1217
+ Other envelope fields: `pagination` (PaginationMeta).
1218
+
1219
+ **Example**
1220
+
1221
+ ```ts
1222
+ const result = await g8.api.integrations.getCrmDeal({ path: { connection_id: "id", deal_id: "id" } });
1223
+ ```
1224
+
1225
+ ---
1226
+
1227
+ <a id="op-getcrmlead"></a>
1228
+
1229
+ ### `g8.api.integrations.getCrmLead(input)`
1230
+
1231
+ **Get Crm Lead**
1232
+
1233
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/leads/{lead_id}`
1234
+ - operationId: `get_crm_lead_integrations_crm_connections__connection_id__leads__lead_id__get` (also callable as `g8.api.call("get_crm_lead_integrations_crm_connections__connection_id__leads__lead_id__get", input)`)
1235
+ - Tier: `read`: reads data; safe to call and to retry
1236
+ - API-key scope: `integrations:read`
1237
+
1238
+ One lead, as the CRM holds it.
1239
+
1240
+ **Input**
1241
+
1242
+ | Field | Type | Required | Description |
1243
+ |---|---|---|---|
1244
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1245
+ | `path.lead_id` | `string` | yes | The CRM's lead id. |
1246
+
1247
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1248
+
1249
+ Other envelope fields: `pagination` (PaginationMeta).
1250
+
1251
+ **Example**
1252
+
1253
+ ```ts
1254
+ const result = await g8.api.integrations.getCrmLead({ path: { connection_id: "id", lead_id: "id" } });
1255
+ ```
1256
+
1257
+ ---
1258
+
1259
+ <a id="op-getgoogleconversiontracking"></a>
1260
+
1261
+ ### `g8.api.integrations.getGoogleConversionTracking(input?)`
1262
+
1263
+ **Get Google Conversion Tracking**
1264
+
1265
+ - HTTP: `GET /api/v1/audience-syncs/google/conversion-tracking`
1266
+ - operationId: `get_google_conversion_tracking_audience_syncs_google_conversion_tracking_get` (also callable as `g8.api.call("get_google_conversion_tracking_audience_syncs_google_conversion_tracking_get", input)`)
1267
+ - Tier: `read`: reads data; safe to call and to retry
1268
+ - API-key scope: `integrations:read`
1269
+
1270
+ Whether this Google Ads account has any active conversion action.
1271
+
1272
+ With none, Smart Bidding has nothing to optimise towards and a Demand Gen
1273
+ or Performance Max campaign spends without learning. A live Google read.
1274
+
1275
+ An `ad_account_id` the org does not own is a 403, not an empty result.
1276
+
1277
+ **Input**
1278
+
1279
+ | Field | Type | Required | Description |
1280
+ |---|---|---|---|
1281
+ | `query.ad_account_id` | `string \| null` | no | A Google Ads customer id. Omit to use the org's own. |
1282
+
1283
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1284
+
1285
+ Other envelope fields: `pagination` (PaginationMeta).
1286
+
1287
+ **Example**
1288
+
1289
+ ```ts
1290
+ const result = await g8.api.integrations.getGoogleConversionTracking();
1291
+ ```
1292
+
1293
+ ---
1294
+
1295
+ <a id="op-getlastcompletedmigration"></a>
1296
+
1297
+ ### `g8.api.integrations.getLastCompletedMigration(input)`
1298
+
1299
+ **Get Last Completed Migration**
1300
+
1301
+ - HTTP: `GET /api/v1/integrations/connections/{connection_id}/last-migration`
1302
+ - operationId: `get_last_completed_migration_integrations_connections__connection_id__last_migration_get` (also callable as `g8.api.call("get_last_completed_migration_integrations_connections__connection_id__last_migration_get", input)`)
1303
+ - Tier: `read`: reads data; safe to call and to retry
1304
+ - API-key scope: `integrations:read`
1305
+
1306
+ The most recent COMPLETED migration from this connection, or
1307
+ `migration: null` if there has never been one.
1308
+
1309
+ A later cancelled or failed run does not hide it: once a connection has
1310
+ been migrated successfully, a delta sync stays available.
1311
+
1312
+ **Input**
1313
+
1314
+ | Field | Type | Required | Description |
1315
+ |---|---|---|---|
1316
+ | `path.connection_id` | `string` | yes | CRM connection id. |
1317
+
1318
+ **Returns** `ApiResponse_IntegrationOpPayload_`: the envelope `{ data: IntegrationOpPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1319
+
1320
+ Other envelope fields: `pagination` (PaginationMeta).
1321
+
1322
+ **Example**
1323
+
1324
+ ```ts
1325
+ const result = await g8.api.integrations.getLastCompletedMigration({ path: { connection_id: "id" } });
1326
+ ```
1327
+
1328
+ ---
1329
+
1330
+ <a id="op-getmigrationstatus"></a>
1331
+
1332
+ ### `g8.api.integrations.getMigrationStatus(input)`
1333
+
1334
+ **Get Migration Status**
1335
+
1336
+ - HTTP: `GET /api/v1/integrations/migrations/{migration_id}`
1337
+ - operationId: `get_migration_status_integrations_migrations__migration_id__get` (also callable as `g8.api.call("get_migration_status_integrations_migrations__migration_id__get", input)`)
1338
+ - Tier: `read`: reads data; safe to call and to retry
1339
+ - API-key scope: `integrations:read`
1340
+
1341
+ Where the migration is, and what discovery found.
1342
+
1343
+ NOT admin-gated, matching the app: reading progress is not the privileged
1344
+ part, starting the import is.
1345
+
1346
+ Open-shaped, and deliberately: the payload carries a per-entity progress
1347
+ map, the discovered fields, the proposed mappings, the pipelines and a
1348
+ WARNINGS list. A dropped warning reads as "nothing went wrong".
1349
+
1350
+ **Input**
1351
+
1352
+ | Field | Type | Required | Description |
1353
+ |---|---|---|---|
1354
+ | `path.migration_id` | `string` | yes | Migration id. |
1355
+
1356
+ **Returns** `ApiResponse_ConnectionPayload_`: the envelope `{ data: ConnectionPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1357
+
1358
+ Other envelope fields: `pagination` (PaginationMeta).
1359
+
1360
+ **Example**
1361
+
1362
+ ```ts
1363
+ const result = await g8.api.integrations.getMigrationStatus({ path: { migration_id: "id" } });
1364
+ ```
1365
+
1366
+ ---
1367
+
1368
+ <a id="op-getorcreatecrmaudience"></a>
1369
+
1370
+ ### `g8.api.integrations.getOrCreateCrmAudience(input)`
1371
+
1372
+ **Get Or Create Crm Audience**
1373
+
1374
+ - HTTP: `POST /api/v1/integrations/crm-sync/audiences`
1375
+ - operationId: `get_or_create_crm_audience_integrations_crm_sync_audiences_post` (also callable as `g8.api.call("get_or_create_crm_audience_integrations_crm_sync_audiences_post", input)`)
1376
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
1377
+ - API-key scope: `integrations:run`
1378
+
1379
+ Get, or create, the graph8 audience a CRM import lands in.
1380
+
1381
+ IDEMPOTENT BY TITLE. Calling twice with the same `list_name` returns the
1382
+ same audience with `created: false` rather than making a second one, which
1383
+ is what makes it safe to call before every import. That is the difference
1384
+ from `POST /lists`, which always creates - and it is why this exists
1385
+ separately rather than being folded into it.
1386
+
1387
+ The audience is tagged with the CRM provider and the connection it came
1388
+ from, so a later sync can tell CRM-imported rows from graph8-native ones.
1389
+
1390
+ 200, not 201: most calls return a list that already existed.
1391
+
1392
+ **Input**
1393
+
1394
+ | Field | Type | Required | Description |
1395
+ |---|---|---|---|
1396
+ | `body` | `CrmAudienceRequest` | yes | Request body; fields below. |
1397
+
1398
+ Body fields (`CrmAudienceRequest`):
1399
+
1400
+ | Field | Type | Required | Description |
1401
+ |---|---|---|---|
1402
+ | `body.connection_id` | `string` | yes | The CRM connection this audience is for. Its provider is recorded on the audience as the source and as a `crm-import` tag, which is what lets a later sync tell CRM-imported rows from graph8-native ones. |
1403
+ | `body.list_name` | `string` | yes | Audience title. Matched exactly; reused when it exists. |
1404
+ | `body.entity_type` | `string \| null` | no | `contacts`, `companies`, `deals` or `leads`. Singular forms are accepted and pluralised by the app; anything unrecognised falls back to `contacts`. Omit for `contacts`. |
1405
+
1406
+ **Returns** `ApiResponse_CrmAudienceResponse_`: the envelope `{ data: CrmAudienceResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1407
+
1408
+ Other envelope fields: `pagination` (PaginationMeta).
1409
+
1410
+ `CrmAudienceResponse` fields:
1411
+
1412
+ | Field | Type | Required | Description |
1413
+ |---|---|---|---|
1414
+ | `audience_id` | `integer \| null` | no | |
1415
+ | `created` | `boolean \| null` | no | True only when THIS call created the audience; false when it already existed. |
1416
+ | `source` | `string \| null` | no | |
1417
+ | `title` | `string \| null` | no | |
1418
+
1419
+ **Example**
1420
+
1421
+ ```ts
1422
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
1423
+ const result = await g8.api.integrations.getOrCreateCrmAudience({ body: { connection_id: "id", list_name: "Example" } });
1424
+ ```
1425
+
1426
+ ---
1427
+
1428
+ <a id="op-getorcreatecrmlist"></a>
1429
+
1430
+ ### `g8.api.integrations.getOrCreateCrmList(input)`
1431
+
1432
+ **Get Or Create Crm List**
1433
+
1434
+ - HTTP: `POST /api/v1/integrations/crm/lists`
1435
+ - operationId: `get_or_create_crm_list_integrations_crm_lists_post` (also callable as `g8.api.call("get_or_create_crm_list_integrations_crm_lists_post", input)`)
1436
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
1437
+ - API-key scope: `integrations:run`
1438
+
1439
+ Get, or create, a list IN THE CUSTOMER'S CRM, matched by name.
1440
+
1441
+ IDEMPOTENT: calling twice with the same name returns the existing list
1442
+ rather than making a second one, which is what makes it safe to call before
1443
+ every membership change. 200, not 201, because most calls return a list
1444
+ that already existed.
1445
+
1446
+ The app takes these three as query parameters on a POST; they are a body
1447
+ here, because a POST carrying its arguments in the query string is not a
1448
+ shape to put in a public contract.
1449
+
1450
+ **Input**
1451
+
1452
+ | Field | Type | Required | Description |
1453
+ |---|---|---|---|
1454
+ | `body` | `GetOrCreateCrmListRequest` | yes | Request body; fields below. |
1455
+
1456
+ Body fields (`GetOrCreateCrmListRequest`):
1457
+
1458
+ | Field | Type | Required | Description |
1459
+ |---|---|---|---|
1460
+ | `body.connection_id` | `string` | yes | |
1461
+ | `body.name` | `string` | yes | List name. Matched in the CRM; created when absent. |
1462
+ | `body.entity_type` | `"contacts" \| "companies" \| "deals" \| "leads" \| null` | no | Which object the list holds. Omit for `contacts`. |
1463
+
1464
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1465
+
1466
+ Other envelope fields: `pagination` (PaginationMeta).
1467
+
1468
+ **Example**
1469
+
1470
+ ```ts
1471
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
1472
+ const result = await g8.api.integrations.getOrCreateCrmList({ body: { connection_id: "id", name: "Example" } });
1473
+ ```
1474
+
1475
+ ---
1476
+
1477
+ <a id="op-getsyncconfiganalytics"></a>
1478
+
1479
+ ### `g8.api.integrations.getSyncConfigAnalytics(input)`
1480
+
1481
+ **Get Sync Config Analytics**
1482
+
1483
+ - HTTP: `GET /api/v1/audience-syncs/{config_id}/analytics`
1484
+ - operationId: `get_sync_config_analytics_audience_syncs__config_id__analytics_get` (also callable as `g8.api.call("get_sync_config_analytics_audience_syncs__config_id__analytics_get", input)`)
1485
+ - Tier: `read`: reads data; safe to call and to retry
1486
+ - API-key scope: `integrations:read`
1487
+
1488
+ What the campaigns behind ONE sync config produced.
1489
+
1490
+ **Input**
1491
+
1492
+ | Field | Type | Required | Description |
1493
+ |---|---|---|---|
1494
+ | `path.config_id` | `integer` | yes | The sync config's id. |
1495
+ | `query.days` | `integer` | no | Days to look back. default `30` |
1496
+
1497
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1498
+
1499
+ Other envelope fields: `pagination` (PaginationMeta).
1500
+
1501
+ **Example**
1502
+
1503
+ ```ts
1504
+ const result = await g8.api.integrations.getSyncConfigAnalytics({ path: { config_id: 123 } });
1505
+ ```
1506
+
1507
+ ---
1508
+
1509
+ <a id="op-getsyncjob"></a>
1510
+
1511
+ ### `g8.api.integrations.getSyncJob(input)`
1512
+
1513
+ **Get Sync Job**
1514
+
1515
+ - HTTP: `GET /api/v1/integrations/crm-sync/jobs/{job_id}`
1516
+ - operationId: `get_sync_job_integrations_crm_sync_jobs__job_id__get` (also callable as `g8.api.call("get_sync_job_integrations_crm_sync_jobs__job_id__get", input)`)
1517
+ - Tier: `read`: reads data; safe to call and to retry
1518
+ - API-key scope: `integrations:read`
1519
+
1520
+ How a bulk job is going.
1521
+
1522
+ Open-shaped: the payload carries per-provider progress detail that differs
1523
+ between CRMs and grows with them, so pinning it would drop whatever a
1524
+ provider reported that we had not caught up on.
1525
+
1526
+ **Input**
1527
+
1528
+ | Field | Type | Required | Description |
1529
+ |---|---|---|---|
1530
+ | `path.job_id` | `string` | yes | Job id returned by a push or pull. |
1531
+
1532
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1533
+
1534
+ Other envelope fields: `pagination` (PaginationMeta).
1535
+
1536
+ `SyncJobResponse` fields:
1537
+
1538
+ | Field | Type | Required | Description |
1539
+ |---|---|---|---|
1540
+ | `job_id` | `string \| null` | no | |
1541
+ | `status` | `string \| null` | no | |
1542
+
1543
+ **Example**
1544
+
1545
+ ```ts
1546
+ const result = await g8.api.integrations.getSyncJob({ path: { job_id: "id" } });
1547
+ ```
1548
+
1549
+ ---
1550
+
1551
+ <a id="op-getsyncsegmentstatus"></a>
1552
+
1553
+ ### `g8.api.integrations.getSyncSegmentStatus(input)`
1554
+
1555
+ **Get Sync Segment Status**
1556
+
1557
+ - HTTP: `GET /api/v1/audience-syncs/{config_id}/segment-status`
1558
+ - operationId: `get_sync_segment_status_audience_syncs__config_id__segment_status_get` (also callable as `g8.api.call("get_sync_segment_status_audience_syncs__config_id__segment_status_get", input)`)
1559
+ - Tier: `read`: reads data; safe to call and to retry
1560
+ - API-key scope: `integrations:read`
1561
+
1562
+ Whether the platform has finished BUILDING the audience.
1563
+
1564
+ A LIVE platform read, unlike `/account-health`. Matched audiences are not
1565
+ usable the moment they are uploaded - the platform matches and sizes them
1566
+ first, and a campaign pointed at one that is still building serves nothing.
1567
+ This is the endpoint that explains that silence.
1568
+
1569
+ **Input**
1570
+
1571
+ | Field | Type | Required | Description |
1572
+ |---|---|---|---|
1573
+ | `path.config_id` | `integer` | yes | The sync config's id. |
1574
+
1575
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1576
+
1577
+ Other envelope fields: `pagination` (PaginationMeta).
1578
+
1579
+ **Example**
1580
+
1581
+ ```ts
1582
+ const result = await g8.api.integrations.getSyncSegmentStatus({ path: { config_id: 123 } });
1583
+ ```
1584
+
1585
+ ---
1586
+
1587
+ <a id="op-getvideoasset"></a>
1588
+
1589
+ ### `g8.api.integrations.getVideoAsset(input)`
1590
+
1591
+ **Get Video Asset**
1592
+
1593
+ - HTTP: `GET /api/v1/audience-syncs/google/video-assets/{asset_id}`
1594
+ - operationId: `get_video_asset_audience_syncs_google_video_assets__asset_id__get` (also callable as `g8.api.call("get_video_asset_audience_syncs_google_video_assets__asset_id__get", input)`)
1595
+ - Tier: `read`: reads data; safe to call and to retry
1596
+ - API-key scope: `integrations:read`
1597
+
1598
+ One video asset, including how far its upload to YouTube has got.
1599
+
1600
+ **Input**
1601
+
1602
+ | Field | Type | Required | Description |
1603
+ |---|---|---|---|
1604
+ | `path.asset_id` | `integer` | yes | The video asset's id. |
1605
+
1606
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1607
+
1608
+ Other envelope fields: `pagination` (PaginationMeta).
1609
+
1610
+ **Example**
1611
+
1612
+ ```ts
1613
+ const result = await g8.api.integrations.getVideoAsset({ path: { asset_id: 123 } });
1614
+ ```
1615
+
1616
+ ---
1617
+
1618
+ <a id="op-listadaccounthealth"></a>
1619
+
1620
+ ### `g8.api.integrations.listAdAccountHealth(input?)`
1621
+
1622
+ **List Ad Account Health**
1623
+
1624
+ - HTTP: `GET /api/v1/audience-syncs/account-health`
1625
+ - operationId: `list_ad_account_health_audience_syncs_account_health_get` (also callable as `g8.api.call("list_ad_account_health_audience_syncs_account_health_get", input)`)
1626
+ - Tier: `read`: reads data; safe to call and to retry
1627
+ - API-key scope: `integrations:read`
1628
+
1629
+ Whether each connected ad account is still authorised and usable.
1630
+
1631
+ Reads the verdict the hourly poller recorded; it deliberately makes NO live
1632
+ platform call, so it is cheap enough to poll and can be up to an hour
1633
+ stale. This is the endpoint that answers "why did my sync stop working" -
1634
+ usually a revoked token or a suspended account.
1635
+
1636
+ **Input**: none.
1637
+
1638
+ **Returns** `ApiResponse_AdCollection_`: the envelope `{ data: AdCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1639
+
1640
+ Other envelope fields: `pagination` (PaginationMeta).
1641
+
1642
+ `AdCollection` fields:
1643
+
1644
+ | Field | Type | Required | Description |
1645
+ |---|---|---|---|
1646
+ | `items` | `Array<unknown>` | no | |
1647
+
1648
+ **Example**
1649
+
1650
+ ```ts
1651
+ const result = await g8.api.integrations.listAdAccountHealth();
1652
+ ```
1653
+
1654
+ ---
1655
+
1656
+ <a id="op-listadaccounts"></a>
1657
+
1658
+ ### `g8.api.integrations.listAdAccounts(input?)`
1659
+
1660
+ **List Ad Accounts**
1661
+
1662
+ - HTTP: `GET /api/v1/audience-syncs/accounts`
1663
+ - operationId: `list_ad_accounts_audience_syncs_accounts_get` (also callable as `g8.api.call("list_ad_accounts_audience_syncs_accounts_get", input)`)
1664
+ - Tier: `read`: reads data; safe to call and to retry
1665
+ - API-key scope: `integrations:read`
1666
+
1667
+ Ad accounts this org can sync audiences into.
1668
+
1669
+ One row per connected account across Google, Meta, LinkedIn and X. The
1670
+ `ad_account_id` values here are what a sync config targets.
1671
+
1672
+ **Input**: none.
1673
+
1674
+ **Returns** `ApiResponse_AdCollection_`: the envelope `{ data: AdCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1675
+
1676
+ Other envelope fields: `pagination` (PaginationMeta).
1677
+
1678
+ `AdCollection` fields:
1679
+
1680
+ | Field | Type | Required | Description |
1681
+ |---|---|---|---|
1682
+ | `items` | `Array<unknown>` | no | |
1683
+
1684
+ **Example**
1685
+
1686
+ ```ts
1687
+ const result = await g8.api.integrations.listAdAccounts();
1688
+ ```
1689
+
1690
+ ---
1691
+
1692
+ <a id="op-listadplatforms"></a>
1693
+
1694
+ ### `g8.api.integrations.listAdPlatforms(input?)`
1695
+
1696
+ **List Ad Platforms**
1697
+
1698
+ - HTTP: `GET /api/v1/audience-syncs/platforms`
1699
+ - operationId: `list_ad_platforms_audience_syncs_platforms_get` (also callable as `g8.api.call("list_ad_platforms_audience_syncs_platforms_get", input)`)
1700
+ - Tier: `read`: reads data; safe to call and to retry
1701
+ - API-key scope: `integrations:read`
1702
+
1703
+ Which ad platforms are connected, and how many syncs each carries.
1704
+
1705
+ Reads graph8's own integration rows rather than calling any platform, so a
1706
+ platform can read "connected" here and still be unhealthy - check
1707
+ `/account-health` for that.
1708
+
1709
+ **Input**: none.
1710
+
1711
+ **Returns** `ApiResponse_AdCollection_`: the envelope `{ data: AdCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1712
+
1713
+ Other envelope fields: `pagination` (PaginationMeta).
1714
+
1715
+ `AdCollection` fields:
1716
+
1717
+ | Field | Type | Required | Description |
1718
+ |---|---|---|---|
1719
+ | `items` | `Array<unknown>` | no | |
1720
+
1721
+ **Example**
1722
+
1723
+ ```ts
1724
+ const result = await g8.api.integrations.listAdPlatforms();
1725
+ ```
1726
+
1727
+ ---
1728
+
1729
+ <a id="op-listcompanyactivitiesbygraph8id"></a>
1730
+
1731
+ ### `g8.api.integrations.listCompanyActivitiesByGraph8Id(input)`
1732
+
1733
+ **List Company Activities By Graph8 Id**
1734
+
1735
+ - HTTP: `GET /api/v1/integrations/crm/company-activities`
1736
+ - operationId: `list_company_activities_by_graph8_id_integrations_crm_company_activities_get` (also callable as `g8.api.call("list_company_activities_by_graph8_id_integrations_crm_company_activities_get", input)`)
1737
+ - Tier: `read`: reads data; safe to call and to retry
1738
+ - API-key scope: `integrations:read`
1739
+
1740
+ One company's merged timeline, by GRAPH8 company id.
1741
+
1742
+ Row visibility follows the key's own company scope.
1743
+
1744
+ **Input**
1745
+
1746
+ | Field | Type | Required | Description |
1747
+ |---|---|---|---|
1748
+ | `query.company_id` | `integer` | yes | graph8 `mashup_companies.id`. |
1749
+ | `query.activity_types` | `string \| null` | no | Comma-separated activity types. |
1750
+ | `query.source` | `string \| null` | no | `manual` or `crm`. |
1751
+ | `query.limit` | `integer` | no | default `50` |
1752
+
1753
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1754
+
1755
+ Other envelope fields: `pagination` (PaginationMeta).
1756
+
1757
+ **Example**
1758
+
1759
+ ```ts
1760
+ const result = await g8.api.integrations.listCompanyActivitiesByGraph8Id({ query: { company_id: 123 } });
1761
+ ```
1762
+
1763
+ ---
1764
+
1765
+ <a id="op-listconnections"></a>
1766
+
1767
+ ### `g8.api.integrations.listConnections(input?)`
1768
+
1769
+ **List Connections**
1770
+
1771
+ - HTTP: `GET /api/v1/integrations/connections`
1772
+ - operationId: `list_connections_integrations_connections_get` (also callable as `g8.api.call("list_connections_integrations_connections_get", input)`)
1773
+ - Tier: `read`: reads data; safe to call and to retry
1774
+ - API-key scope: `integrations:read`
1775
+
1776
+ Every CRM connection this org has.
1777
+
1778
+ The source of the `connection_id` every operation on
1779
+ `/integrations/crm-sync` takes.
1780
+
1781
+ **Input**: none.
1782
+
1783
+ **Returns** `ApiResponse_ConnectionListPayload_`: the envelope `{ data: ConnectionListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1784
+
1785
+ Other envelope fields: `pagination` (PaginationMeta).
1786
+
1787
+ `ConnectionListPayload` fields:
1788
+
1789
+ | Field | Type | Required | Description |
1790
+ |---|---|---|---|
1791
+ | `items` | `Array<unknown>` | no | |
1792
+
1793
+ **Example**
1794
+
1795
+ ```ts
1796
+ const result = await g8.api.integrations.listConnections();
1797
+ ```
1798
+
1799
+ ---
1800
+
1801
+ <a id="op-listcontactactivitiesbygraph8id"></a>
1802
+
1803
+ ### `g8.api.integrations.listContactActivitiesByGraph8Id(input)`
1804
+
1805
+ **List Contact Activities By Graph8 Id**
1806
+
1807
+ - HTTP: `GET /api/v1/integrations/crm/contact-activities`
1808
+ - operationId: `list_contact_activities_by_graph8_id_integrations_crm_contact_activities_get` (also callable as `g8.api.call("list_contact_activities_by_graph8_id_integrations_crm_contact_activities_get", input)`)
1809
+ - Tier: `read`: reads data; safe to call and to retry
1810
+ - API-key scope: `integrations:read`
1811
+
1812
+ One contact's merged timeline, by GRAPH8 contact id.
1813
+
1814
+ Row visibility follows the key's own contact scope - the same filter the
1815
+ browser applies, resolved from the key rather than from a session.
1816
+
1817
+ **Input**
1818
+
1819
+ | Field | Type | Required | Description |
1820
+ |---|---|---|---|
1821
+ | `query.contact_id` | `integer` | yes | graph8 `mashup_contacts.id`. |
1822
+ | `query.connection_id` | `string \| null` | no | Auto-discovered from the org's connections when omitted. |
1823
+ | `query.limit` | `integer` | no | default `50` |
1824
+ | `query.activity_types` | `string \| null` | no | Comma-separated: `calls,emails,notes,meetings,tasks`. |
1825
+ | `query.source` | `string \| null` | no | `manual`, `crm` (any provider), or a provider name. Omit for everything - which is the point of this route: one timeline whether the activity was logged in graph8 or in the CRM. |
1826
+
1827
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1828
+
1829
+ Other envelope fields: `pagination` (PaginationMeta).
1830
+
1831
+ **Example**
1832
+
1833
+ ```ts
1834
+ const result = await g8.api.integrations.listContactActivitiesByGraph8Id({ query: { contact_id: 123 } });
1835
+ ```
1836
+
1837
+ ---
1838
+
1839
+ <a id="op-listcrmactivities"></a>
1840
+
1841
+ ### `g8.api.integrations.listCrmActivities(input)`
1842
+
1843
+ **List Crm Activities**
1844
+
1845
+ - HTTP: `GET /api/v1/integrations/crm/activities`
1846
+ - operationId: `list_crm_activities_integrations_crm_activities_get` (also callable as `g8.api.call("list_crm_activities_integrations_crm_activities_get", input)`)
1847
+ - Tier: `read`: reads data; safe to call and to retry
1848
+ - API-key scope: `integrations:read`
1849
+
1850
+ Activities across the whole CRM, unscoped to a record.
1851
+
1852
+ **Input**
1853
+
1854
+ | Field | Type | Required | Description |
1855
+ |---|---|---|---|
1856
+ | `query.connection_id` | `string` | yes | |
1857
+ | `query.type` | `string \| null` | no | One activity type, e.g. `call`. |
1858
+ | `query.limit` | `integer` | no | Records per page. default `100` |
1859
+ | `query.offset` | `integer` | no | Records to skip. default `0` |
1860
+
1861
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1862
+
1863
+ Other envelope fields: `pagination` (PaginationMeta).
1864
+
1865
+ `CrmCollection` fields:
1866
+
1867
+ | Field | Type | Required | Description |
1868
+ |---|---|---|---|
1869
+ | `items` | `Array<unknown>` | no | |
1870
+
1871
+ **Example**
1872
+
1873
+ ```ts
1874
+ const result = await g8.api.integrations.listCrmActivities({ query: { connection_id: "id" } });
1875
+ ```
1876
+
1877
+ ---
1878
+
1879
+ <a id="op-listcrmcompanies"></a>
1880
+
1881
+ ### `g8.api.integrations.listCrmCompanies(input)`
1882
+
1883
+ **List Crm Companies**
1884
+
1885
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/companies`
1886
+ - operationId: `list_crm_companies_integrations_crm_connections__connection_id__companies_get` (also callable as `g8.api.call("list_crm_companies_integrations_crm_connections__connection_id__companies_get", input)`)
1887
+ - Tier: `read`: reads data; safe to call and to retry
1888
+ - API-key scope: `integrations:read`
1889
+
1890
+ Companies (accounts) in the CRM.
1891
+
1892
+ **Input**
1893
+
1894
+ | Field | Type | Required | Description |
1895
+ |---|---|---|---|
1896
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1897
+ | `query.limit` | `integer` | no | Records per page. default `100` |
1898
+ | `query.offset` | `integer` | no | Records to skip. default `0` |
1899
+
1900
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1901
+
1902
+ Other envelope fields: `pagination` (PaginationMeta).
1903
+
1904
+ `CrmCollection` fields:
1905
+
1906
+ | Field | Type | Required | Description |
1907
+ |---|---|---|---|
1908
+ | `items` | `Array<unknown>` | no | |
1909
+
1910
+ **Example**
1911
+
1912
+ ```ts
1913
+ const result = await g8.api.integrations.listCrmCompanies({ path: { connection_id: "id" } });
1914
+ ```
1915
+
1916
+ ---
1917
+
1918
+ <a id="op-listcrmcontactactivities"></a>
1919
+
1920
+ ### `g8.api.integrations.listCrmContactActivities(input)`
1921
+
1922
+ **List Crm Contact Activities**
1923
+
1924
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/contacts/{contact_id}/activities`
1925
+ - operationId: `list_crm_contact_activities_integrations_crm_connections__connection_id__contacts__contact_id__activities_get` (also callable as `g8.api.call("list_crm_contact_activities_integrations_crm_connections__connection_id__contacts__contact_id__activities_get", input)`)
1926
+ - Tier: `read`: reads data; safe to call and to retry
1927
+ - API-key scope: `integrations:read`
1928
+
1929
+ This contact's timeline, read from the CRM by the CRM's own id.
1930
+
1931
+ The sibling `GET /integrations/crm/contact-activities` answers the same
1932
+ question by GRAPH8 contact id and merges in activity logged in graph8.
1933
+
1934
+ **Input**
1935
+
1936
+ | Field | Type | Required | Description |
1937
+ |---|---|---|---|
1938
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1939
+ | `path.contact_id` | `string` | yes | The CRM's contact id. |
1940
+ | `query.limit` | `integer` | no | default `50` |
1941
+ | `query.activity_types` | `string \| null` | no | Comma-separated: `calls,emails,notes,meetings,tasks`. |
1942
+
1943
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1944
+
1945
+ Other envelope fields: `pagination` (PaginationMeta).
1946
+
1947
+ `CrmCollection` fields:
1948
+
1949
+ | Field | Type | Required | Description |
1950
+ |---|---|---|---|
1951
+ | `items` | `Array<unknown>` | no | |
1952
+
1953
+ **Example**
1954
+
1955
+ ```ts
1956
+ const result = await g8.api.integrations.listCrmContactActivities({ path: { connection_id: "id", contact_id: "id" } });
1957
+ ```
1958
+
1959
+ ---
1960
+
1961
+ <a id="op-listcrmcontacts"></a>
1962
+
1963
+ ### `g8.api.integrations.listCrmContacts(input)`
1964
+
1965
+ **List Crm Contacts**
1966
+
1967
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/contacts`
1968
+ - operationId: `list_crm_contacts_integrations_crm_connections__connection_id__contacts_get` (also callable as `g8.api.call("list_crm_contacts_integrations_crm_connections__connection_id__contacts_get", input)`)
1969
+ - Tier: `read`: reads data; safe to call and to retry
1970
+ - API-key scope: `integrations:read`
1971
+
1972
+ Contacts in the CRM.
1973
+
1974
+ **Input**
1975
+
1976
+ | Field | Type | Required | Description |
1977
+ |---|---|---|---|
1978
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
1979
+ | `query.limit` | `integer` | no | Records per page. default `100` |
1980
+ | `query.offset` | `integer` | no | Records to skip. default `0` |
1981
+ | `query.updated_gte` | `string (date-time) \| null` | no | ISO 8601 timestamp. Only contacts modified at or after it - the parameter an incremental reader should page on rather than re-reading the whole CRM. |
1982
+ | `query.email` | `string \| null` | no | Exact-match filter. |
1983
+ | `query.name` | `string \| null` | no | |
1984
+ | `query.company_id` | `string \| null` | no | The CRM's company id. |
1985
+
1986
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1987
+
1988
+ Other envelope fields: `pagination` (PaginationMeta).
1989
+
1990
+ `CrmCollection` fields:
1991
+
1992
+ | Field | Type | Required | Description |
1993
+ |---|---|---|---|
1994
+ | `items` | `Array<unknown>` | no | |
1995
+
1996
+ **Example**
1997
+
1998
+ ```ts
1999
+ const result = await g8.api.integrations.listCrmContacts({ path: { connection_id: "id" } });
2000
+ ```
2001
+
2002
+ ---
2003
+
2004
+ <a id="op-listcrmdeals"></a>
2005
+
2006
+ ### `g8.api.integrations.listCrmDeals(input)`
2007
+
2008
+ **List Crm Deals**
2009
+
2010
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/deals`
2011
+ - operationId: `list_crm_deals_integrations_crm_connections__connection_id__deals_get` (also callable as `g8.api.call("list_crm_deals_integrations_crm_connections__connection_id__deals_get", input)`)
2012
+ - Tier: `read`: reads data; safe to call and to retry
2013
+ - API-key scope: `integrations:read`
2014
+
2015
+ Deals (opportunities) in the CRM.
2016
+
2017
+ Not graph8 deals. `GET /deals` is those, and the two have different ids.
2018
+
2019
+ **Input**
2020
+
2021
+ | Field | Type | Required | Description |
2022
+ |---|---|---|---|
2023
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
2024
+ | `query.limit` | `integer` | no | Records per page. default `100` |
2025
+ | `query.offset` | `integer` | no | Records to skip. default `0` |
2026
+
2027
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2028
+
2029
+ Other envelope fields: `pagination` (PaginationMeta).
2030
+
2031
+ `CrmCollection` fields:
2032
+
2033
+ | Field | Type | Required | Description |
2034
+ |---|---|---|---|
2035
+ | `items` | `Array<unknown>` | no | |
2036
+
2037
+ **Example**
2038
+
2039
+ ```ts
2040
+ const result = await g8.api.integrations.listCrmDeals({ path: { connection_id: "id" } });
2041
+ ```
2042
+
2043
+ ---
2044
+
2045
+ <a id="op-listcrmleads"></a>
2046
+
2047
+ ### `g8.api.integrations.listCrmLeads(input)`
2048
+
2049
+ **List Crm Leads**
2050
+
2051
+ - HTTP: `GET /api/v1/integrations/crm/connections/{connection_id}/leads`
2052
+ - operationId: `list_crm_leads_integrations_crm_connections__connection_id__leads_get` (also callable as `g8.api.call("list_crm_leads_integrations_crm_connections__connection_id__leads_get", input)`)
2053
+ - Tier: `read`: reads data; safe to call and to retry
2054
+ - API-key scope: `integrations:read`
2055
+
2056
+ Leads in the CRM. Salesforce only.
2057
+
2058
+ **Input**
2059
+
2060
+ | Field | Type | Required | Description |
2061
+ |---|---|---|---|
2062
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
2063
+ | `query.limit` | `integer` | no | Records per page. default `100` |
2064
+ | `query.offset` | `integer` | no | Records to skip. default `0` |
2065
+
2066
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2067
+
2068
+ Other envelope fields: `pagination` (PaginationMeta).
2069
+
2070
+ `CrmCollection` fields:
2071
+
2072
+ | Field | Type | Required | Description |
2073
+ |---|---|---|---|
2074
+ | `items` | `Array<unknown>` | no | |
2075
+
2076
+ **Example**
2077
+
2078
+ ```ts
2079
+ const result = await g8.api.integrations.listCrmLeads({ path: { connection_id: "id" } });
2080
+ ```
2081
+
2082
+ ---
2083
+
2084
+ <a id="op-listcrmlists"></a>
2085
+
2086
+ ### `g8.api.integrations.listCrmLists(input)`
2087
+
2088
+ **List Crm Lists**
2089
+
2090
+ - HTTP: `GET /api/v1/integrations/crm/lists`
2091
+ - operationId: `list_crm_lists_integrations_crm_lists_get` (also callable as `g8.api.call("list_crm_lists_integrations_crm_lists_get", input)`)
2092
+ - Tier: `read`: reads data; safe to call and to retry
2093
+ - API-key scope: `integrations:read`
2094
+
2095
+ Lists in the CRM.
2096
+
2097
+ Published as GET although the app spells it POST: every one of its
2098
+ parameters is a QUERY parameter and it reads. A POST that takes no body is
2099
+ a read wearing the wrong verb, and publishing it that way would put this
2100
+ behind a write grant for no reason.
2101
+
2102
+ **Input**
2103
+
2104
+ | Field | Type | Required | Description |
2105
+ |---|---|---|---|
2106
+ | `query.connection_id` | `string` | yes | |
2107
+ | `query.query` | `string \| null` | no | Filter by list name. |
2108
+ | `query.limit` | `integer` | no | default `50` |
2109
+ | `query.offset` | `integer` | no | default `0` |
2110
+ | `query.entity_type` | `"contacts" \| "companies" \| "deals" \| "leads"` | no | Which object the list holds. default `"contacts"` |
2111
+
2112
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2113
+
2114
+ Other envelope fields: `pagination` (PaginationMeta).
2115
+
2116
+ **Example**
2117
+
2118
+ ```ts
2119
+ const result = await g8.api.integrations.listCrmLists({ query: { connection_id: "id" } });
2120
+ ```
2121
+
2122
+ ---
2123
+
2124
+ <a id="op-listcrmmeetings"></a>
2125
+
2126
+ ### `g8.api.integrations.listCrmMeetings(input)`
2127
+
2128
+ **List Crm Meetings**
2129
+
2130
+ - HTTP: `GET /api/v1/integrations/crm/meetings`
2131
+ - operationId: `list_crm_meetings_integrations_crm_meetings_get` (also callable as `g8.api.call("list_crm_meetings_integrations_crm_meetings_get", input)`)
2132
+ - Tier: `read`: reads data; safe to call and to retry
2133
+ - API-key scope: `integrations:read`
2134
+
2135
+ Meetings on the CRM's calendar object.
2136
+
2137
+ Not graph8 appointments - `/appointments/*` is those.
2138
+
2139
+ **Input**
2140
+
2141
+ | Field | Type | Required | Description |
2142
+ |---|---|---|---|
2143
+ | `query.connection_id` | `string` | yes | |
2144
+ | `query.limit` | `integer` | no | Records per page. default `100` |
2145
+ | `query.offset` | `integer` | no | Records to skip. default `0` |
2146
+
2147
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2148
+
2149
+ Other envelope fields: `pagination` (PaginationMeta).
2150
+
2151
+ `CrmCollection` fields:
2152
+
2153
+ | Field | Type | Required | Description |
2154
+ |---|---|---|---|
2155
+ | `items` | `Array<unknown>` | no | |
2156
+
2157
+ **Example**
2158
+
2159
+ ```ts
2160
+ const result = await g8.api.integrations.listCrmMeetings({ query: { connection_id: "id" } });
2161
+ ```
2162
+
2163
+ ---
2164
+
2165
+ <a id="op-listcrmusers"></a>
2166
+
2167
+ ### `g8.api.integrations.listCrmUsers(input)`
2168
+
2169
+ **List Crm Users**
2170
+
2171
+ - HTTP: `GET /api/v1/integrations/crm/users`
2172
+ - operationId: `list_crm_users_integrations_crm_users_get` (also callable as `g8.api.call("list_crm_users_integrations_crm_users_get", input)`)
2173
+ - Tier: `read`: reads data; safe to call and to retry
2174
+ - API-key scope: `integrations:read`
2175
+
2176
+ The CRM's own users - the ids that `user_id` on a create or update means.
2177
+
2178
+ **Input**
2179
+
2180
+ | Field | Type | Required | Description |
2181
+ |---|---|---|---|
2182
+ | `query.connection_id` | `string` | yes | The CRM connection to act through. |
2183
+
2184
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2185
+
2186
+ Other envelope fields: `pagination` (PaginationMeta).
2187
+
2188
+ `CrmCollection` fields:
2189
+
2190
+ | Field | Type | Required | Description |
2191
+ |---|---|---|---|
2192
+ | `items` | `Array<unknown>` | no | |
2193
+
2194
+ **Example**
2195
+
2196
+ ```ts
2197
+ const result = await g8.api.integrations.listCrmUsers({ query: { connection_id: "id" } });
2198
+ ```
2199
+
2200
+ ---
2201
+
2202
+ <a id="op-listleadstatuses"></a>
2203
+
2204
+ ### `g8.api.integrations.listLeadStatuses(input)`
2205
+
2206
+ **List Lead Statuses**
2207
+
2208
+ - HTTP: `GET /api/v1/integrations/crm-sync/leads/statuses`
2209
+ - operationId: `list_lead_statuses_integrations_crm_sync_leads_statuses_get` (also callable as `g8.api.call("list_lead_statuses_integrations_crm_sync_leads_statuses_get", input)`)
2210
+ - Tier: `read`: reads data; safe to call and to retry
2211
+ - API-key scope: `integrations:read`
2212
+
2213
+ The org's Salesforce `Lead.Status` picklist, minus the converted ones.
2214
+
2215
+ Read this before setting `status_qualified` / `status_unqualified` on a
2216
+ push. `Lead.Status` is an OPEN picklist: Salesforce stores whatever the API
2217
+ sends, so a typo does not fail - it creates a new status nobody meant to
2218
+ have. Converted statuses are filtered out because setting one through a
2219
+ push would silently convert the lead.
2220
+
2221
+ Salesforce only. Any other provider is a 400.
2222
+
2223
+ **Input**
2224
+
2225
+ | Field | Type | Required | Description |
2226
+ |---|---|---|---|
2227
+ | `query.connection_id` | `string` | yes | A Salesforce connection. |
2228
+
2229
+ **Returns** `ApiResponse_LeadStatusesResponse_`: the envelope `{ data: LeadStatusesResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2230
+
2231
+ Other envelope fields: `pagination` (PaginationMeta).
2232
+
2233
+ `LeadStatusesResponse` fields:
2234
+
2235
+ | Field | Type | Required | Description |
2236
+ |---|---|---|---|
2237
+ | `default` | `string \| null` | no | The status Salesforce marks as the org default, when one exists. |
2238
+ | `statuses` | `Array<Record<string, unknown>>` | no | |
2239
+
2240
+ **Example**
2241
+
2242
+ ```ts
2243
+ const result = await g8.api.integrations.listLeadStatuses({ query: { connection_id: "id" } });
2244
+ ```
2245
+
2246
+ ---
2247
+
2248
+ <a id="op-listmappablegraph8fields"></a>
2249
+
2250
+ ### `g8.api.integrations.listMappableGraph8Fields(input?)`
2251
+
2252
+ **List Mappable Graph8 Fields**
2253
+
2254
+ - HTTP: `GET /api/v1/integrations/crm/fields/mappable`
2255
+ - operationId: `list_mappable_graph8_fields_integrations_crm_fields_mappable_get` (also callable as `g8.api.call("list_mappable_graph8_fields_integrations_crm_fields_mappable_get", input)`)
2256
+ - Tier: `read`: reads data; safe to call and to retry
2257
+ - API-key scope: `integrations:read`
2258
+
2259
+ The GRAPH8-side fields a CRM field can be mapped onto.
2260
+
2261
+ The other half of `GET /integrations/crm/fields`: that one describes the
2262
+ customer's CRM, this one describes graph8. A field mapping is a pair drawn
2263
+ from the two, so both have to be readable for one to be buildable.
2264
+
2265
+ `activities` is accepted here and not by `/fields` - it is a graph8-side
2266
+ object that has no single CRM counterpart.
2267
+
2268
+ **Input**
2269
+
2270
+ | Field | Type | Required | Description |
2271
+ |---|---|---|---|
2272
+ | `query.object_type` | `"contacts" \| "companies" \| "deals" \| "leads" \| "activities"` | no | Which graph8 object. default `"contacts"` |
2273
+
2274
+ **Returns** `ApiResponse_CrmCollection_`: the envelope `{ data: CrmCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2275
+
2276
+ Other envelope fields: `pagination` (PaginationMeta).
2277
+
2278
+ `CrmCollection` fields:
2279
+
2280
+ | Field | Type | Required | Description |
2281
+ |---|---|---|---|
2282
+ | `items` | `Array<unknown>` | no | |
2283
+
2284
+ **Example**
2285
+
2286
+ ```ts
2287
+ const result = await g8.api.integrations.listMappableGraph8Fields();
2288
+ ```
2289
+
2290
+ ---
2291
+
2292
+ <a id="op-listvideoassets"></a>
2293
+
2294
+ ### `g8.api.integrations.listVideoAssets(input?)`
2295
+
2296
+ **List Video Assets**
2297
+
2298
+ - HTTP: `GET /api/v1/audience-syncs/google/video-assets`
2299
+ - operationId: `list_video_assets_audience_syncs_google_video_assets_get` (also callable as `g8.api.call("list_video_assets_audience_syncs_google_video_assets_get", input)`)
2300
+ - Tier: `read`: reads data; safe to call and to retry
2301
+ - API-key scope: `integrations:read`
2302
+
2303
+ Videos registered for use in Google Video campaigns.
2304
+
2305
+ **Input**
2306
+
2307
+ | Field | Type | Required | Description |
2308
+ |---|---|---|---|
2309
+ | `query.source` | `"link" \| "upload" \| "studio" \| null` | no | Omit for every source. |
2310
+
2311
+ **Returns** `ApiResponse_AdCollection_`: the envelope `{ data: AdCollection, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2312
+
2313
+ Other envelope fields: `pagination` (PaginationMeta).
2314
+
2315
+ `AdCollection` fields:
2316
+
2317
+ | Field | Type | Required | Description |
2318
+ |---|---|---|---|
2319
+ | `items` | `Array<unknown>` | no | |
2320
+
2321
+ **Example**
2322
+
2323
+ ```ts
2324
+ const result = await g8.api.integrations.listVideoAssets();
2325
+ ```
2326
+
2327
+ ---
2328
+
2329
+ <a id="op-lookupcrmcontactsbyemail"></a>
2330
+
2331
+ ### `g8.api.integrations.lookupCrmContactsByEmail(input)`
2332
+
2333
+ **Lookup Crm Contacts By Email**
2334
+
2335
+ - HTTP: `POST /api/v1/integrations/crm/connections/{connection_id}/batch/contacts/lookup-by-email`
2336
+ - operationId: `lookup_crm_contacts_by_email_integrations_crm_connections__connection_id__batch_contacts_lookup_by_email_post` (also callable as `g8.api.call("lookup_crm_contacts_by_email_integrations_crm_connections__connection_id__batch_contacts_lookup_by_email_post", input)`)
2337
+ - Tier: `read`: reads data; safe to call and to retry
2338
+ - API-key scope: `integrations:read`
2339
+
2340
+ Find existing CRM contacts by email address. READS ONLY.
2341
+
2342
+ POST because a list of emails is a body, not because it changes anything -
2343
+ and it is tiered `read` for that reason, so a key granted "read my CRM" can
2344
+ call it. This is the de-duplication check to run BEFORE a create.
2345
+
2346
+ **Input**
2347
+
2348
+ | Field | Type | Required | Description |
2349
+ |---|---|---|---|
2350
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
2351
+ | `body` | `BatchGetByEmailRequest` | yes | Request body; fields below. |
2352
+
2353
+ Body fields (`BatchGetByEmailRequest`):
2354
+
2355
+ | Field | Type | Required | Description |
2356
+ |---|---|---|---|
2357
+ | `body.emails` | `Array<string>` | yes | min items 1 |
2358
+
2359
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2360
+
2361
+ Other envelope fields: `pagination` (PaginationMeta).
2362
+
2363
+ **Example**
2364
+
2365
+ ```ts
2366
+ const result = await g8.api.integrations.lookupCrmContactsByEmail({ path: { connection_id: "id" }, body: { emails: ["jane@acme.com"] } });
2367
+ ```
2368
+
2369
+ ---
2370
+
2371
+ <a id="op-modifycrmlistmemberships"></a>
2372
+
2373
+ ### `g8.api.integrations.modifyCrmListMemberships(input)`
2374
+
2375
+ **Modify Crm List Memberships**
2376
+
2377
+ - HTTP: `POST /api/v1/integrations/crm/lists/memberships`
2378
+ - operationId: `modify_crm_list_memberships_integrations_crm_lists_memberships_post` (also callable as `g8.api.call("modify_crm_list_memberships_integrations_crm_lists_memberships_post", input)`)
2379
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2380
+ - API-key scope: `integrations:run`
2381
+
2382
+ Add and remove contacts from ONE CRM list, in a single call.
2383
+
2384
+ Both directions are applied in the same request, so this is not two calls
2385
+ pretending to be one - and repeating the same body is idempotent on the
2386
+ provider side. Membership drives who receives the customer's CRM-side
2387
+ marketing, which is why it is admin-gated.
2388
+
2389
+ **Input**
2390
+
2391
+ | Field | Type | Required | Description |
2392
+ |---|---|---|---|
2393
+ | `query.connection_id` | `string` | yes | |
2394
+ | `body` | `ModifyListMembershipsRequest` | yes | Request body; fields below. |
2395
+
2396
+ Body fields (`ModifyListMembershipsRequest`):
2397
+
2398
+ | Field | Type | Required | Description |
2399
+ |---|---|---|---|
2400
+ | `body.list_id` | `string` | yes | The CRM's list id. |
2401
+ | `body.add_contact_ids` | `Array<string>` | no | |
2402
+ | `body.remove_contact_ids` | `Array<string>` | no | |
2403
+
2404
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2405
+
2406
+ Other envelope fields: `pagination` (PaginationMeta).
2407
+
2408
+ **Example**
2409
+
2410
+ ```ts
2411
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2412
+ const result = await g8.api.integrations.modifyCrmListMemberships({ query: { connection_id: "id" }, body: { list_id: "id" } });
2413
+ ```
2414
+
2415
+ ---
2416
+
2417
+ <a id="op-previewleadpush"></a>
2418
+
2419
+ ### `g8.api.integrations.previewLeadPush(input)`
2420
+
2421
+ **Preview Lead Push**
2422
+
2423
+ - HTTP: `GET /api/v1/integrations/crm-sync/leads/push-preview`
2424
+ - operationId: `preview_lead_push_integrations_crm_sync_leads_push_preview_get` (also callable as `g8.api.call("preview_lead_push_integrations_crm_sync_leads_push_preview_get", input)`)
2425
+ - Tier: `read`: reads data; safe to call and to retry
2426
+ - API-key scope: `integrations:read`
2427
+
2428
+ What a lead push would do, computed NOW and returned inline.
2429
+
2430
+ Nothing is written to the CRM. The asynchronous twin,
2431
+ `POST /integrations/crm-sync/leads/previews`, queues the same work and
2432
+ returns a job id instead - use that one for a population large enough that
2433
+ the inline version would time out.
2434
+
2435
+ **Input**
2436
+
2437
+ | Field | Type | Required | Description |
2438
+ |---|---|---|---|
2439
+ | `query.connection_id` | `string` | yes | A Salesforce connection. |
2440
+ | `query.source_mode` | `"all_qualified" \| "saved_segment" \| "segments_union" \| "all_contacts"` | no | Which population to preview. `saved_segment` requires `audience_id`; `segments_union` requires `audience_ids`. default `"all_qualified"` |
2441
+ | `query.audience_id` | `integer \| null` | no | Required for `saved_segment`. |
2442
+ | `query.audience_ids` | `Array<integer> \| null` | no | Required for `segments_union`. |
2443
+ | `query.limit` | `integer` | no | Ceiling on rows inspected. default `10000` |
2444
+ | `query.status_qualified` | `string \| null` | no | |
2445
+ | `query.status_unqualified` | `string \| null` | no | |
2446
+
2447
+ **Returns** `ApiResponse_LeadPreviewResponse_`: the envelope `{ data: LeadPreviewResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2448
+
2449
+ Other envelope fields: `pagination` (PaginationMeta).
2450
+
2451
+ **Example**
2452
+
2453
+ ```ts
2454
+ const result = await g8.api.integrations.previewLeadPush({ query: { connection_id: "id" } });
2455
+ ```
2456
+
2457
+ ---
2458
+
2459
+ <a id="op-pullallcontacts"></a>
2460
+
2461
+ ### `g8.api.integrations.pullAllContacts(input)`
2462
+
2463
+ **Pull All Contacts**
2464
+
2465
+ - HTTP: `POST /api/v1/integrations/crm-sync/contacts/pull`
2466
+ - operationId: `pull_all_contacts_integrations_crm_sync_contacts_pull_post` (also callable as `g8.api.call("pull_all_contacts_integrations_crm_sync_contacts_pull_post", input)`)
2467
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2468
+ - API-key scope: `integrations:run`
2469
+
2470
+ Pull every CRM contact into graph8.
2471
+
2472
+ `enrich_from_graph8` SPENDS ENRICHMENT CREDIT when on. Omit it to take the
2473
+ app's default rather than turning a spend on by accident.
2474
+
2475
+ **Input**
2476
+
2477
+ | Field | Type | Required | Description |
2478
+ |---|---|---|---|
2479
+ | `body` | `PullAllContactsRequest` | yes | Request body; fields below. |
2480
+
2481
+ Body fields (`PullAllContactsRequest`):
2482
+
2483
+ | Field | Type | Required | Description |
2484
+ |---|---|---|---|
2485
+ | `body.connection_id` | `string` | yes | Which CRM connection to run against. |
2486
+ | `body.chunk_size` | `integer \| null` | no | Records per batch. min 1 |
2487
+ | `body.enrich_from_graph8` | `boolean \| null` | no | Fill missing fields from the graph8 index as rows arrive. Omit to take the app's default - this SPENDS enrichment credit when on. |
2488
+ | `body.entity_type` | `string \| null` | no | default `"contacts"` |
2489
+ | `body.limit` | `integer \| null` | no | Ceiling on records processed. OMIT to take the app's own default (5,000 pulling, 10,000 pushing) rather than freezing a copy of it here. min 1 |
2490
+ | `body.list_id` | `integer \| null` | no | graph8 audience list to land in. |
2491
+ | `body.max_parallel` | `integer \| null` | no | Concurrent batches. min 1 |
2492
+
2493
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2494
+
2495
+ Other envelope fields: `pagination` (PaginationMeta).
2496
+
2497
+ `SyncJobResponse` fields:
2498
+
2499
+ | Field | Type | Required | Description |
2500
+ |---|---|---|---|
2501
+ | `job_id` | `string \| null` | no | |
2502
+ | `status` | `string \| null` | no | |
2503
+
2504
+ **Example**
2505
+
2506
+ ```ts
2507
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2508
+ const result = await g8.api.integrations.pullAllContacts({ body: { connection_id: "id" } });
2509
+ ```
2510
+
2511
+ ---
2512
+
2513
+ <a id="op-pullalldeals"></a>
2514
+
2515
+ ### `g8.api.integrations.pullAllDeals(input)`
2516
+
2517
+ **Pull All Deals**
2518
+
2519
+ - HTTP: `POST /api/v1/integrations/crm-sync/deals/pull`
2520
+ - operationId: `pull_all_deals_integrations_crm_sync_deals_pull_post` (also callable as `g8.api.call("pull_all_deals_integrations_crm_sync_deals_pull_post", input)`)
2521
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2522
+ - API-key scope: `integrations:run`
2523
+
2524
+ Pull CRM opportunities into graph8 as deals.
2525
+
2526
+ **Input**
2527
+
2528
+ | Field | Type | Required | Description |
2529
+ |---|---|---|---|
2530
+ | `body` | `PullAllDealsRequest` | yes | Request body; fields below. |
2531
+
2532
+ Body fields (`PullAllDealsRequest`):
2533
+
2534
+ | Field | Type | Required | Description |
2535
+ |---|---|---|---|
2536
+ | `body.connection_id` | `string` | yes | |
2537
+ | `body.chunk_size` | `integer \| null` | no | min 1 |
2538
+ | `body.crm_list_id` | `string \| null` | no | |
2539
+ | `body.crm_list_title` | `string \| null` | no | |
2540
+ | `body.limit` | `integer \| null` | no | min 1 |
2541
+ | `body.list_id` | `integer \| null` | no | |
2542
+
2543
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2544
+
2545
+ Other envelope fields: `pagination` (PaginationMeta).
2546
+
2547
+ `SyncJobResponse` fields:
2548
+
2549
+ | Field | Type | Required | Description |
2550
+ |---|---|---|---|
2551
+ | `job_id` | `string \| null` | no | |
2552
+ | `status` | `string \| null` | no | |
2553
+
2554
+ **Example**
2555
+
2556
+ ```ts
2557
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2558
+ const result = await g8.api.integrations.pullAllDeals({ body: { connection_id: "id" } });
2559
+ ```
2560
+
2561
+ ---
2562
+
2563
+ <a id="op-pullallleads"></a>
2564
+
2565
+ ### `g8.api.integrations.pullAllLeads(input)`
2566
+
2567
+ **Pull All Leads**
2568
+
2569
+ - HTTP: `POST /api/v1/integrations/crm-sync/leads/pull`
2570
+ - operationId: `pull_all_leads_integrations_crm_sync_leads_pull_post` (also callable as `g8.api.call("pull_all_leads_integrations_crm_sync_leads_pull_post", input)`)
2571
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2572
+ - API-key scope: `integrations:run`
2573
+
2574
+ Pull Salesforce Leads into graph8.
2575
+
2576
+ A body carrying only `connection_id` runs the org's SAVED `pull.leads`
2577
+ settings rather than pulling everything. Any other field overrides those
2578
+ settings for this run only.
2579
+
2580
+ `enrich_from_graph8` SPENDS ENRICHMENT CREDIT when on. Omit it to take the
2581
+ app's default rather than turning a spend on by accident.
2582
+
2583
+ **Input**
2584
+
2585
+ | Field | Type | Required | Description |
2586
+ |---|---|---|---|
2587
+ | `body` | `PullAllLeadsRequest` | yes | Request body; fields below. |
2588
+
2589
+ Body fields (`PullAllLeadsRequest`):
2590
+
2591
+ | Field | Type | Required | Description |
2592
+ |---|---|---|---|
2593
+ | `body.connection_id` | `string` | yes | Which CRM connection to pull from. |
2594
+ | `body.campaign_ids` | `Array<string> \| null` | no | Salesforce Campaign ids to pull members of. |
2595
+ | `body.chunk_size` | `integer \| null` | no | Records per batch. min 1 |
2596
+ | `body.enrich_from_graph8` | `boolean \| null` | no | Fill missing fields from the graph8 index as rows arrive. This SPENDS ENRICHMENT CREDIT when on. Omit to take the app's default rather than turning a spend on by accident. |
2597
+ | `body.include_converted` | `boolean \| null` | no | Include leads Salesforce has already converted to a Contact. |
2598
+ | `body.limit` | `integer \| null` | no | Ceiling on records pulled. min 1 |
2599
+ | `body.list_id` | `integer \| null` | no | graph8 audience to land the leads in. |
2600
+ | `body.max_parallel` | `integer \| null` | no | Concurrent batches. min 1 |
2601
+ | `body.source_mode` | `"all_leads" \| "campaigns" \| null` | no | `campaigns` restricts the pull to `campaign_ids`. Omit for the saved setting. |
2602
+ | `body.suppress_from_optouts` | `boolean \| null` | no | Skip leads that appear on an opt-out list. |
2603
+
2604
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2605
+
2606
+ Other envelope fields: `pagination` (PaginationMeta).
2607
+
2608
+ `SyncJobResponse` fields:
2609
+
2610
+ | Field | Type | Required | Description |
2611
+ |---|---|---|---|
2612
+ | `job_id` | `string \| null` | no | |
2613
+ | `status` | `string \| null` | no | |
2614
+
2615
+ **Example**
2616
+
2617
+ ```ts
2618
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2619
+ const result = await g8.api.integrations.pullAllLeads({ body: { connection_id: "id" } });
2620
+ ```
2621
+
2622
+ ---
2623
+
2624
+ <a id="op-pullcrmlist"></a>
2625
+
2626
+ ### `g8.api.integrations.pullCrmList(input)`
2627
+
2628
+ **Pull Crm List**
2629
+
2630
+ - HTTP: `POST /api/v1/integrations/crm-sync/pull`
2631
+ - operationId: `pull_crm_list_integrations_crm_sync_pull_post` (also callable as `g8.api.call("pull_crm_list_integrations_crm_sync_pull_post", input)`)
2632
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2633
+ - API-key scope: `integrations:run`
2634
+
2635
+ Pull ONE CRM list rather than everything.
2636
+
2637
+ `crm_list_id` is REQUIRED - without it there is no list to pull, and
2638
+ defaulting to "everything" is the opposite of what a narrow endpoint is
2639
+ for.
2640
+
2641
+ **Input**
2642
+
2643
+ | Field | Type | Required | Description |
2644
+ |---|---|---|---|
2645
+ | `body` | `PullCrmListRequest` | yes | Request body; fields below. |
2646
+
2647
+ Body fields (`PullCrmListRequest`):
2648
+
2649
+ | Field | Type | Required | Description |
2650
+ |---|---|---|---|
2651
+ | `body.connection_id` | `string` | yes | |
2652
+ | `body.crm_list_id` | `string` | yes | REQUIRED - the CRM list to pull. |
2653
+ | `body.auto_create_audience` | `boolean \| null` | no | Create a matching graph8 audience if none is given. |
2654
+ | `body.enrich_from_graph8` | `boolean \| null` | no | SPENDS enrichment credit when on. |
2655
+ | `body.entity_type` | `string \| null` | no | |
2656
+ | `body.graph8_list_id` | `integer \| null` | no | |
2657
+ | `body.limit` | `integer \| null` | no | min 1 |
2658
+ | `body.reconcile` | `boolean \| null` | no | |
2659
+
2660
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2661
+
2662
+ Other envelope fields: `pagination` (PaginationMeta).
2663
+
2664
+ `SyncJobResponse` fields:
2665
+
2666
+ | Field | Type | Required | Description |
2667
+ |---|---|---|---|
2668
+ | `job_id` | `string \| null` | no | |
2669
+ | `status` | `string \| null` | no | |
2670
+
2671
+ **Example**
2672
+
2673
+ ```ts
2674
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2675
+ const result = await g8.api.integrations.pullCrmList({ body: { connection_id: "id", crm_list_id: "id" } });
2676
+ ```
2677
+
2678
+ ---
2679
+
2680
+ <a id="op-pushallcontacts"></a>
2681
+
2682
+ ### `g8.api.integrations.pushAllContacts(input)`
2683
+
2684
+ **Push All Contacts**
2685
+
2686
+ - HTTP: `POST /api/v1/integrations/crm-sync/contacts/push`
2687
+ - operationId: `push_all_contacts_integrations_crm_sync_contacts_push_post` (also callable as `g8.api.call("push_all_contacts_integrations_crm_sync_contacts_push_post", input)`)
2688
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2689
+ - API-key scope: `integrations:run`
2690
+
2691
+ Push every graph8 contact into the CRM. THIS WRITES TO THEIR SYSTEM.
2692
+
2693
+ Returns a job - the work happens in the background. Poll `/jobs/{job_id}`.
2694
+ Omit `limit` to take the app's default (10,000) rather than a number frozen
2695
+ into this contract.
2696
+
2697
+ **Input**
2698
+
2699
+ | Field | Type | Required | Description |
2700
+ |---|---|---|---|
2701
+ | `body` | `PushAllContactsRequest` | yes | Request body; fields below. |
2702
+
2703
+ Body fields (`PushAllContactsRequest`):
2704
+
2705
+ | Field | Type | Required | Description |
2706
+ |---|---|---|---|
2707
+ | `body.connection_id` | `string` | yes | Which CRM connection to run against. |
2708
+ | `body.chunk_size` | `integer \| null` | no | Records per batch. min 1 |
2709
+ | `body.crm_list_id` | `string \| null` | no | Target list in the CRM. |
2710
+ | `body.entity_type` | `string \| null` | no | default `"contacts"` |
2711
+ | `body.file_import_threshold` | `integer \| null` | no | |
2712
+ | `body.limit` | `integer \| null` | no | Ceiling on records processed. OMIT to take the app's own default (5,000 pulling, 10,000 pushing) rather than freezing a copy of it here. min 1 |
2713
+ | `body.max_parallel` | `integer \| null` | no | Concurrent batches. min 1 |
2714
+ | `body.sync_list_mode` | `string \| null` | no | |
2715
+ | `body.use_file_import` | `boolean \| null` | no | Use the provider's bulk file import instead of the API. |
2716
+
2717
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2718
+
2719
+ Other envelope fields: `pagination` (PaginationMeta).
2720
+
2721
+ `SyncJobResponse` fields:
2722
+
2723
+ | Field | Type | Required | Description |
2724
+ |---|---|---|---|
2725
+ | `job_id` | `string \| null` | no | |
2726
+ | `status` | `string \| null` | no | |
2727
+
2728
+ **Example**
2729
+
2730
+ ```ts
2731
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2732
+ const result = await g8.api.integrations.pushAllContacts({ body: { connection_id: "id" } });
2733
+ ```
2734
+
2735
+ ---
2736
+
2737
+ <a id="op-pushalldeals"></a>
2738
+
2739
+ ### `g8.api.integrations.pushAllDeals(input)`
2740
+
2741
+ **Push All Deals**
2742
+
2743
+ - HTTP: `POST /api/v1/integrations/crm-sync/deals/push`
2744
+ - operationId: `push_all_deals_integrations_crm_sync_deals_push_post` (also callable as `g8.api.call("push_all_deals_integrations_crm_sync_deals_push_post", input)`)
2745
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2746
+ - API-key scope: `integrations:run`
2747
+
2748
+ Push graph8 deals into the CRM as opportunities.
2749
+
2750
+ **Input**
2751
+
2752
+ | Field | Type | Required | Description |
2753
+ |---|---|---|---|
2754
+ | `body` | `PushAllDealsRequest` | yes | Request body; fields below. |
2755
+
2756
+ Body fields (`PushAllDealsRequest`):
2757
+
2758
+ | Field | Type | Required | Description |
2759
+ |---|---|---|---|
2760
+ | `body.connection_id` | `string` | yes | |
2761
+ | `body.chunk_size` | `integer \| null` | no | min 1 |
2762
+ | `body.crm_list_id` | `string \| null` | no | |
2763
+ | `body.limit` | `integer \| null` | no | min 1 |
2764
+ | `body.list_id` | `integer \| null` | no | |
2765
+ | `body.sync_list_mode` | `string \| null` | no | |
2766
+
2767
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2768
+
2769
+ Other envelope fields: `pagination` (PaginationMeta).
2770
+
2771
+ `SyncJobResponse` fields:
2772
+
2773
+ | Field | Type | Required | Description |
2774
+ |---|---|---|---|
2775
+ | `job_id` | `string \| null` | no | |
2776
+ | `status` | `string \| null` | no | |
2777
+
2778
+ **Example**
2779
+
2780
+ ```ts
2781
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2782
+ const result = await g8.api.integrations.pushAllDeals({ body: { connection_id: "id" } });
2783
+ ```
2784
+
2785
+ ---
2786
+
2787
+ <a id="op-pushallleads"></a>
2788
+
2789
+ ### `g8.api.integrations.pushAllLeads(input)`
2790
+
2791
+ **Push All Leads**
2792
+
2793
+ - HTTP: `POST /api/v1/integrations/crm-sync/leads/push`
2794
+ - operationId: `push_all_leads_integrations_crm_sync_leads_push_post` (also callable as `g8.api.call("push_all_leads_integrations_crm_sync_leads_push_post", input)`)
2795
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2796
+ - API-key scope: `integrations:run`
2797
+
2798
+ Push graph8 people into Salesforce as Leads. THIS WRITES TO THEIR SYSTEM.
2799
+
2800
+ Returns a job - the work happens in the background. Poll
2801
+ `GET /integrations/crm-sync/jobs/{job_id}`.
2802
+
2803
+ Over the app's population threshold the JOB is refused unless
2804
+ `large_population_confirmed` is true - the request itself is still a 202,
2805
+ and the refusal is what the job's status reports. Run
2806
+ `POST /integrations/crm-sync/leads/previews` first to learn the count you
2807
+ would be acknowledging.
2808
+
2809
+ **Input**
2810
+
2811
+ | Field | Type | Required | Description |
2812
+ |---|---|---|---|
2813
+ | `body` | `PushAllLeadsRequest` | yes | Request body; fields below. |
2814
+
2815
+ Body fields (`PushAllLeadsRequest`):
2816
+
2817
+ | Field | Type | Required | Description |
2818
+ |---|---|---|---|
2819
+ | `body.connection_id` | `string` | yes | Which CRM connection to push into. |
2820
+ | `body.audience_id` | `integer \| null` | no | graph8 audience for `saved_segment`. |
2821
+ | `body.audience_ids` | `Array<integer> \| null` | no | graph8 audiences for `segments_union`. |
2822
+ | `body.auto_assign_on_create` | `boolean \| null` | no | Run Salesforce's assignment rules on each created lead. |
2823
+ | `body.chunk_size` | `integer \| null` | no | Records per batch. min 1 |
2824
+ | `body.crm_list_id` | `string \| null` | no | Target list in the CRM. |
2825
+ | `body.file_import_threshold` | `integer \| null` | no | Record count above which the file import is used. min 1 |
2826
+ | `body.large_population_confirmed` | `boolean \| null` | no | Acknowledge that this job covers a population large enough that the app asks first. Leave unset to keep that refusal in place; set true ONLY when you have read the preview's record count and accept it. This is a safety interlock, not a tuning option - the records land in the customer's Salesforce and cannot be un-pushed. |
2827
+ | `body.lead_id` | `integer \| null` | no | Push a single graph8 lead row. |
2828
+ | `body.limit` | `integer \| null` | no | Ceiling on records pushed. Omit for the app's default. min 1 |
2829
+ | `body.max_parallel` | `integer \| null` | no | Concurrent batches. min 1 |
2830
+ | `body.salesforce_campaign_id` | `string \| null` | no | Add every pushed lead to this Salesforce Campaign as a CampaignMember. |
2831
+ | `body.source_mode` | `"all_qualified" \| "saved_segment" \| "segments_union" \| "all_contacts" \| null` | no | Which population to push. `saved_segment` REQUIRES `audience_id`; `segments_union` REQUIRES `audience_ids`. Omit for the app's default (`all_qualified`). |
2832
+ | `body.status_qualified` | `string \| null` | no | Salesforce `Lead.Status` API name to set on qualified leads. Read the valid values from `/integrations/crm-sync/leads/statuses` - Lead.Status is an OPEN picklist, so Salesforce stores whatever is sent and an invented value silently becomes a real status. |
2833
+ | `body.status_unqualified` | `string \| null` | no | Salesforce `Lead.Status` API name for unqualified leads. |
2834
+ | `body.sync_list_mode` | `"no_list" \| "new_list" \| "existing_list" \| null` | no | `no_list` (the app's default), `new_list` or `existing_list`. Sending `crm_list_id` with no mode implies `existing_list`. |
2835
+ | `body.use_file_import` | `boolean \| null` | no | Use the provider's bulk file import instead of the API. |
2836
+
2837
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2838
+
2839
+ Other envelope fields: `pagination` (PaginationMeta).
2840
+
2841
+ `SyncJobResponse` fields:
2842
+
2843
+ | Field | Type | Required | Description |
2844
+ |---|---|---|---|
2845
+ | `job_id` | `string \| null` | no | |
2846
+ | `status` | `string \| null` | no | |
2847
+
2848
+ **Example**
2849
+
2850
+ ```ts
2851
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2852
+ const result = await g8.api.integrations.pushAllLeads({ body: { connection_id: "id" } });
2853
+ ```
2854
+
2855
+ ---
2856
+
2857
+ <a id="op-pushaudience"></a>
2858
+
2859
+ ### `g8.api.integrations.pushAudience(input)`
2860
+
2861
+ **Push Audience**
2862
+
2863
+ - HTTP: `POST /api/v1/integrations/crm-sync/push`
2864
+ - operationId: `push_audience_integrations_crm_sync_push_post` (also callable as `g8.api.call("push_audience_integrations_crm_sync_push_post", input)`)
2865
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2866
+ - API-key scope: `integrations:run`
2867
+
2868
+ Push ONE audience rather than everything.
2869
+
2870
+ The narrow version of `/contacts/push`, and the one to reach for first: it
2871
+ bounds what lands in the customer's CRM to a list they chose.
2872
+
2873
+ **Input**
2874
+
2875
+ | Field | Type | Required | Description |
2876
+ |---|---|---|---|
2877
+ | `body` | `PushAudienceRequest` | yes | Request body; fields below. |
2878
+
2879
+ Body fields (`PushAudienceRequest`):
2880
+
2881
+ | Field | Type | Required | Description |
2882
+ |---|---|---|---|
2883
+ | `body.connection_id` | `string` | yes | Which CRM connection to run against. |
2884
+ | `body.audience_id` | `integer \| null` | no | graph8 audience to push. |
2885
+ | `body.chunk_size` | `integer \| null` | no | Records per batch. min 1 |
2886
+ | `body.crm_list_id` | `string \| null` | no | |
2887
+ | `body.entity_type` | `string \| null` | no | |
2888
+ | `body.file_import_threshold` | `integer \| null` | no | |
2889
+ | `body.limit` | `integer \| null` | no | Ceiling on records processed. OMIT to take the app's own default (5,000 pulling, 10,000 pushing) rather than freezing a copy of it here. min 1 |
2890
+ | `body.max_parallel` | `integer \| null` | no | Concurrent batches. min 1 |
2891
+ | `body.reconcile` | `boolean \| null` | no | Reconcile against what is already in the CRM first. |
2892
+ | `body.use_file_import` | `boolean \| null` | no | |
2893
+
2894
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2895
+
2896
+ Other envelope fields: `pagination` (PaginationMeta).
2897
+
2898
+ `SyncJobResponse` fields:
2899
+
2900
+ | Field | Type | Required | Description |
2901
+ |---|---|---|---|
2902
+ | `job_id` | `string \| null` | no | |
2903
+ | `status` | `string \| null` | no | |
2904
+
2905
+ **Example**
2906
+
2907
+ ```ts
2908
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2909
+ const result = await g8.api.integrations.pushAudience({ body: { connection_id: "id" } });
2910
+ ```
2911
+
2912
+ ---
2913
+
2914
+ <a id="op-reconnectsugarcrm"></a>
2915
+
2916
+ ### `g8.api.integrations.reconnectSugarcrm(input)`
2917
+
2918
+ **Reconnect Sugarcrm**
2919
+
2920
+ - HTTP: `POST /api/v1/integrations/sugarcrm/reconnect`
2921
+ - operationId: `reconnect_sugarcrm_integrations_sugarcrm_reconnect_post` (also callable as `g8.api.call("reconnect_sugarcrm_integrations_sugarcrm_reconnect_post", input)`)
2922
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2923
+ - API-key scope: `integrations:run`
2924
+
2925
+ Replace the stored SugarCRM credentials (or connect, if none exist).
2926
+
2927
+ Authenticates with the NEW credentials before saving them, so a typo
2928
+ leaves the working connection in place.
2929
+
2930
+ **Input**
2931
+
2932
+ | Field | Type | Required | Description |
2933
+ |---|---|---|---|
2934
+ | `body` | `SugarCrmConnectRequest` | yes | Request body; fields below. |
2935
+
2936
+ Body fields (`SugarCrmConnectRequest`):
2937
+
2938
+ | Field | Type | Required | Description |
2939
+ |---|---|---|---|
2940
+ | `body.instance_url` | `string` | yes | Your SugarCRM instance, e.g. https://acme.sugarondemand.com. |
2941
+ | `body.password` | `string` | yes | |
2942
+ | `body.username` | `string` | yes | |
2943
+ | `body.client_id` | `string` | no | OAuth client id configured in SugarCRM. default `"sugar"` |
2944
+ | `body.client_secret` | `string` | no | OAuth client secret, if your client id has one. default `""` |
2945
+
2946
+ **Returns** `ApiResponse_IntegrationOpPayload_`: the envelope `{ data: IntegrationOpPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2947
+
2948
+ Other envelope fields: `pagination` (PaginationMeta).
2949
+
2950
+ **Example**
2951
+
2952
+ ```ts
2953
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
2954
+ const result = await g8.api.integrations.reconnectSugarcrm({
2955
+ body: {
2956
+ instance_url: "https://example.com",
2957
+ password: "example",
2958
+ username: "Example",
2959
+ },
2960
+ });
2961
+ ```
2962
+
2963
+ ---
2964
+
2965
+ <a id="op-registeruploadedvideoasset"></a>
2966
+
2967
+ ### `g8.api.integrations.registerUploadedVideoAsset(input)`
2968
+
2969
+ **Register Uploaded Video Asset**
2970
+
2971
+ - HTTP: `POST /api/v1/audience-syncs/google/video-assets/uploads`
2972
+ - operationId: `register_uploaded_video_asset_audience_syncs_google_video_assets_uploads_post` (also callable as `g8.api.call("register_uploaded_video_asset_audience_syncs_google_video_assets_uploads_post", input)`)
2973
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
2974
+ - API-key scope: `integrations:run`
2975
+
2976
+ Step 2 of 2: register the uploaded file for the YouTube upload worker.
2977
+
2978
+ The object is re-checked server-side (size and type) before it is queued.
2979
+ 202: YouTube processing happens afterwards - poll
2980
+ `GET /audience-syncs/google/video-assets/{asset_id}` until it is usable.
2981
+ Rate limited to 30 per minute per org.
2982
+
2983
+ **Input**
2984
+
2985
+ | Field | Type | Required | Description |
2986
+ |---|---|---|---|
2987
+ | `body` | `RegisterVideoAssetRequest` | yes | Request body; fields below. |
2988
+
2989
+ Body fields (`RegisterVideoAssetRequest`):
2990
+
2991
+ | Field | Type | Required | Description |
2992
+ |---|---|---|---|
2993
+ | `body.key` | `string` | yes | min length 1, max length 512 |
2994
+ | `body.duration_s` | `integer \| null` | no | min 0 |
2995
+ | `body.height` | `integer \| null` | no | min 0 |
2996
+ | `body.source` | `string` | no | upload \| studio default `"upload"` |
2997
+ | `body.title` | `string \| null` | no | default `""`, max length 255 |
2998
+ | `body.width` | `integer \| null` | no | min 0 |
2999
+
3000
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3001
+
3002
+ Other envelope fields: `pagination` (PaginationMeta).
3003
+
3004
+ **Example**
3005
+
3006
+ ```ts
3007
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3008
+ const result = await g8.api.integrations.registerUploadedVideoAsset({ body: { key: "example" } });
3009
+ ```
3010
+
3011
+ ---
3012
+
3013
+ <a id="op-registervideoassetfromlibrary"></a>
3014
+
3015
+ ### `g8.api.integrations.registerVideoAssetFromLibrary(input)`
3016
+
3017
+ **Register Video Asset From Library**
3018
+
3019
+ - HTTP: `POST /api/v1/audience-syncs/google/video-assets/library`
3020
+ - operationId: `register_video_asset_from_library_audience_syncs_google_video_assets_library_post` (also callable as `g8.api.call("register_video_asset_from_library_audience_syncs_google_video_assets_library_post", input)`)
3021
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3022
+ - API-key scope: `integrations:run`
3023
+
3024
+ Queue a Studio library video for upload to YouTube.
3025
+
3026
+ 202: the upload to YouTube happens in a worker afterwards, so the asset is
3027
+ not usable in a campaign the moment this returns. Poll
3028
+ `GET /audience-syncs/google/video-assets/{asset_id}`.
3029
+
3030
+ Rate limited to 30 per minute per org by the app's own limiter.
3031
+
3032
+ **Input**
3033
+
3034
+ | Field | Type | Required | Description |
3035
+ |---|---|---|---|
3036
+ | `body` | `RegisterLibraryVideoAssetRequest` | yes | Request body; fields below. |
3037
+
3038
+ Body fields (`RegisterLibraryVideoAssetRequest`):
3039
+
3040
+ | Field | Type | Required | Description |
3041
+ |---|---|---|---|
3042
+ | `body.org_video_id` | `string` | yes | min length 1, max length 64 |
3043
+
3044
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3045
+
3046
+ Other envelope fields: `pagination` (PaginationMeta).
3047
+
3048
+ **Example**
3049
+
3050
+ ```ts
3051
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3052
+ const result = await g8.api.integrations.registerVideoAssetFromLibrary({ body: { org_video_id: "id" } });
3053
+ ```
3054
+
3055
+ ---
3056
+
3057
+ <a id="op-registervideoassetfromlink"></a>
3058
+
3059
+ ### `g8.api.integrations.registerVideoAssetFromLink(input)`
3060
+
3061
+ **Register Video Asset From Link**
3062
+
3063
+ - HTTP: `POST /api/v1/audience-syncs/google/video-assets/links`
3064
+ - operationId: `register_video_asset_from_link_audience_syncs_google_video_assets_links_post` (also callable as `g8.api.call("register_video_asset_from_link_audience_syncs_google_video_assets_links_post", input)`)
3065
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3066
+ - API-key scope: `integrations:run`
3067
+
3068
+ Register a YouTube video by URL.
3069
+
3070
+ The URL is validated against YouTube, so a private or deleted video is
3071
+ refused here rather than at launch. Rate limited to 20 per minute per org
3072
+ by the app's own limiter, per org - over it, a 429.
3073
+
3074
+ **Input**
3075
+
3076
+ | Field | Type | Required | Description |
3077
+ |---|---|---|---|
3078
+ | `body` | `CreateVideoAssetFromLinkRequest` | yes | Request body; fields below. |
3079
+
3080
+ Body fields (`CreateVideoAssetFromLinkRequest`):
3081
+
3082
+ | Field | Type | Required | Description |
3083
+ |---|---|---|---|
3084
+ | `body.url` | `string` | yes | min length 1, max length 2000 |
3085
+
3086
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3087
+
3088
+ Other envelope fields: `pagination` (PaginationMeta).
3089
+
3090
+ **Example**
3091
+
3092
+ ```ts
3093
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3094
+ const result = await g8.api.integrations.registerVideoAssetFromLink({ body: { url: "https://example.com" } });
3095
+ ```
3096
+
3097
+ ---
3098
+
3099
+ <a id="op-saveconnection"></a>
3100
+
3101
+ ### `g8.api.integrations.saveConnection(input)`
3102
+
3103
+ **Save Connection**
3104
+
3105
+ - HTTP: `POST /api/v1/integrations/connections`
3106
+ - operationId: `save_connection_integrations_connections_post` (also callable as `g8.api.call("save_connection_integrations_connections_post", input)`)
3107
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3108
+ - API-key scope: `integrations:run`
3109
+
3110
+ Record a connection the OAuth flow has already established.
3111
+
3112
+ This does NOT perform the handshake - the hosted flow does, and this stores
3113
+ its result. `connection_id` is the id that flow returned, not one you
3114
+ choose.
3115
+
3116
+ **Input**
3117
+
3118
+ | Field | Type | Required | Description |
3119
+ |---|---|---|---|
3120
+ | `body` | `SaveConnectionRequest` | yes | Request body; fields below. |
3121
+
3122
+ Body fields (`SaveConnectionRequest`):
3123
+
3124
+ | Field | Type | Required | Description |
3125
+ |---|---|---|---|
3126
+ | `body.connection_id` | `string` | yes | The id the OAuth flow returned. |
3127
+ | `body.provider` | `string` | yes | Stable graph8 provider name. |
3128
+ | `body.provider_config_key` | `string` | yes | Provider config key. |
3129
+ | `body.connection_config` | `Record<string, string>` | no | Provider-specific configuration captured during the flow. |
3130
+
3131
+ **Returns** `ApiResponse_ConnectionPayload_`: the envelope `{ data: ConnectionPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3132
+
3133
+ Other envelope fields: `pagination` (PaginationMeta).
3134
+
3135
+ **Example**
3136
+
3137
+ ```ts
3138
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3139
+ const result = await g8.api.integrations.saveConnection({
3140
+ body: {
3141
+ connection_id: "id",
3142
+ provider: "example",
3143
+ provider_config_key: "example",
3144
+ },
3145
+ });
3146
+ ```
3147
+
3148
+ ---
3149
+
3150
+ <a id="op-setpullsyncenabled"></a>
3151
+
3152
+ ### `g8.api.integrations.setPullSyncEnabled(input)`
3153
+
3154
+ **Set Pull Sync Enabled**
3155
+
3156
+ - HTTP: `PUT /api/v1/integrations/crm-sync/pull-enabled`
3157
+ - operationId: `set_pull_sync_enabled_integrations_crm_sync_pull_enabled_put` (also callable as `g8.api.call("set_pull_sync_enabled_integrations_crm_sync_pull_enabled_put", input)`)
3158
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3159
+ - API-key scope: `integrations:run`
3160
+
3161
+ Turn continuous PULL on or off for a connection.
3162
+
3163
+ **Input**
3164
+
3165
+ | Field | Type | Required | Description |
3166
+ |---|---|---|---|
3167
+ | `body` | `SyncEnabledRequest` | yes | Request body; fields below. |
3168
+
3169
+ Body fields (`SyncEnabledRequest`):
3170
+
3171
+ | Field | Type | Required | Description |
3172
+ |---|---|---|---|
3173
+ | `body.connection_id` | `string` | yes | Which CRM connection. |
3174
+ | `body.enabled` | `boolean` | yes | Explicit, not a toggle - a retried request is then idempotent. |
3175
+
3176
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3177
+
3178
+ Other envelope fields: `pagination` (PaginationMeta).
3179
+
3180
+ `SyncJobResponse` fields:
3181
+
3182
+ | Field | Type | Required | Description |
3183
+ |---|---|---|---|
3184
+ | `job_id` | `string \| null` | no | |
3185
+ | `status` | `string \| null` | no | |
3186
+
3187
+ **Example**
3188
+
3189
+ ```ts
3190
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3191
+ const result = await g8.api.integrations.setPullSyncEnabled({ body: { connection_id: "id", enabled: true } });
3192
+ ```
3193
+
3194
+ ---
3195
+
3196
+ <a id="op-setpushsyncenabled"></a>
3197
+
3198
+ ### `g8.api.integrations.setPushSyncEnabled(input)`
3199
+
3200
+ **Set Push Sync Enabled**
3201
+
3202
+ - HTTP: `PUT /api/v1/integrations/crm-sync/push-enabled`
3203
+ - operationId: `set_push_sync_enabled_integrations_crm_sync_push_enabled_put` (also callable as `g8.api.call("set_push_sync_enabled_integrations_crm_sync_push_enabled_put", input)`)
3204
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3205
+ - API-key scope: `integrations:run`
3206
+
3207
+ Turn continuous PUSH on or off for a connection.
3208
+
3209
+ `enabled` is explicit rather than a toggle, so a retried request is
3210
+ idempotent instead of flipping the state back.
3211
+
3212
+ **Input**
3213
+
3214
+ | Field | Type | Required | Description |
3215
+ |---|---|---|---|
3216
+ | `body` | `SyncEnabledRequest` | yes | Request body; fields below. |
3217
+
3218
+ Body fields (`SyncEnabledRequest`):
3219
+
3220
+ | Field | Type | Required | Description |
3221
+ |---|---|---|---|
3222
+ | `body.connection_id` | `string` | yes | Which CRM connection. |
3223
+ | `body.enabled` | `boolean` | yes | Explicit, not a toggle - a retried request is then idempotent. |
3224
+
3225
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3226
+
3227
+ Other envelope fields: `pagination` (PaginationMeta).
3228
+
3229
+ `SyncJobResponse` fields:
3230
+
3231
+ | Field | Type | Required | Description |
3232
+ |---|---|---|---|
3233
+ | `job_id` | `string \| null` | no | |
3234
+ | `status` | `string \| null` | no | |
3235
+
3236
+ **Example**
3237
+
3238
+ ```ts
3239
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3240
+ const result = await g8.api.integrations.setPushSyncEnabled({ body: { connection_id: "id", enabled: true } });
3241
+ ```
3242
+
3243
+ ---
3244
+
3245
+ <a id="op-startdeltasync"></a>
3246
+
3247
+ ### `g8.api.integrations.startDeltaSync(input)`
3248
+
3249
+ **Start Delta Sync**
3250
+
3251
+ - HTTP: `POST /api/v1/integrations/migrations/delta-sync`
3252
+ - operationId: `start_delta_sync_integrations_migrations_delta_sync_post` (also callable as `g8.api.call("start_delta_sync_integrations_migrations_delta_sync_post", input)`)
3253
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3254
+ - API-key scope: `integrations:run`
3255
+
3256
+ Import only what changed since a watermark.
3257
+
3258
+ OMIT `since` unless you have a reason: the app picks the last successful
3259
+ watermark, which is both what you usually want and safer than guessing.
3260
+ The response echoes back the watermark actually used, so read it rather
3261
+ than assuming yours was accepted.
3262
+
3263
+ Org admin, matching the app.
3264
+
3265
+ **Input**
3266
+
3267
+ | Field | Type | Required | Description |
3268
+ |---|---|---|---|
3269
+ | `body` | `DeltaSyncRequest` | yes | Request body; fields below. |
3270
+
3271
+ Body fields (`DeltaSyncRequest`):
3272
+
3273
+ | Field | Type | Required | Description |
3274
+ |---|---|---|---|
3275
+ | `body.connection_id` | `string` | yes | |
3276
+ | `body.entity_types` | `Array<string> \| null` | no | Limit to these entity types. Omit for all. |
3277
+ | `body.recover_missing` | `boolean` | no | Also re-fetch records the previous run should have imported and did not. Slower, and the reason to use it is a suspected gap rather than routine. default `false` |
3278
+ | `body.since` | `string \| null` | no | ISO 8601 timestamp. Omit and the app picks the last successful watermark - which is usually what you want, and always safer than guessing one. |
3279
+
3280
+ **Returns** `ApiResponse_ConnectionPayload_`: the envelope `{ data: ConnectionPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3281
+
3282
+ Other envelope fields: `pagination` (PaginationMeta).
3283
+
3284
+ **Example**
3285
+
3286
+ ```ts
3287
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3288
+ const result = await g8.api.integrations.startDeltaSync({ body: { connection_id: "id" } });
3289
+ ```
3290
+
3291
+ ---
3292
+
3293
+ <a id="op-startleadpreview"></a>
3294
+
3295
+ ### `g8.api.integrations.startLeadPreview(input)`
3296
+
3297
+ **Start Lead Preview**
3298
+
3299
+ - HTTP: `POST /api/v1/integrations/crm-sync/leads/previews`
3300
+ - operationId: `start_lead_preview_integrations_crm_sync_leads_previews_post` (also callable as `g8.api.call("start_lead_preview_integrations_crm_sync_leads_previews_post", input)`)
3301
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3302
+ - API-key scope: `integrations:run`
3303
+
3304
+ Queue a readiness preview and return a job id immediately.
3305
+
3306
+ Nothing is written to the CRM. Poll
3307
+ `GET /integrations/crm-sync/jobs/{job_id}` for the result, which carries
3308
+ the record count `large_population_confirmed` exists to acknowledge.
3309
+
3310
+ **Input**
3311
+
3312
+ | Field | Type | Required | Description |
3313
+ |---|---|---|---|
3314
+ | `body` | `LeadPreviewRequest` | yes | Request body; fields below. |
3315
+
3316
+ Body fields (`LeadPreviewRequest`):
3317
+
3318
+ | Field | Type | Required | Description |
3319
+ |---|---|---|---|
3320
+ | `body.connection_id` | `string` | yes | Which CRM connection to preview against. |
3321
+ | `body.audience_id` | `integer \| null` | no | |
3322
+ | `body.audience_ids` | `Array<integer> \| null` | no | |
3323
+ | `body.large_population_confirmed` | `boolean \| null` | no | Acknowledge that this job covers a population large enough that the app asks first. Leave unset to keep that refusal in place; set true ONLY when you have read the preview's record count and accept it. This is a safety interlock, not a tuning option - the records land in the customer's Salesforce and cannot be un-pushed. |
3324
+ | `body.page_size` | `integer \| null` | no | Rows scanned per page while previewing. Omit for the app's default. min 100, max 10000 |
3325
+ | `body.source_mode` | `"all_qualified" \| "saved_segment" \| "segments_union" \| "all_contacts" \| null` | no | Which population to preview. `saved_segment` REQUIRES `audience_id`; `segments_union` REQUIRES `audience_ids`. |
3326
+ | `body.status_qualified` | `string \| null` | no | |
3327
+ | `body.status_unqualified` | `string \| null` | no | |
3328
+
3329
+ **Returns** `ApiResponse_SyncJobResponse_`: the envelope `{ data: SyncJobResponse, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3330
+
3331
+ Other envelope fields: `pagination` (PaginationMeta).
3332
+
3333
+ `SyncJobResponse` fields:
3334
+
3335
+ | Field | Type | Required | Description |
3336
+ |---|---|---|---|
3337
+ | `job_id` | `string \| null` | no | |
3338
+ | `status` | `string \| null` | no | |
3339
+
3340
+ **Example**
3341
+
3342
+ ```ts
3343
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3344
+ const result = await g8.api.integrations.startLeadPreview({ body: { connection_id: "id" } });
3345
+ ```
3346
+
3347
+ ---
3348
+
3349
+ <a id="op-startmigrationdiscovery"></a>
3350
+
3351
+ ### `g8.api.integrations.startMigrationDiscovery(input)`
3352
+
3353
+ **Start Migration Discovery**
3354
+
3355
+ - HTTP: `POST /api/v1/integrations/migrations/discovery`
3356
+ - operationId: `start_migration_discovery_integrations_migrations_discovery_post` (also callable as `g8.api.call("start_migration_discovery_integrations_migrations_discovery_post", input)`)
3357
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3358
+ - API-key scope: `integrations:run`
3359
+
3360
+ Look at what is in the CRM. WRITES NOTHING to graph8.
3361
+
3362
+ Counts records, reads the field and pipeline shape, and proposes mappings.
3363
+ Poll `GET /integrations/migrations/{migration_id}` for the result, then
3364
+ accept it with `/confirm`.
3365
+
3366
+ Org admin, matching the app.
3367
+
3368
+ **Input**
3369
+
3370
+ | Field | Type | Required | Description |
3371
+ |---|---|---|---|
3372
+ | `body` | `StartDiscoveryRequest` | yes | Request body; fields below. |
3373
+
3374
+ Body fields (`StartDiscoveryRequest`):
3375
+
3376
+ | Field | Type | Required | Description |
3377
+ |---|---|---|---|
3378
+ | `body.connection_id` | `string` | yes | |
3379
+ | `body.crm_type` | `string` | no | Which CRM. The app's default is `hubspot`. default `"hubspot"` |
3380
+
3381
+ **Returns** `ApiResponse_ConnectionPayload_`: the envelope `{ data: ConnectionPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3382
+
3383
+ Other envelope fields: `pagination` (PaginationMeta).
3384
+
3385
+ **Example**
3386
+
3387
+ ```ts
3388
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3389
+ const result = await g8.api.integrations.startMigrationDiscovery({ body: { connection_id: "id" } });
3390
+ ```
3391
+
3392
+ ---
3393
+
3394
+ <a id="op-updatecrmcompany"></a>
3395
+
3396
+ ### `g8.api.integrations.updateCrmCompany(input)`
3397
+
3398
+ **Update Crm Company**
3399
+
3400
+ - HTTP: `PUT /api/v1/integrations/crm/connections/{connection_id}/companies/{company_id}`
3401
+ - operationId: `update_crm_company_integrations_crm_connections__connection_id__companies__company_id__put` (also callable as `g8.api.call("update_crm_company_integrations_crm_connections__connection_id__companies__company_id__put", input)`)
3402
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3403
+ - API-key scope: `integrations:run`
3404
+
3405
+ Partially update a CRM company. Omitted fields are left alone.
3406
+
3407
+ **Input**
3408
+
3409
+ | Field | Type | Required | Description |
3410
+ |---|---|---|---|
3411
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
3412
+ | `path.company_id` | `string` | yes | |
3413
+ | `body` | `CrmCompanyUpdateRequest` | yes | Request body; fields below. |
3414
+
3415
+ Body fields (`CrmCompanyUpdateRequest`):
3416
+
3417
+ | Field | Type | Required | Description |
3418
+ |---|---|---|---|
3419
+ | `body.address` | `CrmAddress \| null` | no | |
3420
+ | `body.annual_revenue` | `number \| null` | no | |
3421
+ | `body.custom_fields` | `Array<CrmCustomField> \| null` | no | |
3422
+ | `body.domain` | `string \| null` | no | |
3423
+ | `body.employee_count` | `integer \| null` | no | |
3424
+ | `body.industry` | `string \| null` | no | |
3425
+ | `body.name` | `string \| null` | no | |
3426
+ | `body.phone` | `string \| null` | no | |
3427
+ | `body.website` | `string \| null` | no | |
3428
+
3429
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3430
+
3431
+ Other envelope fields: `pagination` (PaginationMeta).
3432
+
3433
+ **Example**
3434
+
3435
+ ```ts
3436
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3437
+ const result = await g8.api.integrations.updateCrmCompany({ path: { connection_id: "id", company_id: "id" }, body: {} });
3438
+ ```
3439
+
3440
+ ---
3441
+
3442
+ <a id="op-updatecrmcontact"></a>
3443
+
3444
+ ### `g8.api.integrations.updateCrmContact(input)`
3445
+
3446
+ **Update Crm Contact**
3447
+
3448
+ - HTTP: `PUT /api/v1/integrations/crm/connections/{connection_id}/contacts/{contact_id}`
3449
+ - operationId: `update_crm_contact_integrations_crm_connections__connection_id__contacts__contact_id__put` (also callable as `g8.api.call("update_crm_contact_integrations_crm_connections__connection_id__contacts__contact_id__put", input)`)
3450
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3451
+ - API-key scope: `integrations:run`
3452
+
3453
+ Partially update a CRM contact. Omitted fields are left alone.
3454
+
3455
+ Sending `emails: []` REPLACES the addresses with none; omitting `emails`
3456
+ leaves them. The difference is the reason this is not a PATCH-shaped
3457
+ merge - the app's model distinguishes "absent" from "empty" and so does
3458
+ this one.
3459
+
3460
+ **Input**
3461
+
3462
+ | Field | Type | Required | Description |
3463
+ |---|---|---|---|
3464
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
3465
+ | `path.contact_id` | `string` | yes | |
3466
+ | `body` | `CrmContactUpdateRequest` | yes | Request body; fields below. |
3467
+
3468
+ Body fields (`CrmContactUpdateRequest`):
3469
+
3470
+ | Field | Type | Required | Description |
3471
+ |---|---|---|---|
3472
+ | `body.address` | `CrmAddress \| null` | no | |
3473
+ | `body.company_id` | `string \| null` | no | |
3474
+ | `body.company_name` | `string \| null` | no | |
3475
+ | `body.custom_fields` | `Array<CrmCustomField> \| null` | no | |
3476
+ | `body.emails` | `Array<CrmEmail> \| null` | no | |
3477
+ | `body.first_name` | `string \| null` | no | |
3478
+ | `body.is_active` | `boolean \| null` | no | |
3479
+ | `body.last_name` | `string \| null` | no | |
3480
+ | `body.name` | `string \| null` | no | |
3481
+ | `body.phones` | `Array<CrmPhone> \| null` | no | |
3482
+ | `body.tags` | `Array<string> \| null` | no | |
3483
+ | `body.title` | `string \| null` | no | |
3484
+ | `body.user_id` | `string \| null` | no | |
3485
+
3486
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3487
+
3488
+ Other envelope fields: `pagination` (PaginationMeta).
3489
+
3490
+ **Example**
3491
+
3492
+ ```ts
3493
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3494
+ const result = await g8.api.integrations.updateCrmContact({ path: { connection_id: "id", contact_id: "id" }, body: {} });
3495
+ ```
3496
+
3497
+ ---
3498
+
3499
+ <a id="op-updatecrmdeal"></a>
3500
+
3501
+ ### `g8.api.integrations.updateCrmDeal(input)`
3502
+
3503
+ **Update Crm Deal**
3504
+
3505
+ - HTTP: `PUT /api/v1/integrations/crm/connections/{connection_id}/deals/{deal_id}`
3506
+ - operationId: `update_crm_deal_integrations_crm_connections__connection_id__deals__deal_id__put` (also callable as `g8.api.call("update_crm_deal_integrations_crm_connections__connection_id__deals__deal_id__put", input)`)
3507
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3508
+ - API-key scope: `integrations:run`
3509
+
3510
+ Partially update a CRM deal. Omitted fields are left alone.
3511
+
3512
+ Moving `stage` is what closes a deal in most CRMs, and it can fire that
3513
+ provider's own workflows and notifications.
3514
+
3515
+ **Input**
3516
+
3517
+ | Field | Type | Required | Description |
3518
+ |---|---|---|---|
3519
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
3520
+ | `path.deal_id` | `string` | yes | |
3521
+ | `body` | `CrmDealUpdateRequest` | yes | Request body; fields below. |
3522
+
3523
+ Body fields (`CrmDealUpdateRequest`):
3524
+
3525
+ | Field | Type | Required | Description |
3526
+ |---|---|---|---|
3527
+ | `body.amount` | `number \| null` | no | |
3528
+ | `body.close_date` | `string \| null` | no | |
3529
+ | `body.company_id` | `string \| null` | no | |
3530
+ | `body.contact_id` | `string \| null` | no | |
3531
+ | `body.custom_fields` | `Array<CrmCustomField> \| null` | no | |
3532
+ | `body.description` | `string \| null` | no | |
3533
+ | `body.name` | `string \| null` | no | |
3534
+ | `body.probability` | `number \| null` | no | |
3535
+ | `body.stage` | `string \| null` | no | |
3536
+ | `body.type` | `string \| null` | no | |
3537
+ | `body.user_id` | `string \| null` | no | |
3538
+
3539
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3540
+
3541
+ Other envelope fields: `pagination` (PaginationMeta).
3542
+
3543
+ **Example**
3544
+
3545
+ ```ts
3546
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3547
+ const result = await g8.api.integrations.updateCrmDeal({ path: { connection_id: "id", deal_id: "id" }, body: {} });
3548
+ ```
3549
+
3550
+ ---
3551
+
3552
+ <a id="op-updatecrmlead"></a>
3553
+
3554
+ ### `g8.api.integrations.updateCrmLead(input)`
3555
+
3556
+ **Update Crm Lead**
3557
+
3558
+ - HTTP: `PUT /api/v1/integrations/crm/connections/{connection_id}/leads/{lead_id}`
3559
+ - operationId: `update_crm_lead_integrations_crm_connections__connection_id__leads__lead_id__put` (also callable as `g8.api.call("update_crm_lead_integrations_crm_connections__connection_id__leads__lead_id__put", input)`)
3560
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3561
+ - API-key scope: `integrations:run`
3562
+
3563
+ Partially update a Salesforce Lead. Omitted fields are left alone.
3564
+
3565
+ **Input**
3566
+
3567
+ | Field | Type | Required | Description |
3568
+ |---|---|---|---|
3569
+ | `path.connection_id` | `string` | yes | The CRM connection to act through. |
3570
+ | `path.lead_id` | `string` | yes | |
3571
+ | `body` | `LeadUpdateRequest` | yes | Request body; fields below. |
3572
+
3573
+ Body fields (`LeadUpdateRequest`):
3574
+
3575
+ | Field | Type | Required | Description |
3576
+ |---|---|---|---|
3577
+ | `body.address` | `CrmAddress \| null` | no | |
3578
+ | `body.annual_revenue` | `number \| null` | no | |
3579
+ | `body.company` | `string \| null` | no | |
3580
+ | `body.custom_fields` | `Array<CrmCustomField> \| null` | no | |
3581
+ | `body.email` | `string \| null` | no | |
3582
+ | `body.employee_count` | `integer \| null` | no | |
3583
+ | `body.first_name` | `string \| null` | no | |
3584
+ | `body.industry` | `string \| null` | no | |
3585
+ | `body.last_name` | `string \| null` | no | |
3586
+ | `body.lead_source` | `string \| null` | no | |
3587
+ | `body.phone` | `string \| null` | no | |
3588
+ | `body.status` | `string \| null` | no | |
3589
+ | `body.title` | `string \| null` | no | |
3590
+ | `body.user_id` | `string \| null` | no | |
3591
+ | `body.website` | `string \| null` | no | |
3592
+
3593
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3594
+
3595
+ Other envelope fields: `pagination` (PaginationMeta).
3596
+
3597
+ **Example**
3598
+
3599
+ ```ts
3600
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3601
+ const result = await g8.api.integrations.updateCrmLead({ path: { connection_id: "id", lead_id: "id" }, body: {} });
3602
+ ```
3603
+
3604
+ ---
3605
+
3606
+ <a id="op-updatecrmmeeting"></a>
3607
+
3608
+ ### `g8.api.integrations.updateCrmMeeting(input)`
3609
+
3610
+ **Update Crm Meeting**
3611
+
3612
+ - HTTP: `PATCH /api/v1/integrations/crm/meetings/{event_id}`
3613
+ - operationId: `update_crm_meeting_integrations_crm_meetings__event_id__patch` (also callable as `g8.api.call("update_crm_meeting_integrations_crm_meetings__event_id__patch", input)`)
3614
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3615
+ - API-key scope: `integrations:run`
3616
+
3617
+ Partially update a CRM meeting.
3618
+
3619
+ **Input**
3620
+
3621
+ | Field | Type | Required | Description |
3622
+ |---|---|---|---|
3623
+ | `path.event_id` | `string` | yes | The CRM's event id. |
3624
+ | `query.connection_id` | `string` | yes | |
3625
+ | `body` | `UpdateMeetingRequest` | yes | Request body; fields below. |
3626
+
3627
+ Body fields (`UpdateMeetingRequest`):
3628
+
3629
+ | Field | Type | Required | Description |
3630
+ |---|---|---|---|
3631
+ | `body.company_ids` | `Array<string> \| null` | no | |
3632
+ | `body.contact_ids` | `Array<string> \| null` | no | |
3633
+ | `body.deal_ids` | `Array<string> \| null` | no | |
3634
+ | `body.description` | `string \| null` | no | |
3635
+ | `body.end_at` | `string \| null` | no | |
3636
+ | `body.location` | `string \| null` | no | |
3637
+ | `body.start_at` | `string \| null` | no | |
3638
+ | `body.title` | `string \| null` | no | |
3639
+ | `body.user_id` | `string \| null` | no | |
3640
+
3641
+ **Returns** `ApiResponse_CrmPayload_`: the envelope `{ data: CrmPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3642
+
3643
+ Other envelope fields: `pagination` (PaginationMeta).
3644
+
3645
+ **Example**
3646
+
3647
+ ```ts
3648
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3649
+ const result = await g8.api.integrations.updateCrmMeeting({ path: { event_id: "id" }, query: { connection_id: "id" }, body: {} });
3650
+ ```
3651
+
3652
+ ---
3653
+
3654
+ <a id="op-uploadgoogleconversions"></a>
3655
+
3656
+ ### `g8.api.integrations.uploadGoogleConversions(input?)`
3657
+
3658
+ **Upload Google Conversions**
3659
+
3660
+ - HTTP: `POST /api/v1/audience-syncs/google/conversions`
3661
+ - operationId: `upload_google_conversions_audience_syncs_google_conversions_post` (also callable as `g8.api.call("upload_google_conversions_audience_syncs_google_conversions_post", input)`)
3662
+ - Tier: `external`: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first
3663
+ - API-key scope: `integrations:run`
3664
+
3665
+ Upload offline conversions to Google Ads.
3666
+
3667
+ IRREVERSIBLE once `dry_run=false`: a conversion recorded against the wrong
3668
+ action cannot be unrecorded, and Smart Bidding immediately starts
3669
+ optimising the customer's budget against it. The safe default and the
3670
+ `validate_only` middle step are both preserved from the app rather than
3671
+ flattened into "do the thing".
3672
+
3673
+ **Input**
3674
+
3675
+ | Field | Type | Required | Description |
3676
+ |---|---|---|---|
3677
+ | `query.ad_account_id` | `string \| null` | no | |
3678
+ | `query.dry_run` | `boolean` | no | TRUE BY DEFAULT, and deliberately. The batch is built and NOTHING is sent to Google. Read the result, then send `false`. default `true` |
3679
+ | `query.validate_only` | `boolean` | no | With `dry_run=false`, ask Google to VALIDATE the batch without recording it. The middle step between a local preview and a real upload - it catches what only Google can tell you. default `false` |
3680
+ | `query.limit` | `integer` | no | Conversions per call. default `200` |
3681
+
3682
+ **Returns** `ApiResponse_AdPayload_`: the envelope `{ data: AdPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3683
+
3684
+ Other envelope fields: `pagination` (PaginationMeta).
3685
+
3686
+ **Example**
3687
+
3688
+ ```ts
3689
+ // external: reaches real people (sends email/SMS, places a call, launches a send); the SDK never blindly retries it; confirm with a human first.
3690
+ const result = await g8.api.integrations.uploadGoogleConversions();
3691
+ ```
3692
+
3693
+ ---
3694
+
3695
+ <a id="op-validatesugarcrm"></a>
3696
+
3697
+ ### `g8.api.integrations.validateSugarcrm(input?)`
3698
+
3699
+ **Validate Sugarcrm**
3700
+
3701
+ - HTTP: `POST /api/v1/integrations/sugarcrm/validate`
3702
+ - operationId: `validate_sugarcrm_integrations_sugarcrm_validate_post` (also callable as `g8.api.call("validate_sugarcrm_integrations_sugarcrm_validate_post", input)`)
3703
+ - Tier: `read`: reads data; safe to call and to retry
3704
+ - API-key scope: `integrations:read`
3705
+
3706
+ Check the stored SugarCRM connection still works, and as whom.
3707
+
3708
+ Reads only. `valid: false` means SugarCRM refused the stored credentials;
3709
+ 404 means there is no SugarCRM connection.
3710
+
3711
+ **Input**: none.
3712
+
3713
+ **Returns** `ApiResponse_IntegrationOpPayload_`: the envelope `{ data: IntegrationOpPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
3714
+
3715
+ Other envelope fields: `pagination` (PaginationMeta).
3716
+
3717
+ **Example**
3718
+
3719
+ ```ts
3720
+ const result = await g8.api.integrations.validateSugarcrm();
3721
+ ```
3722
+
3723
+ ---
3724
+
3725
+ ## Referenced types
3726
+
3727
+ Named types that appear in the tables above. Full TypeScript definitions: `G8Contract.<Name>` (`import type { G8Contract } from "@graph8/sdk"`).
3728
+
3729
+ <a id="type-batchcontactrequest"></a>
3730
+
3731
+ ### `BatchContactRequest`
3732
+
3733
+ One contact in a batch. `crm_id` is only read on the UPDATE path.
3734
+
3735
+ | Field | Type | Required | Description |
3736
+ |---|---|---|---|
3737
+ | `email` | `string` | yes | |
3738
+ | `address` | `CrmAddress \| null` | no | |
3739
+ | `company_id` | `string \| null` | no | |
3740
+ | `company_name` | `string \| null` | no | |
3741
+ | `crm_id` | `string \| null` | no | The record's id in the CRM. Required on update, ignored on create. |
3742
+ | `custom_fields` | `Array<CrmCustomField>` | no | |
3743
+ | `first_name` | `string \| null` | no | |
3744
+ | `last_name` | `string \| null` | no | |
3745
+ | `phone` | `string \| null` | no | |
3746
+ | `title` | `string \| null` | no | |
3747
+ | `user_id` | `string \| null` | no | |
3748
+
3749
+ <a id="type-crmaddress"></a>
3750
+
3751
+ ### `CrmAddress`
3752
+
3753
+ | Field | Type | Required | Description |
3754
+ |---|---|---|---|
3755
+ | `address_type` | `string \| null` | no | |
3756
+ | `city` | `string \| null` | no | |
3757
+ | `country` | `string \| null` | no | |
3758
+ | `postal_code` | `string \| null` | no | |
3759
+ | `state` | `string \| null` | no | |
3760
+ | `street` | `string \| null` | no | |
3761
+ | `street2` | `string \| null` | no | |
3762
+
3763
+ <a id="type-crmcustomfield"></a>
3764
+
3765
+ ### `CrmCustomField`
3766
+
3767
+ One provider-side custom field. `field_name` is the CRM's API name, not its label. Read the valid names from `GET /integrations/crm/fields`; a name the provider does not have is rejected by the provider, not here.
3768
+
3769
+ | Field | Type | Required | Description |
3770
+ |---|---|---|---|
3771
+ | `field_name` | `string` | yes | |
3772
+ | `field_value` | `unknown` | yes | Required, but may be null - which is how a custom field is cleared. |
3773
+ | `field_type` | `string \| null` | no | |
3774
+
3775
+ <a id="type-crmemail"></a>
3776
+
3777
+ ### `CrmEmail`
3778
+
3779
+ | Field | Type | Required | Description |
3780
+ |---|---|---|---|
3781
+ | `email` | `string` | yes | |
3782
+ | `email_type` | `string \| null` | no | Provider's own label, e.g. `work`. Passed through unchanged. |
3783
+
3784
+ <a id="type-crmphone"></a>
3785
+
3786
+ ### `CrmPhone`
3787
+
3788
+ | Field | Type | Required | Description |
3789
+ |---|---|---|---|
3790
+ | `phone` | `string` | yes | |
3791
+ | `phone_type` | `string \| null` | no | |