@graph8/sdk 0.251.0 → 0.260.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/README.md +9 -2
  2. package/dist/cli.js +216 -0
  3. package/dist/index.d.mts +104 -7
  4. package/dist/index.d.ts +104 -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 +102 -7
  10. package/dist/react.d.ts +102 -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 +1696 -0
  140. package/docs/api/deals.md +2432 -0
  141. package/docs/api/deliverability.d.ts +418 -0
  142. package/docs/api/deliverability.md +677 -0
  143. package/docs/api/desk.d.ts +1765 -0
  144. package/docs/api/desk.md +3007 -0
  145. package/docs/api/dialer.d.ts +1185 -0
  146. package/docs/api/dialer.md +2166 -0
  147. package/docs/api/dialerAnalytics.d.ts +187 -0
  148. package/docs/api/dialerAnalytics.md +257 -0
  149. package/docs/api/documents.d.ts +895 -0
  150. package/docs/api/documents.md +1440 -0
  151. package/docs/api/duplicates.d.ts +195 -0
  152. package/docs/api/duplicates.md +315 -0
  153. package/docs/api/eSign.d.ts +38 -0
  154. package/docs/api/eSign.md +54 -0
  155. package/docs/api/eSignature.d.ts +242 -0
  156. package/docs/api/eSignature.md +341 -0
  157. package/docs/api/enrichment.d.ts +3207 -0
  158. package/docs/api/enrichment.md +5225 -0
  159. package/docs/api/events.d.ts +115 -0
  160. package/docs/api/events.md +105 -0
  161. package/docs/api/fields.d.ts +482 -0
  162. package/docs/api/fields.md +566 -0
  163. package/docs/api/forms.d.ts +1012 -0
  164. package/docs/api/forms.md +1542 -0
  165. package/docs/api/gtmCampaigns.d.ts +662 -0
  166. package/docs/api/gtmCampaigns.md +1044 -0
  167. package/docs/api/gtmContext.d.ts +1187 -0
  168. package/docs/api/gtmContext.md +2112 -0
  169. package/docs/api/gtmDeliverability.d.ts +60 -0
  170. package/docs/api/gtmDeliverability.md +63 -0
  171. package/docs/api/gtmKnowledgeBase.d.ts +76 -0
  172. package/docs/api/gtmKnowledgeBase.md +91 -0
  173. package/docs/api/gtmLaunchHelpers.d.ts +123 -0
  174. package/docs/api/gtmLaunchHelpers.md +148 -0
  175. package/docs/api/gtmLibrary.d.ts +448 -0
  176. package/docs/api/gtmLibrary.md +780 -0
  177. package/docs/api/health.d.ts +39 -0
  178. package/docs/api/health.md +58 -0
  179. package/docs/api/imageLibrary.d.ts +341 -0
  180. package/docs/api/imageLibrary.md +569 -0
  181. package/docs/api/imports.d.ts +157 -0
  182. package/docs/api/imports.md +174 -0
  183. package/docs/api/inbox.d.ts +709 -0
  184. package/docs/api/inbox.md +1067 -0
  185. package/docs/api/install.d.ts +213 -0
  186. package/docs/api/install.md +317 -0
  187. package/docs/api/installedApps.d.ts +131 -0
  188. package/docs/api/installedApps.md +241 -0
  189. package/docs/api/integrationStatus.d.ts +142 -0
  190. package/docs/api/integrationStatus.md +205 -0
  191. package/docs/api/integrations.d.ts +2327 -0
  192. package/docs/api/integrations.md +3791 -0
  193. package/docs/api/intent.d.ts +482 -0
  194. package/docs/api/intent.md +858 -0
  195. package/docs/api/knowledge.d.ts +501 -0
  196. package/docs/api/knowledge.md +843 -0
  197. package/docs/api/knowledgeBase.d.ts +84 -0
  198. package/docs/api/knowledgeBase.md +96 -0
  199. package/docs/api/landingPages.d.ts +1411 -0
  200. package/docs/api/landingPages.md +2488 -0
  201. package/docs/api/leads.d.ts +133 -0
  202. package/docs/api/leads.md +180 -0
  203. package/docs/api/library.d.ts +217 -0
  204. package/docs/api/library.md +338 -0
  205. package/docs/api/linkedIn.d.ts +227 -0
  206. package/docs/api/linkedIn.md +289 -0
  207. package/docs/api/linkedInOutreach.d.ts +727 -0
  208. package/docs/api/linkedInOutreach.md +990 -0
  209. package/docs/api/lists.d.ts +1106 -0
  210. package/docs/api/lists.md +1609 -0
  211. package/docs/api/logs.d.ts +71 -0
  212. package/docs/api/logs.md +70 -0
  213. package/docs/api/mailboxes.d.ts +1050 -0
  214. package/docs/api/mailboxes.md +1690 -0
  215. package/docs/api/marketingIntelligence.d.ts +256 -0
  216. package/docs/api/marketingIntelligence.md +454 -0
  217. package/docs/api/marketplace.d.ts +3173 -0
  218. package/docs/api/marketplace.md +5953 -0
  219. package/docs/api/mcp.d.ts +69 -0
  220. package/docs/api/mcp.md +69 -0
  221. package/docs/api/me.d.ts +54 -0
  222. package/docs/api/me.md +56 -0
  223. package/docs/api/meetings.d.ts +539 -0
  224. package/docs/api/meetings.md +747 -0
  225. package/docs/api/newsletter.d.ts +1613 -0
  226. package/docs/api/newsletter.md +2746 -0
  227. package/docs/api/notes.d.ts +517 -0
  228. package/docs/api/notes.md +888 -0
  229. package/docs/api/notifications.d.ts +94 -0
  230. package/docs/api/notifications.md +105 -0
  231. package/docs/api/objects.d.ts +621 -0
  232. package/docs/api/objects.md +1098 -0
  233. package/docs/api/openSearch.d.ts +234 -0
  234. package/docs/api/openSearch.md +297 -0
  235. package/docs/api/ops.d.ts +299 -0
  236. package/docs/api/ops.md +339 -0
  237. package/docs/api/orgGovernance.d.ts +393 -0
  238. package/docs/api/orgGovernance.md +623 -0
  239. package/docs/api/orgVideos.d.ts +184 -0
  240. package/docs/api/orgVideos.md +252 -0
  241. package/docs/api/organizationSettings.d.ts +626 -0
  242. package/docs/api/organizationSettings.md +911 -0
  243. package/docs/api/phoneNumbers.d.ts +484 -0
  244. package/docs/api/phoneNumbers.md +777 -0
  245. package/docs/api/profile.d.ts +329 -0
  246. package/docs/api/profile.md +540 -0
  247. package/docs/api/programmaticPages.d.ts +400 -0
  248. package/docs/api/programmaticPages.md +626 -0
  249. package/docs/api/providerDomains.d.ts +866 -0
  250. package/docs/api/providerDomains.md +1446 -0
  251. package/docs/api/providerUsage.d.ts +129 -0
  252. package/docs/api/providerUsage.md +186 -0
  253. package/docs/api/public.d.ts +69 -0
  254. package/docs/api/public.md +78 -0
  255. package/docs/api/publicCopilot.d.ts +67 -0
  256. package/docs/api/publicCopilot.md +80 -0
  257. package/docs/api/publicSignals.d.ts +66 -0
  258. package/docs/api/publicSignals.md +71 -0
  259. package/docs/api/publicVisitors.d.ts +97 -0
  260. package/docs/api/publicVisitors.md +118 -0
  261. package/docs/api/quotes.d.ts +1564 -0
  262. package/docs/api/quotes.md +2553 -0
  263. package/docs/api/radar.d.ts +808 -0
  264. package/docs/api/radar.md +1431 -0
  265. package/docs/api/radarReports.d.ts +208 -0
  266. package/docs/api/radarReports.md +306 -0
  267. package/docs/api/recordRoles.d.ts +143 -0
  268. package/docs/api/recordRoles.md +175 -0
  269. package/docs/api/repos.d.ts +146 -0
  270. package/docs/api/repos.md +211 -0
  271. package/docs/api/research.d.ts +295 -0
  272. package/docs/api/research.md +534 -0
  273. package/docs/api/revenue.d.ts +402 -0
  274. package/docs/api/revenue.md +608 -0
  275. package/docs/api/revenueAnalytics.d.ts +147 -0
  276. package/docs/api/revenueAnalytics.md +212 -0
  277. package/docs/api/revenueLifecycle.d.ts +207 -0
  278. package/docs/api/revenueLifecycle.md +274 -0
  279. package/docs/api/revenueRecords.d.ts +372 -0
  280. package/docs/api/revenueRecords.md +563 -0
  281. package/docs/api/roles.d.ts +431 -0
  282. package/docs/api/roles.md +812 -0
  283. package/docs/api/salesCoach.d.ts +877 -0
  284. package/docs/api/salesCoach.md +1540 -0
  285. package/docs/api/sandbox.d.ts +210 -0
  286. package/docs/api/sandbox.md +380 -0
  287. package/docs/api/scans.d.ts +104 -0
  288. package/docs/api/scans.md +136 -0
  289. package/docs/api/scheduleBuy.d.ts +293 -0
  290. package/docs/api/scheduleBuy.md +431 -0
  291. package/docs/api/scraping.d.ts +266 -0
  292. package/docs/api/scraping.md +383 -0
  293. package/docs/api/sdrAnalytics.d.ts +138 -0
  294. package/docs/api/sdrAnalytics.md +246 -0
  295. package/docs/api/search.d.ts +598 -0
  296. package/docs/api/search.md +866 -0
  297. package/docs/api/seo.d.ts +447 -0
  298. package/docs/api/seo.md +660 -0
  299. package/docs/api/sequenceLifecycle.d.ts +439 -0
  300. package/docs/api/sequenceLifecycle.md +513 -0
  301. package/docs/api/sequences.d.ts +1936 -0
  302. package/docs/api/sequences.md +3232 -0
  303. package/docs/api/settings.d.ts +448 -0
  304. package/docs/api/settings.md +731 -0
  305. package/docs/api/signals.d.ts +1441 -0
  306. package/docs/api/signals.md +2526 -0
  307. package/docs/api/signatures.d.ts +719 -0
  308. package/docs/api/signatures.md +1247 -0
  309. package/docs/api/skills.d.ts +230 -0
  310. package/docs/api/skills.md +466 -0
  311. package/docs/api/snippet.d.ts +85 -0
  312. package/docs/api/snippet.md +106 -0
  313. package/docs/api/socialPublishing.d.ts +824 -0
  314. package/docs/api/socialPublishing.md +1245 -0
  315. package/docs/api/studioDocuments.d.ts +244 -0
  316. package/docs/api/studioDocuments.md +348 -0
  317. package/docs/api/support.d.ts +90 -0
  318. package/docs/api/support.md +76 -0
  319. package/docs/api/suppressions.d.ts +241 -0
  320. package/docs/api/suppressions.md +343 -0
  321. package/docs/api/surveys.d.ts +847 -0
  322. package/docs/api/surveys.md +1223 -0
  323. package/docs/api/tasks.d.ts +813 -0
  324. package/docs/api/tasks.md +1344 -0
  325. package/docs/api/teamMembers.d.ts +668 -0
  326. package/docs/api/teamMembers.md +1040 -0
  327. package/docs/api/teams.d.ts +784 -0
  328. package/docs/api/teams.md +1395 -0
  329. package/docs/api/usage.d.ts +277 -0
  330. package/docs/api/usage.md +389 -0
  331. package/docs/api/visitors.d.ts +690 -0
  332. package/docs/api/visitors.md +1075 -0
  333. package/docs/api/voice.d.ts +4661 -0
  334. package/docs/api/voice.md +7905 -0
  335. package/docs/api/webAnalytics.d.ts +964 -0
  336. package/docs/api/webAnalytics.md +1452 -0
  337. package/docs/api/webChat.d.ts +1704 -0
  338. package/docs/api/webChat.md +2048 -0
  339. package/docs/api/webhooks.d.ts +251 -0
  340. package/docs/api/webhooks.md +386 -0
  341. package/docs/api/websiteEditor.d.ts +324 -0
  342. package/docs/api/websiteEditor.md +517 -0
  343. package/docs/api/work.d.ts +2298 -0
  344. package/docs/api/work.md +3096 -0
  345. package/docs/api/workbench.d.ts +2962 -0
  346. package/docs/api/workbench.md +4884 -0
  347. package/docs/api/workflows.d.ts +1218 -0
  348. package/docs/api/workflows.md +2302 -0
  349. package/docs/sdk-clients.md +4339 -0
  350. package/package.json +10 -3
@@ -0,0 +1,3096 @@
1
+ <!-- Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. -->
2
+
3
+ # `g8.api.work`: Work
4
+
5
+ 59 operations (27 read, 25 write, 5 destructive, 2 billable).
6
+
7
+ No hand-written client covers this area. Call it through `g8.api.work.*` 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: [work.d.ts](work.d.ts).
20
+
21
+ ## Operations
22
+
23
+ | Call | HTTP | Tier | Scope | Summary |
24
+ |---|---|---|---|---|
25
+ | [`addWorkCustomEmoji`](#op-addworkcustomemoji) | `POST /api/v1/work/custom-emoji` | write | `work:write` | Add Work Custom Emoji |
26
+ | [`addWorkPulseNote`](#op-addworkpulsenote) | `POST /api/v1/work/pulse` | write | `work:write` | Add Work Pulse Note |
27
+ | [`archiveWorkAgent`](#op-archiveworkagent) | `DELETE /api/v1/work/agents/{agent_id}` | destructive | `work:delete` | Archive Work Agent |
28
+ | [`createWorkAgent`](#op-createworkagent) | `POST /api/v1/work/agents` | write | `work:write` | Create Work Agent |
29
+ | [`createWorkChannel`](#op-createworkchannel) | `POST /api/v1/work/channels` | write | `work:write` | Create Work Channel |
30
+ | [`createWorkMessage`](#op-createworkmessage) | `POST /api/v1/work/messages` | write | `work:write` | Create Work Message |
31
+ | [`createWorkProject`](#op-createworkproject) | `POST /api/v1/work/projects` | write | `work:write` | Create Work Project |
32
+ | [`createWorkRoutine`](#op-createworkroutine) | `POST /api/v1/work/routines` | write | `work:write` | Create Work Routine |
33
+ | [`deleteWorkChannel`](#op-deleteworkchannel) | `DELETE /api/v1/work/channels/{channel_id}` | destructive | `work:delete` | Delete Work Channel |
34
+ | [`deleteWorkMessage`](#op-deleteworkmessage) | `DELETE /api/v1/work/messages/{message_id}` | destructive | `work:delete` | Delete Work Message |
35
+ | [`deleteWorkProject`](#op-deleteworkproject) | `DELETE /api/v1/work/projects/{project_id}` | destructive | `work:delete` | Delete Work Project |
36
+ | [`deleteWorkRoutine`](#op-deleteworkroutine) | `DELETE /api/v1/work/routines/{routine_id}` | destructive | `work:delete` | Delete Work Routine |
37
+ | [`editWorkMemory`](#op-editworkmemory) | `PUT /api/v1/work/memory` | write | `work:write` | Edit Work Memory |
38
+ | [`editWorkMessage`](#op-editworkmessage) | `PATCH /api/v1/work/messages/{message_id}` | write | `work:write` | Edit Work Message |
39
+ | [`forwardWorkMessage`](#op-forwardworkmessage) | `POST /api/v1/work/messages/{message_id}/forward` | write | `work:write` | Forward Work Message |
40
+ | [`getWorkAgent`](#op-getworkagent) | `GET /api/v1/work/agents/{agent_id}` | read | `work:read` | Get Work Agent |
41
+ | [`getWorkAgentPolicy`](#op-getworkagentpolicy) | `GET /api/v1/work/agents/policy` | read | `work:read` | Get Work Agent Policy |
42
+ | [`getWorkAttachmentLink`](#op-getworkattachmentlink) | `GET /api/v1/work/attachments/{attachment_id}` | read | `work:read` | Get Work Attachment Link |
43
+ | [`getWorkChannelCanvas`](#op-getworkchannelcanvas) | `GET /api/v1/work/channels/{channel_id}/canvas` | read | `work:read` | Get Work Channel Canvas |
44
+ | [`getWorkDailyBrief`](#op-getworkdailybrief) | `GET /api/v1/work/preferences/daily-brief` | read | `work:read` | Get Work Daily Brief |
45
+ | [`getWorkInboxDispositions`](#op-getworkinboxdispositions) | `GET /api/v1/work/inbox-dispositions` | read | `work:read` | Get Work Inbox Dispositions |
46
+ | [`getWorkMemory`](#op-getworkmemory) | `GET /api/v1/work/memory` | read | `work:read` | Get Work Memory |
47
+ | [`getWorkMessage`](#op-getworkmessage) | `GET /api/v1/work/messages/{message_id}` | read | `work:read` | Get Work Message |
48
+ | [`getWorkOversight`](#op-getworkoversight) | `GET /api/v1/work/oversight` | read | `work:read` | Get Work Oversight |
49
+ | [`getWorkReadMarkers`](#op-getworkreadmarkers) | `GET /api/v1/work/read-markers` | read | `work:read` | Get Work Read Markers |
50
+ | [`getWorkRoom`](#op-getworkroom) | `GET /api/v1/work/room` | read | `work:read` | Get Work Room |
51
+ | [`getWorkTeamHistory`](#op-getworkteamhistory) | `GET /api/v1/work/team-hq/history` | read | `work:read` | Get Work Team History |
52
+ | [`getWorkTeamLeaderboard`](#op-getworkteamleaderboard) | `GET /api/v1/work/team-hq/leaderboard` | read | `work:read` | Get Work Team Leaderboard |
53
+ | [`listAvailableWorkChannels`](#op-listavailableworkchannels) | `GET /api/v1/work/channels/available` | read | `work:read` | List Available Work Channels |
54
+ | [`listWorkActivity`](#op-listworkactivity) | `GET /api/v1/work/activity` | read | `work:read` | List Work Activity |
55
+ | [`listWorkAgentExecutionIdentities`](#op-listworkagentexecutionidentities) | `GET /api/v1/work/agents/execution-identities` | read | `work:read` | List Work Agent Execution Identities |
56
+ | [`listWorkAgents`](#op-listworkagents) | `GET /api/v1/work/agents` | read | `work:read` | List Work Agents |
57
+ | [`listWorkChannels`](#op-listworkchannels) | `GET /api/v1/work/channels` | read | `work:read` | List Work Channels |
58
+ | [`listWorkConversationEvents`](#op-listworkconversationevents) | `GET /api/v1/work/conversations/{conversation_id}/events` | read | `work:read` | List Work Conversation Events |
59
+ | [`listWorkConversationFiles`](#op-listworkconversationfiles) | `GET /api/v1/work/conversations/{conversation_id}/files` | read | `work:read` | List Work Conversation Files |
60
+ | [`listWorkConversationMessages`](#op-listworkconversationmessages) | `GET /api/v1/work/conversations/{conversation_id}/messages` | read | `work:read` | List Work Conversation Messages |
61
+ | [`listWorkItemHistory`](#op-listworkitemhistory) | `GET /api/v1/work/work-items/history` | read | `work:read` | List Work Item History |
62
+ | [`listWorkItems`](#op-listworkitems) | `GET /api/v1/work/work-items` | read | `work:read` | List Work Items |
63
+ | [`listWorkRecentActivity`](#op-listworkrecentactivity) | `GET /api/v1/work/team-hq/recent-activity` | read | `work:read` | List Work Recent Activity |
64
+ | [`listWorkRoutineRuns`](#op-listworkroutineruns) | `GET /api/v1/work/routines/{routine_id}/runs` | billable | `work:run` | List Work Routine Runs |
65
+ | [`listWorkRoutines`](#op-listworkroutines) | `GET /api/v1/work/routines` | read | `work:read` | List Work Routines |
66
+ | [`listWorkTeamReceipts`](#op-listworkteamreceipts) | `GET /api/v1/work/team-hq/receipts` | read | `work:read` | List Work Team Receipts |
67
+ | [`moveWorkMemory`](#op-moveworkmemory) | `POST /api/v1/work/memory/move` | write | `work:write` | Move Work Memory |
68
+ | [`promoteWorkSignal`](#op-promoteworksignal) | `POST /api/v1/work/signals/promote` | billable | `work:run` | Promote Work Signal |
69
+ | [`reactToWorkMessage`](#op-reacttoworkmessage) | `PUT /api/v1/work/messages/{message_id}/reaction` | write | `work:write` | React To Work Message |
70
+ | [`runWorkRoutineNow`](#op-runworkroutinenow) | `POST /api/v1/work/routines/{routine_id}/run` | write | `work:write` | Run Work Routine Now |
71
+ | [`saveWorkChannelCanvas`](#op-saveworkchannelcanvas) | `POST /api/v1/work/channels/{channel_id}/canvas` | write | `work:write` | Save Work Channel Canvas |
72
+ | [`searchWork`](#op-searchwork) | `GET /api/v1/work/search` | read | `work:read` | Search Work |
73
+ | [`setWorkChannelPurpose`](#op-setworkchannelpurpose) | `PUT /api/v1/work/channels/{channel_id}/purpose` | write | `work:write` | Set Work Channel Purpose |
74
+ | [`setWorkDailyBrief`](#op-setworkdailybrief) | `POST /api/v1/work/preferences/daily-brief` | write | `work:write` | Set Work Daily Brief |
75
+ | [`setWorkInboxDisposition`](#op-setworkinboxdisposition) | `POST /api/v1/work/inbox-dispositions` | write | `work:write` | Set Work Inbox Disposition |
76
+ | [`setWorkPulseReaction`](#op-setworkpulsereaction) | `POST /api/v1/work/pulse/{note_id}/reaction` | write | `work:write` | Set Work Pulse Reaction |
77
+ | [`setWorkReadMarkers`](#op-setworkreadmarkers) | `POST /api/v1/work/read-markers` | write | `work:write` | Set Work Read Markers |
78
+ | [`setWorkSidebarPreferences`](#op-setworksidebarpreferences) | `POST /api/v1/work/sidebar-preferences` | write | `work:write` | Set Work Sidebar Preferences |
79
+ | [`setWorkSignalState`](#op-setworksignalstate) | `POST /api/v1/work/signals/state` | write | `work:write` | Set Work Signal State |
80
+ | [`updateWorkAgent`](#op-updateworkagent) | `PATCH /api/v1/work/agents/{agent_id}` | write | `work:write` | Update Work Agent |
81
+ | [`updateWorkChannel`](#op-updateworkchannel) | `PATCH /api/v1/work/channels/{channel_id}` | write | `work:write` | Update Work Channel |
82
+ | [`updateWorkProject`](#op-updateworkproject) | `PATCH /api/v1/work/projects/{project_id}` | write | `work:write` | Update Work Project |
83
+ | [`updateWorkRoutine`](#op-updateworkroutine) | `PATCH /api/v1/work/routines/{routine_id}` | write | `work:write` | Update Work Routine |
84
+
85
+ ---
86
+
87
+ <a id="op-addworkcustomemoji"></a>
88
+
89
+ ### `g8.api.work.addWorkCustomEmoji(input)`
90
+
91
+ **Add Work Custom Emoji**
92
+
93
+ - HTTP: `POST /api/v1/work/custom-emoji`
94
+ - operationId: `add_work_custom_emoji_work_custom_emoji_post` (also callable as `g8.api.call("add_work_custom_emoji_work_custom_emoji_post", input)`)
95
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
96
+ - API-key scope: `work:write`
97
+
98
+ Register one custom emoji for the whole organization.
99
+
100
+ ``url`` must be ``https:`` and is refused rather than coerced: a custom
101
+ emoji renders in every member's browser. ``shortcode`` is lower-cased and
102
+ must be 2-32 characters of ``a-z 0-9 _ + -``. The response carries the
103
+ organization's whole emoji set.
104
+
105
+ **Input**
106
+
107
+ | Field | Type | Required | Description |
108
+ |---|---|---|---|
109
+ | `body` | `WorkCustomEmojiRequest` | yes | Request body; fields below. |
110
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
111
+
112
+ Body fields (`WorkCustomEmojiRequest`):
113
+
114
+ | Field | Type | Required | Description |
115
+ |---|---|---|---|
116
+ | `body.shortcode` | `string` | yes | min length 2, max length 32 |
117
+ | `body.url` | `string` | yes | min length 1, max length 2048 |
118
+
119
+ **Returns** `ApiResponse_WorkCustomEmojiResult_`: the envelope `{ data: WorkCustomEmojiResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
120
+
121
+ Other envelope fields: `pagination` (PaginationMeta).
122
+
123
+ `WorkCustomEmojiResult` fields:
124
+
125
+ | Field | Type | Required | Description |
126
+ |---|---|---|---|
127
+ | `customEmojis` | `Array<Record<string, unknown>> \| null` | no | Every custom emoji the organization now has |
128
+ | `duplicate` | `boolean \| null` | no | True when an Idempotency-Key replay returned the original result |
129
+ | `event` | `Record<string, unknown> \| null` | no | The room event the write appended |
130
+
131
+ **Example**
132
+
133
+ ```ts
134
+ const result = await g8.api.work.addWorkCustomEmoji({ body: { shortcode: "example", url: "https://example.com" } });
135
+ ```
136
+
137
+ ---
138
+
139
+ <a id="op-addworkpulsenote"></a>
140
+
141
+ ### `g8.api.work.addWorkPulseNote(input)`
142
+
143
+ **Add Work Pulse Note**
144
+
145
+ - HTTP: `POST /api/v1/work/pulse`
146
+ - operationId: `add_work_pulse_note_work_pulse_post` (also callable as `g8.api.call("add_work_pulse_note_work_pulse_post", input)`)
147
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
148
+ - API-key scope: `work:write`
149
+
150
+ Post one pulse update — the room's org-wide, channel-less status note.
151
+
152
+ ``replyToEventId`` threads it under an existing note.
153
+
154
+ **Input**
155
+
156
+ | Field | Type | Required | Description |
157
+ |---|---|---|---|
158
+ | `body` | `WorkPulseNoteRequest` | yes | Request body; fields below. |
159
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
160
+
161
+ Body fields (`WorkPulseNoteRequest`):
162
+
163
+ | Field | Type | Required | Description |
164
+ |---|---|---|---|
165
+ | `body.content` | `string` | yes | min length 1, max length 2000 |
166
+ | `body.replyToEventId` | `string \| null` | no | max length 128 |
167
+
168
+ **Returns** `ApiResponse_WorkPulseNote_`: the envelope `{ data: WorkPulseNote, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
169
+
170
+ Other envelope fields: `pagination` (PaginationMeta).
171
+
172
+ `WorkPulseNote` fields:
173
+
174
+ | Field | Type | Required | Description |
175
+ |---|---|---|---|
176
+ | `duplicate` | `boolean \| null` | no | True when an Idempotency-Key replay returned the original result |
177
+ | `event` | `Record<string, unknown> \| null` | no | The room event carrying the note |
178
+
179
+ **Example**
180
+
181
+ ```ts
182
+ const result = await g8.api.work.addWorkPulseNote({ body: { content: "example" } });
183
+ ```
184
+
185
+ ---
186
+
187
+ <a id="op-archiveworkagent"></a>
188
+
189
+ ### `g8.api.work.archiveWorkAgent(input)`
190
+
191
+ **Archive Work Agent**
192
+
193
+ - HTTP: `DELETE /api/v1/work/agents/{agent_id}`
194
+ - operationId: `archive_work_agent_work_agents__agent_id__delete` (also callable as `g8.api.call("archive_work_agent_work_agents__agent_id__delete", input)`)
195
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
196
+ - API-key scope: `work:delete`
197
+
198
+ Archive one Work agent. ``403`` unless the caller may edit it.
199
+
200
+ The app answers ``204``; this answers ``200`` with the archived id so the
201
+ response fits the Developer API envelope.
202
+
203
+ **Input**
204
+
205
+ | Field | Type | Required | Description |
206
+ |---|---|---|---|
207
+ | `path.agent_id` | `string (uuid)` | yes | Agent id |
208
+
209
+ **Returns** `ApiResponse_WorkAgentArchived_`: the envelope `{ data: WorkAgentArchived, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
210
+
211
+ Other envelope fields: `pagination` (PaginationMeta).
212
+
213
+ `WorkAgentArchived` fields:
214
+
215
+ | Field | Type | Required | Description |
216
+ |---|---|---|---|
217
+ | `agent_id` | `string` | yes | The agent that was archived |
218
+ | `archived` | `boolean` | no | True once archived default `true` |
219
+
220
+ **Example**
221
+
222
+ ```ts
223
+ // destructive: deletes or archives data; confirm with a human before calling.
224
+ const result = await g8.api.work.archiveWorkAgent({ path: { agent_id: "00000000-0000-0000-0000-000000000000" } });
225
+ ```
226
+
227
+ ---
228
+
229
+ <a id="op-createworkagent"></a>
230
+
231
+ ### `g8.api.work.createWorkAgent(input)`
232
+
233
+ **Create Work Agent**
234
+
235
+ - HTTP: `POST /api/v1/work/agents`
236
+ - operationId: `create_work_agent_work_agents_post` (also callable as `g8.api.call("create_work_agent_work_agents_post", input)`)
237
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
238
+ - API-key scope: `work:write`
239
+
240
+ Create one Work agent and its conversation.
241
+
242
+ ``visibility: "organization"`` needs the share permission (see
243
+ ``GET /work/agents/policy``); ``403`` otherwise. Creating does not run it.
244
+
245
+ **Input**
246
+
247
+ | Field | Type | Required | Description |
248
+ |---|---|---|---|
249
+ | `body` | `WorkAgentProfileRequest` | yes | Request body; fields below. |
250
+ | `headers.Idempotency-Key` | `string (uuid) \| null` | no | Retry-safety key (a UUID). Replaying one returns the ORIGINAL agent instead of creating a second. Omit it and the server mints one, so a retried request creates again. |
251
+
252
+ Body fields (`WorkAgentProfileRequest`):
253
+
254
+ | Field | Type | Required | Description |
255
+ |---|---|---|---|
256
+ | `body.description` | `string` | yes | The agent's instructions min length 1, max length 20000 |
257
+ | `body.name` | `string` | yes | Agent name min length 1, max length 100 |
258
+ | `body.avatar` | `"spark" \| "compass" \| "chart" \| "code" \| "pen" \| "search" \| "shield" \| "bolt"` | no | Avatar glyph default `"spark"` |
259
+ | `body.role` | `string` | no | Role shown beside the name default `"Assistant"`, min length 1, max length 100 |
260
+ | `body.visibility` | `"private" \| "organization"` | no | `private` to its owner, or shared with the `organization` default `"private"` |
261
+
262
+ **Returns** `ApiResponse_WorkAgentCreated_`: the envelope `{ data: WorkAgentCreated, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
263
+
264
+ Other envelope fields: `pagination` (PaginationMeta).
265
+
266
+ `WorkAgentCreated` fields:
267
+
268
+ | Field | Type | Required | Description |
269
+ |---|---|---|---|
270
+ | `agent_id` | `string \| null` | no | Agent id |
271
+ | `session_id` | `string \| null` | no | The agent's conversation session id |
272
+
273
+ **Example**
274
+
275
+ ```ts
276
+ const result = await g8.api.work.createWorkAgent({ body: { description: "example", name: "Example" } });
277
+ ```
278
+
279
+ ---
280
+
281
+ <a id="op-createworkchannel"></a>
282
+
283
+ ### `g8.api.work.createWorkChannel(input)`
284
+
285
+ **Create Work Channel**
286
+
287
+ - HTTP: `POST /api/v1/work/channels`
288
+ - operationId: `create_work_channel_work_channels_post` (also callable as `g8.api.call("create_work_channel_work_channels_post", input)`)
289
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
290
+ - API-key scope: `work:write`
291
+
292
+ Create one Work channel.
293
+
294
+ ``409`` when the name is taken — a channel's slug IS its room address, so two
295
+ channels cannot share one. ``422`` for a name or description that cannot be
296
+ normalized, and for an unknown ``templateId``. ``templateId`` seats the
297
+ template's specialists and seeds its Canvas.
298
+
299
+ The creator comes from the authenticated principal. The body cannot express
300
+ it: ``author``, ``actor_id``, ``org_id`` and ``createdBy`` are refused
301
+ outright rather than ignored.
302
+
303
+ **Input**
304
+
305
+ | Field | Type | Required | Description |
306
+ |---|---|---|---|
307
+ | `body` | `WorkChannelCreateRequest` | yes | Request body; fields below. |
308
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
309
+
310
+ Body fields (`WorkChannelCreateRequest`):
311
+
312
+ | Field | Type | Required | Description |
313
+ |---|---|---|---|
314
+ | `body.name` | `string` | yes | min length 1, max length 255 |
315
+ | `body.description` | `string \| null` | no | max length 1000 |
316
+ | `body.displayName` | `string \| null` | no | max length 255 |
317
+ | `body.kind` | `"stream" \| "forum"` | no | default `"stream"` |
318
+ | `body.memberUserIds` | `Array<string>` | no | max items 200 |
319
+ | `body.participantAgentIds` | `Array<string>` | no | max items 16 |
320
+ | `body.templateId` | `string \| null` | no | One of `work/channel_templates.py`'s ids. Seats its specialists and seeds its Canvas. |
321
+ | `body.ttlSeconds` | `integer \| null` | no | A Temporary channel's lifetime in seconds; absent means Permanent. max 2147483647, > 0 |
322
+ | `body.visibility` | `"open" \| "private"` | no | default `"open"` |
323
+
324
+ **Returns** `ApiResponse_WorkChannelWriteResult_`: the envelope `{ data: WorkChannelWriteResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
325
+
326
+ Other envelope fields: `pagination` (PaginationMeta).
327
+
328
+ `WorkChannelWriteResult` fields:
329
+
330
+ | Field | Type | Required | Description |
331
+ |---|---|---|---|
332
+ | `canvasSeeded` | `boolean \| null` | no | Present when `templateId` seeded a Canvas |
333
+ | `channel` | `WorkChannel \| null` | no | The channel as stored after the write |
334
+ | `duplicate` | `boolean \| null` | no | True when an Idempotency-Key replay returned the original result |
335
+
336
+ **Example**
337
+
338
+ ```ts
339
+ const result = await g8.api.work.createWorkChannel({ body: { name: "Example" } });
340
+ ```
341
+
342
+ ---
343
+
344
+ <a id="op-createworkmessage"></a>
345
+
346
+ ### `g8.api.work.createWorkMessage(input)`
347
+
348
+ **Create Work Message**
349
+
350
+ - HTTP: `POST /api/v1/work/messages`
351
+ - operationId: `create_work_message_work_messages_post` (also callable as `g8.api.call("create_work_message_work_messages_post", input)`)
352
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
353
+ - API-key scope: `work:write`
354
+
355
+ Post one message into a conversation this credential may write to.
356
+
357
+ ``channel`` addresses the conversation — a channel name or id. Send either
358
+ ``message`` (plain text) or ``document`` (a rich-text document, normalized
359
+ server-side so a hostile link never reaches storage), plus optional
360
+ ``attachmentIds``, ``mentionAgentIds`` and thread parents.
361
+
362
+ ``403`` when the caller is not a member of the channel — an organisation
363
+ credential holds a seat in the built-in channels and nowhere else, so that
364
+ is where it can post. ``404`` when no such conversation exists.
365
+
366
+ Mentioning an agent starts an agent turn in the background, which is how a
367
+ message gets answered; the send returns as soon as the message is stored.
368
+ The author is resolved from the authenticated principal and the body cannot
369
+ express one — ``author``, ``actor_id`` and ``org_id`` are refused outright.
370
+
371
+ **Input**
372
+
373
+ | Field | Type | Required | Description |
374
+ |---|---|---|---|
375
+ | `body` | `WorkMessageCreateRequest` | yes | Request body; fields below. |
376
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
377
+
378
+ Body fields (`WorkMessageCreateRequest`):
379
+
380
+ | Field | Type | Required | Description |
381
+ |---|---|---|---|
382
+ | `body.channel` | `string` | yes | min length 1, max length 255 |
383
+ | `body.attachmentIds` | `Array<string>` | no | max items 20 |
384
+ | `body.document` | `Record<string, unknown> \| null` | no | |
385
+ | `body.mentionAgentIds` | `Array<string>` | no | max items 16 |
386
+ | `body.mentionUserIds` | `Array<string>` | no | max items 64 |
387
+ | `body.message` | `string \| null` | no | max length 12000 |
388
+ | `body.parentMessageId` | `string \| null` | no | max length 128 |
389
+ | `body.projectId` | `string \| null` | no | max length 255 |
390
+ | `body.rootMessageId` | `string \| null` | no | max length 128 |
391
+
392
+ **Returns** `ApiResponse_WorkMessage_`: the envelope `{ data: WorkMessage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
393
+
394
+ Other envelope fields: `pagination` (PaginationMeta).
395
+
396
+ `WorkMessage` fields:
397
+
398
+ | Field | Type | Required | Description |
399
+ |---|---|---|---|
400
+ | `author` | `Record<string, unknown> \| null` | no | Resolved author — always the authenticated principal, never a request field |
401
+ | `channel` | `string \| null` | no | Conversation address — a channel NAME or a direct-message id |
402
+ | `createdAt` | `string \| null` | no | Creation timestamp |
403
+ | `document` | `Record<string, unknown> \| null` | no | Rich-text document, normalized server-side |
404
+ | `id` | `string \| null` | no | Message id |
405
+ | `text` | `string \| null` | no | Plain-text projection of the document |
406
+
407
+ **Example**
408
+
409
+ ```ts
410
+ const result = await g8.api.work.createWorkMessage({ body: { channel: "example" } });
411
+ ```
412
+
413
+ ---
414
+
415
+ <a id="op-createworkproject"></a>
416
+
417
+ ### `g8.api.work.createWorkProject(input)`
418
+
419
+ **Create Work Project**
420
+
421
+ - HTTP: `POST /api/v1/work/projects`
422
+ - operationId: `create_work_project_work_projects_post` (also callable as `g8.api.call("create_work_project_work_projects_post", input)`)
423
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
424
+ - API-key scope: `work:write`
425
+
426
+ Create one project in one channel.
427
+
428
+ ``channel`` is the channel NAME. The channel is resolved and authorized
429
+ exactly the way a send is, so a caller who may not post in a room may not
430
+ attach durable state to it: ``403``. The project id, the creator and the
431
+ room event come from the server; a body asserting them is refused by name.
432
+
433
+ **Input**
434
+
435
+ | Field | Type | Required | Description |
436
+ |---|---|---|---|
437
+ | `body` | `WorkProjectCreateRequest` | yes | Request body; fields below. |
438
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
439
+
440
+ Body fields (`WorkProjectCreateRequest`):
441
+
442
+ | Field | Type | Required | Description |
443
+ |---|---|---|---|
444
+ | `body.channel` | `string` | yes | min length 1, max length 255 |
445
+ | `body.name` | `string` | yes | min length 1, max length 500 |
446
+ | `body.description` | `string \| null` | no | max length 2000 |
447
+ | `body.status` | `"active" \| "paused" \| "completed" \| "archived"` | no | default `"active"` |
448
+
449
+ **Returns** `ApiResponse_WorkProjectWriteResult_`: the envelope `{ data: WorkProjectWriteResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
450
+
451
+ Other envelope fields: `pagination` (PaginationMeta).
452
+
453
+ `WorkProjectWriteResult` fields:
454
+
455
+ | Field | Type | Required | Description |
456
+ |---|---|---|---|
457
+ | `compatibilityEventId` | `string \| null` | no | Id of the room event the write appended |
458
+ | `duplicate` | `boolean \| null` | no | True when an Idempotency-Key replay returned the original result rather than writing again |
459
+ | `project` | `WorkProject \| null` | no | The project as stored after the write |
460
+
461
+ **Example**
462
+
463
+ ```ts
464
+ const result = await g8.api.work.createWorkProject({ body: { channel: "example", name: "Example" } });
465
+ ```
466
+
467
+ ---
468
+
469
+ <a id="op-createworkroutine"></a>
470
+
471
+ ### `g8.api.work.createWorkRoutine(input)`
472
+
473
+ **Create Work Routine**
474
+
475
+ - HTTP: `POST /api/v1/work/routines`
476
+ - operationId: `create_work_routine_work_routines_post` (also callable as `g8.api.call("create_work_routine_work_routines_post", input)`)
477
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
478
+ - API-key scope: `work:write`
479
+
480
+ Create one routine.
481
+
482
+ ``deliveryConversationId`` must be a conversation this credential can read —
483
+ otherwise a routine would be a way to post into a room its author cannot
484
+ see, and it is refused with the same ``403`` reading that room would give.
485
+
486
+ ``triggerKind: "schedule"`` takes ``weekdays`` + ``localTime`` + ``timezone``;
487
+ ``triggerKind: "event"`` takes a ``trigger`` config and an optional
488
+ ``eventPolicy`` instead. The creator comes from the authenticated principal.
489
+
490
+ **Input**
491
+
492
+ | Field | Type | Required | Description |
493
+ |---|---|---|---|
494
+ | `body` | `WorkRoutineCreateRequest` | yes | Request body; fields below. |
495
+
496
+ Body fields (`WorkRoutineCreateRequest`):
497
+
498
+ | Field | Type | Required | Description |
499
+ |---|---|---|---|
500
+ | `body.agentId` | `string` | yes | Agent that runs the routine |
501
+ | `body.deliveryConversationId` | `string` | yes | Conversation the routine posts into; must be readable by the caller |
502
+ | `body.instruction` | `string` | yes | What the agent is asked to do each run |
503
+ | `body.title` | `string` | yes | What the routine is called |
504
+ | `body.enabled` | `boolean` | no | Whether the routine starts active default `true` |
505
+ | `body.eventPolicy` | `Record<string, unknown> \| null` | no | Optional event-handling policy |
506
+ | `body.localTime` | `string \| null` | no | Local run time `HH:MM`, for `schedule` routines |
507
+ | `body.timezone` | `string` | no | IANA timezone the local time is read in default `"UTC"` |
508
+ | `body.trigger` | `Record<string, unknown> \| null` | no | Trigger config, for `event` routines |
509
+ | `body.triggerKind` | `string` | no | `schedule` or `event` default `"schedule"` |
510
+ | `body.weekdays` | `Array<integer> \| null` | no | Days to run on (0-6), for `schedule` routines |
511
+
512
+ **Returns** `ApiResponse_WorkRoutineEnvelope_`: the envelope `{ data: WorkRoutineEnvelope, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
513
+
514
+ Other envelope fields: `pagination` (PaginationMeta).
515
+
516
+ `WorkRoutineEnvelope` fields:
517
+
518
+ | Field | Type | Required | Description |
519
+ |---|---|---|---|
520
+ | `routine` | `WorkRoutine` | yes | The routine as stored after the write |
521
+
522
+ **Example**
523
+
524
+ ```ts
525
+ const result = await g8.api.work.createWorkRoutine({
526
+ body: {
527
+ agentId: "example",
528
+ deliveryConversationId: "example",
529
+ instruction: "example",
530
+ title: "Example",
531
+ },
532
+ });
533
+ ```
534
+
535
+ ---
536
+
537
+ <a id="op-deleteworkchannel"></a>
538
+
539
+ ### `g8.api.work.deleteWorkChannel(input)`
540
+
541
+ **Delete Work Channel**
542
+
543
+ - HTTP: `DELETE /api/v1/work/channels/{channel_id}`
544
+ - operationId: `delete_work_channel_work_channels__channel_id__delete` (also callable as `g8.api.call("delete_work_channel_work_channels__channel_id__delete", input)`)
545
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
546
+ - API-key scope: `work:delete`
547
+
548
+ Delete one channel for everyone, leaving a non-restorable tombstone.
549
+
550
+ ``confirmationName`` must equal the channel's own slug. This is not
551
+ reversible: the room's history stays as an audit record but nobody can read
552
+ the channel again. The in-app surface spells this ``POST
553
+ /v1/work/channels/{id}/delete``; the verb here is ``DELETE`` because that is
554
+ what the operation is and what the scope derived for it means.
555
+
556
+ **Input**
557
+
558
+ | Field | Type | Required | Description |
559
+ |---|---|---|---|
560
+ | `path.channel_id` | `string` | yes | Channel id or slug |
561
+ | `body` | `WorkChannelDeleteRequest` | yes | Request body; fields below. |
562
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
563
+
564
+ Body fields (`WorkChannelDeleteRequest`):
565
+
566
+ | Field | Type | Required | Description |
567
+ |---|---|---|---|
568
+ | `body.confirmationName` | `string` | yes | min length 1, max length 255 |
569
+
570
+ **Returns** `ApiResponse_WorkChannelWriteResult_`: the envelope `{ data: WorkChannelWriteResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
571
+
572
+ Other envelope fields: `pagination` (PaginationMeta).
573
+
574
+ `WorkChannelWriteResult` fields:
575
+
576
+ | Field | Type | Required | Description |
577
+ |---|---|---|---|
578
+ | `canvasSeeded` | `boolean \| null` | no | Present when `templateId` seeded a Canvas |
579
+ | `channel` | `WorkChannel \| null` | no | The channel as stored after the write |
580
+ | `duplicate` | `boolean \| null` | no | True when an Idempotency-Key replay returned the original result |
581
+
582
+ **Example**
583
+
584
+ ```ts
585
+ // destructive: deletes or archives data; confirm with a human before calling.
586
+ const result = await g8.api.work.deleteWorkChannel({ path: { channel_id: "id" }, body: { confirmationName: "Example" } });
587
+ ```
588
+
589
+ ---
590
+
591
+ <a id="op-deleteworkmessage"></a>
592
+
593
+ ### `g8.api.work.deleteWorkMessage(input)`
594
+
595
+ **Delete Work Message**
596
+
597
+ - HTTP: `DELETE /api/v1/work/messages/{message_id}`
598
+ - operationId: `delete_work_message_work_messages__message_id__delete` (also callable as `g8.api.call("delete_work_message_work_messages__message_id__delete", input)`)
599
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
600
+ - API-key scope: `work:delete`
601
+
602
+ Retract a message this credential authored. Soft, and safe to repeat.
603
+
604
+ **Input**
605
+
606
+ | Field | Type | Required | Description |
607
+ |---|---|---|---|
608
+ | `path.message_id` | `string` | yes | Message id |
609
+
610
+ **Returns** `ApiResponse_WorkMessage_`: the envelope `{ data: WorkMessage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
611
+
612
+ Other envelope fields: `pagination` (PaginationMeta).
613
+
614
+ `WorkMessage` fields:
615
+
616
+ | Field | Type | Required | Description |
617
+ |---|---|---|---|
618
+ | `author` | `Record<string, unknown> \| null` | no | Resolved author — always the authenticated principal, never a request field |
619
+ | `channel` | `string \| null` | no | Conversation address — a channel NAME or a direct-message id |
620
+ | `createdAt` | `string \| null` | no | Creation timestamp |
621
+ | `document` | `Record<string, unknown> \| null` | no | Rich-text document, normalized server-side |
622
+ | `id` | `string \| null` | no | Message id |
623
+ | `text` | `string \| null` | no | Plain-text projection of the document |
624
+
625
+ **Example**
626
+
627
+ ```ts
628
+ // destructive: deletes or archives data; confirm with a human before calling.
629
+ const result = await g8.api.work.deleteWorkMessage({ path: { message_id: "id" } });
630
+ ```
631
+
632
+ ---
633
+
634
+ <a id="op-deleteworkproject"></a>
635
+
636
+ ### `g8.api.work.deleteWorkProject(input)`
637
+
638
+ **Delete Work Project**
639
+
640
+ - HTTP: `DELETE /api/v1/work/projects/{project_id}`
641
+ - operationId: `delete_work_project_work_projects__project_id__delete` (also callable as `g8.api.call("delete_work_project_work_projects__project_id__delete", input)`)
642
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
643
+ - API-key scope: `work:delete`
644
+
645
+ Tombstone one project. Its conversation survives.
646
+
647
+ ``403`` unless the caller created it or holds Owner/Admin. The response
648
+ names what SURVIVES: the project's messages and action receipts are kept
649
+ and counted. Repeating the call is safe. The optional body carries only an
650
+ audit ``reason``; omitting it records ``user_requested``, as the app does.
651
+
652
+ **Input**
653
+
654
+ | Field | Type | Required | Description |
655
+ |---|---|---|---|
656
+ | `path.project_id` | `string` | yes | Project id |
657
+ | `body` | `WorkProjectDeleteRequest \| null` | no | Request body; fields below. |
658
+
659
+ Body fields:
660
+
661
+ | Field | Type | Required | Description |
662
+ |---|---|---|---|
663
+ | `body.reason` | `string` | no | default `"user_requested"`, min length 1, max length 500 |
664
+
665
+ **Returns** `ApiResponse_WorkProjectDeleted_`: the envelope `{ data: WorkProjectDeleted, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
666
+
667
+ Other envelope fields: `pagination` (PaginationMeta).
668
+
669
+ `WorkProjectDeleted` fields:
670
+
671
+ | Field | Type | Required | Description |
672
+ |---|---|---|---|
673
+ | `action_receipts_preserved` | `integer \| null` | no | Action receipts KEPT, for the same reason |
674
+ | `deleted` | `boolean \| null` | no | True once the tombstone is in place |
675
+ | `deleted_at` | `string \| null` | no | When the tombstone was written |
676
+ | `messages_preserved` | `integer \| null` | no | Messages KEPT: deleting a project does not delete its conversation |
677
+ | `project_id` | `string \| null` | no | The project that was tombstoned |
678
+
679
+ **Example**
680
+
681
+ ```ts
682
+ // destructive: deletes or archives data; confirm with a human before calling.
683
+ const result = await g8.api.work.deleteWorkProject({ path: { project_id: "id" } });
684
+ ```
685
+
686
+ ---
687
+
688
+ <a id="op-deleteworkroutine"></a>
689
+
690
+ ### `g8.api.work.deleteWorkRoutine(input)`
691
+
692
+ **Delete Work Routine**
693
+
694
+ - HTTP: `DELETE /api/v1/work/routines/{routine_id}`
695
+ - operationId: `delete_work_routine_work_routines__routine_id__delete` (also callable as `g8.api.call("delete_work_routine_work_routines__routine_id__delete", input)`)
696
+ - Tier: `destructive`: deletes or archives data; confirm with a human before calling
697
+ - API-key scope: `work:delete`
698
+
699
+ Delete one routine. Same guard as changing it: the delivery conversation decides.
700
+
701
+ Answers ``200`` with the deleted id rather than the in-app ``204``: every
702
+ Developer API operation returns the same ``{"data": ...}`` envelope, and one
703
+ route with no body is the exception every generated client has to special-case.
704
+
705
+ **Input**
706
+
707
+ | Field | Type | Required | Description |
708
+ |---|---|---|---|
709
+ | `path.routine_id` | `string (uuid)` | yes | Routine id |
710
+
711
+ **Returns** `ApiResponse_WorkRoutineDeleted_`: the envelope `{ data: WorkRoutineDeleted, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
712
+
713
+ Other envelope fields: `pagination` (PaginationMeta).
714
+
715
+ `WorkRoutineDeleted` fields:
716
+
717
+ | Field | Type | Required | Description |
718
+ |---|---|---|---|
719
+ | `id` | `string` | yes | The routine that was deleted |
720
+ | `deleted` | `boolean` | no | Always true; the operation is idempotent default `true` |
721
+
722
+ **Example**
723
+
724
+ ```ts
725
+ // destructive: deletes or archives data; confirm with a human before calling.
726
+ const result = await g8.api.work.deleteWorkRoutine({ path: { routine_id: "00000000-0000-0000-0000-000000000000" } });
727
+ ```
728
+
729
+ ---
730
+
731
+ <a id="op-editworkmemory"></a>
732
+
733
+ ### `g8.api.work.editWorkMemory(input)`
734
+
735
+ **Edit Work Memory**
736
+
737
+ - HTTP: `PUT /api/v1/work/memory`
738
+ - operationId: `edit_work_memory_work_memory_put` (also callable as `g8.api.call("edit_work_memory_work_memory_put", input)`)
739
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
740
+ - API-key scope: `work:write`
741
+
742
+ Replace one memory topic. ``expected_revision`` is a compare-and-swap; stale is ``409``.
743
+
744
+ **Input**
745
+
746
+ | Field | Type | Required | Description |
747
+ |---|---|---|---|
748
+ | `body` | `WorkMemoryEditRequest` | yes | Request body; fields below. |
749
+
750
+ Body fields (`WorkMemoryEditRequest`):
751
+
752
+ | Field | Type | Required | Description |
753
+ |---|---|---|---|
754
+ | `body.content` | `string` | yes | The new content max length 49152 |
755
+ | `body.expected_revision` | `string \| null` | yes | The `revision` you read, or null when the topic is new pattern `^[a-f0-9]{64}$` |
756
+ | `body.topic` | `"profile" \| "goals" \| "decisions" \| "feedback" \| "corrections" \| "entities"` | yes | The topic to replace |
757
+ | `body.agent_id` | `string (uuid) \| null` | no | Required for, and only for, `agent` scope |
758
+ | `body.scope` | `"personal" \| "agent" \| "team"` | no | `personal`, `agent` or `team` default `"personal"` |
759
+
760
+ **Returns** `ApiResponse_WorkMemoryNote_`: the envelope `{ data: WorkMemoryNote, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
761
+
762
+ Other envelope fields: `pagination` (PaginationMeta).
763
+
764
+ `WorkMemoryNote` fields:
765
+
766
+ | Field | Type | Required | Description |
767
+ |---|---|---|---|
768
+ | `content` | `string \| null` | no | Content |
769
+ | `revision` | `string \| null` | no | Revision; send it back to edit or move |
770
+ | `size_bytes` | `integer \| null` | no | Stored size |
771
+ | `topic` | `string \| null` | no | Topic |
772
+ | `updated_at` | `string \| null` | no | Last write time |
773
+
774
+ **Example**
775
+
776
+ ```ts
777
+ const result = await g8.api.work.editWorkMemory({
778
+ body: { content: "example", expected_revision: "example", topic: "profile" },
779
+ });
780
+ ```
781
+
782
+ ---
783
+
784
+ <a id="op-editworkmessage"></a>
785
+
786
+ ### `g8.api.work.editWorkMessage(input)`
787
+
788
+ **Edit Work Message**
789
+
790
+ - HTTP: `PATCH /api/v1/work/messages/{message_id}`
791
+ - operationId: `edit_work_message_work_messages__message_id__patch` (also callable as `g8.api.call("edit_work_message_work_messages__message_id__patch", input)`)
792
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
793
+ - API-key scope: `work:write`
794
+
795
+ Correct a message this credential authored.
796
+
797
+ Deliberately not a re-send: no agent turn runs again and nobody is notified,
798
+ so an agent that already acted on the first wording is not run twice. Pass
799
+ ``expected_revision`` to make the edit conditional on the version you read.
800
+
801
+ **Input**
802
+
803
+ | Field | Type | Required | Description |
804
+ |---|---|---|---|
805
+ | `path.message_id` | `string` | yes | Message id |
806
+ | `body` | `WorkMessageEditRequest` | yes | Request body; fields below. |
807
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
808
+
809
+ Body fields (`WorkMessageEditRequest`):
810
+
811
+ | Field | Type | Required | Description |
812
+ |---|---|---|---|
813
+ | `body.document` | `Record<string, unknown> \| null` | no | |
814
+ | `body.expected_revision` | `integer` | no | default `1`, min 1 |
815
+ | `body.text` | `string \| null` | no | max length 12000 |
816
+
817
+ **Returns** `ApiResponse_WorkMessage_`: the envelope `{ data: WorkMessage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
818
+
819
+ Other envelope fields: `pagination` (PaginationMeta).
820
+
821
+ `WorkMessage` fields:
822
+
823
+ | Field | Type | Required | Description |
824
+ |---|---|---|---|
825
+ | `author` | `Record<string, unknown> \| null` | no | Resolved author — always the authenticated principal, never a request field |
826
+ | `channel` | `string \| null` | no | Conversation address — a channel NAME or a direct-message id |
827
+ | `createdAt` | `string \| null` | no | Creation timestamp |
828
+ | `document` | `Record<string, unknown> \| null` | no | Rich-text document, normalized server-side |
829
+ | `id` | `string \| null` | no | Message id |
830
+ | `text` | `string \| null` | no | Plain-text projection of the document |
831
+
832
+ **Example**
833
+
834
+ ```ts
835
+ const result = await g8.api.work.editWorkMessage({ path: { message_id: "id" }, body: {} });
836
+ ```
837
+
838
+ ---
839
+
840
+ <a id="op-forwardworkmessage"></a>
841
+
842
+ ### `g8.api.work.forwardWorkMessage(input)`
843
+
844
+ **Forward Work Message**
845
+
846
+ - HTTP: `POST /api/v1/work/messages/{message_id}/forward`
847
+ - operationId: `forward_work_message_work_messages__message_id__forward_post` (also callable as `g8.api.call("forward_work_message_work_messages__message_id__forward_post", input)`)
848
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
849
+ - API-key scope: `work:write`
850
+
851
+ Copy one message into another conversation, keeping its source attribution.
852
+
853
+ Both ends are checked: the caller must be able to read the original and to
854
+ write into the destination, so forwarding can never move content into a room
855
+ its author could not have posted in.
856
+
857
+ **Input**
858
+
859
+ | Field | Type | Required | Description |
860
+ |---|---|---|---|
861
+ | `path.message_id` | `string` | yes | Message id |
862
+ | `body` | `WorkMessageForwardRequest` | yes | Request body; fields below. |
863
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
864
+
865
+ Body fields (`WorkMessageForwardRequest`):
866
+
867
+ | Field | Type | Required | Description |
868
+ |---|---|---|---|
869
+ | `body.channel` | `string` | yes | min length 1, max length 255 |
870
+
871
+ **Returns** `ApiResponse_WorkMessage_`: the envelope `{ data: WorkMessage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
872
+
873
+ Other envelope fields: `pagination` (PaginationMeta).
874
+
875
+ `WorkMessage` fields:
876
+
877
+ | Field | Type | Required | Description |
878
+ |---|---|---|---|
879
+ | `author` | `Record<string, unknown> \| null` | no | Resolved author — always the authenticated principal, never a request field |
880
+ | `channel` | `string \| null` | no | Conversation address — a channel NAME or a direct-message id |
881
+ | `createdAt` | `string \| null` | no | Creation timestamp |
882
+ | `document` | `Record<string, unknown> \| null` | no | Rich-text document, normalized server-side |
883
+ | `id` | `string \| null` | no | Message id |
884
+ | `text` | `string \| null` | no | Plain-text projection of the document |
885
+
886
+ **Example**
887
+
888
+ ```ts
889
+ const result = await g8.api.work.forwardWorkMessage({ path: { message_id: "id" }, body: { channel: "example" } });
890
+ ```
891
+
892
+ ---
893
+
894
+ <a id="op-getworkagent"></a>
895
+
896
+ ### `g8.api.work.getWorkAgent(input)`
897
+
898
+ **Get Work Agent**
899
+
900
+ - HTTP: `GET /api/v1/work/agents/{agent_id}`
901
+ - operationId: `get_work_agent_work_agents__agent_id__get` (also callable as `g8.api.call("get_work_agent_work_agents__agent_id__get", input)`)
902
+ - Tier: `read`: reads data; safe to call and to retry
903
+ - API-key scope: `work:read`
904
+
905
+ One Work agent. ``403`` when it is another person's private agent.
906
+
907
+ **Input**
908
+
909
+ | Field | Type | Required | Description |
910
+ |---|---|---|---|
911
+ | `path.agent_id` | `string (uuid)` | yes | Agent id |
912
+
913
+ **Returns** `ApiResponse_WorkAgentProfile_`: the envelope `{ data: WorkAgentProfile, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
914
+
915
+ Other envelope fields: `pagination` (PaginationMeta).
916
+
917
+ `WorkAgentProfile` fields:
918
+
919
+ | Field | Type | Required | Description |
920
+ |---|---|---|---|
921
+ | `agent_id` | `string \| null` | no | Agent id |
922
+ | `avatar` | `string \| null` | no | Avatar glyph |
923
+ | `can_edit` | `boolean \| null` | no | Whether this caller may edit it |
924
+ | `description` | `string \| null` | no | Instructions |
925
+ | `name` | `string \| null` | no | Agent name |
926
+ | `owner_id` | `string \| null` | no | Owner identity |
927
+ | `role` | `string \| null` | no | Role |
928
+ | `updated_at` | `string \| null` | no | Last edit time |
929
+ | `version` | `integer \| null` | no | Profile version; send it back to edit |
930
+ | `visibility` | `string \| null` | no | `private` or `organization` |
931
+
932
+ **Example**
933
+
934
+ ```ts
935
+ const result = await g8.api.work.getWorkAgent({ path: { agent_id: "00000000-0000-0000-0000-000000000000" } });
936
+ ```
937
+
938
+ ---
939
+
940
+ <a id="op-getworkagentpolicy"></a>
941
+
942
+ ### `g8.api.work.getWorkAgentPolicy(input?)`
943
+
944
+ **Get Work Agent Policy**
945
+
946
+ - HTTP: `GET /api/v1/work/agents/policy`
947
+ - operationId: `get_work_agent_policy_work_agents_policy_get` (also callable as `g8.api.call("get_work_agent_policy_work_agents_policy_get", input)`)
948
+ - Tier: `read`: reads data; safe to call and to retry
949
+ - API-key scope: `work:read`
950
+
951
+ What this caller may do with Work agents: create a private one, share one org-wide.
952
+
953
+ **Input**: none.
954
+
955
+ **Returns** `ApiResponse_WorkAgentPolicy_`: the envelope `{ data: WorkAgentPolicy, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
956
+
957
+ Other envelope fields: `pagination` (PaginationMeta).
958
+
959
+ `WorkAgentPolicy` fields:
960
+
961
+ | Field | Type | Required | Description |
962
+ |---|---|---|---|
963
+ | `can_create` | `boolean \| null` | no | May create a private agent |
964
+ | `can_share_organization` | `boolean \| null` | no | May create an organization-wide agent |
965
+
966
+ **Example**
967
+
968
+ ```ts
969
+ const result = await g8.api.work.getWorkAgentPolicy();
970
+ ```
971
+
972
+ ---
973
+
974
+ <a id="op-getworkattachmentlink"></a>
975
+
976
+ ### `g8.api.work.getWorkAttachmentLink(input)`
977
+
978
+ **Get Work Attachment Link**
979
+
980
+ - HTTP: `GET /api/v1/work/attachments/{attachment_id}`
981
+ - operationId: `get_work_attachment_link_work_attachments__attachment_id__get` (also callable as `g8.api.call("get_work_attachment_link_work_attachments__attachment_id__get", input)`)
982
+ - Tier: `read`: reads data; safe to call and to retry
983
+ - API-key scope: `work:read`
984
+
985
+ Authorize this credential for one attachment, then mint a short-lived link.
986
+
987
+ Being authenticated is not permission: an attachment id is a UUID in a URL,
988
+ and "holds a key" would otherwise make every file in the organization
989
+ readable. A caller may read an attachment carried by a message in a
990
+ conversation they can see. A missing attachment and an unreadable one both
991
+ answer ``404``, so this cannot be used to probe which ids exist.
992
+
993
+ **Input**
994
+
995
+ | Field | Type | Required | Description |
996
+ |---|---|---|---|
997
+ | `path.attachment_id` | `string` | yes | Attachment id |
998
+ | `query.download` | `boolean` | no | Force a download rather than inline rendering default `false` |
999
+
1000
+ **Returns** `ApiResponse_WorkAttachmentLink_`: the envelope `{ data: WorkAttachmentLink, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1001
+
1002
+ Other envelope fields: `pagination` (PaginationMeta).
1003
+
1004
+ `WorkAttachmentLink` fields:
1005
+
1006
+ | Field | Type | Required | Description |
1007
+ |---|---|---|---|
1008
+ | `expires_in` | `integer` | yes | Seconds until the URL stops working |
1009
+ | `url` | `string` | yes | Time-limited download URL |
1010
+ | `attachment` | `Record<string, unknown>` | no | Stored attachment metadata |
1011
+
1012
+ **Example**
1013
+
1014
+ ```ts
1015
+ const result = await g8.api.work.getWorkAttachmentLink({ path: { attachment_id: "id" } });
1016
+ ```
1017
+
1018
+ ---
1019
+
1020
+ <a id="op-getworkchannelcanvas"></a>
1021
+
1022
+ ### `g8.api.work.getWorkChannelCanvas(input)`
1023
+
1024
+ **Get Work Channel Canvas**
1025
+
1026
+ - HTTP: `GET /api/v1/work/channels/{channel_id}/canvas`
1027
+ - operationId: `get_work_channel_canvas_work_channels__channel_id__canvas_get` (also callable as `g8.api.call("get_work_channel_canvas_work_channels__channel_id__canvas_get", input)`)
1028
+ - Tier: `read`: reads data; safe to call and to retry
1029
+ - API-key scope: `work:read`
1030
+
1031
+ One channel's Canvas, to a caller entitled to that channel.
1032
+
1033
+ ``403`` when the caller may not read the channel — the same rule that
1034
+ decides its messages, so a room cannot be readable on one half and refused
1035
+ on the other. A channel with no Canvas answers an empty one rather than 404.
1036
+
1037
+ **Input**
1038
+
1039
+ | Field | Type | Required | Description |
1040
+ |---|---|---|---|
1041
+ | `path.channel_id` | `string` | yes | Channel id or slug |
1042
+
1043
+ **Returns** `ApiResponse_WorkCanvas_`: the envelope `{ data: WorkCanvas, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1044
+
1045
+ Other envelope fields: `pagination` (PaginationMeta).
1046
+
1047
+ `WorkCanvas` fields:
1048
+
1049
+ | Field | Type | Required | Description |
1050
+ |---|---|---|---|
1051
+ | `channelId` | `string \| null` | no | Channel the canvas belongs to |
1052
+ | `content` | `string \| null` | no | Canvas content |
1053
+ | `revisionId` | `string \| null` | no | Current revision id |
1054
+
1055
+ **Example**
1056
+
1057
+ ```ts
1058
+ const result = await g8.api.work.getWorkChannelCanvas({ path: { channel_id: "id" } });
1059
+ ```
1060
+
1061
+ ---
1062
+
1063
+ <a id="op-getworkdailybrief"></a>
1064
+
1065
+ ### `g8.api.work.getWorkDailyBrief(input?)`
1066
+
1067
+ **Get Work Daily Brief**
1068
+
1069
+ - HTTP: `GET /api/v1/work/preferences/daily-brief`
1070
+ - operationId: `get_work_daily_brief_work_preferences_daily_brief_get` (also callable as `g8.api.call("get_work_daily_brief_work_preferences_daily_brief_get", input)`)
1071
+ - Tier: `read`: reads data; safe to call and to retry
1072
+ - API-key scope: `work:read`
1073
+
1074
+ THIS principal's daily-brief schedule, plus when the next one is due and why.
1075
+
1076
+ **Input**: none.
1077
+
1078
+ **Returns** `ApiResponse_WorkDailyBriefSettings_`: the envelope `{ data: WorkDailyBriefSettings, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1079
+
1080
+ Other envelope fields: `pagination` (PaginationMeta).
1081
+
1082
+ `WorkDailyBriefSettings` fields:
1083
+
1084
+ | Field | Type | Required | Description |
1085
+ |---|---|---|---|
1086
+ | `settings` | `Record<string, unknown> \| null` | no | The stored schedule |
1087
+ | `status` | `Record<string, unknown> \| null` | no | Delivery status (`latestBrief`, `lastBriefDate`, `nextDueAt`, `reason`). Returned on the read only; null on the write |
1088
+
1089
+ **Example**
1090
+
1091
+ ```ts
1092
+ const result = await g8.api.work.getWorkDailyBrief();
1093
+ ```
1094
+
1095
+ ---
1096
+
1097
+ <a id="op-getworkinboxdispositions"></a>
1098
+
1099
+ ### `g8.api.work.getWorkInboxDispositions(input?)`
1100
+
1101
+ **Get Work Inbox Dispositions**
1102
+
1103
+ - HTTP: `GET /api/v1/work/inbox-dispositions`
1104
+ - operationId: `get_work_inbox_dispositions_work_inbox_dispositions_get` (also callable as `g8.api.call("get_work_inbox_dispositions_work_inbox_dispositions_get", input)`)
1105
+ - Tier: `read`: reads data; safe to call and to retry
1106
+ - API-key scope: `work:read`
1107
+
1108
+ THIS principal's Inbox states, keyed by conversation. Never anybody else's.
1109
+
1110
+ **Input**: none.
1111
+
1112
+ **Returns** `ApiResponse_WorkInboxDispositions_`: the envelope `{ data: WorkInboxDispositions, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1113
+
1114
+ Other envelope fields: `pagination` (PaginationMeta).
1115
+
1116
+ `WorkInboxDispositions` fields:
1117
+
1118
+ | Field | Type | Required | Description |
1119
+ |---|---|---|---|
1120
+ | `dispositions` | `Record<string, unknown> \| null` | no | Conversation key -> `active`, `snoozed` or `archived` |
1121
+
1122
+ **Example**
1123
+
1124
+ ```ts
1125
+ const result = await g8.api.work.getWorkInboxDispositions();
1126
+ ```
1127
+
1128
+ ---
1129
+
1130
+ <a id="op-getworkmemory"></a>
1131
+
1132
+ ### `g8.api.work.getWorkMemory(input?)`
1133
+
1134
+ **Get Work Memory**
1135
+
1136
+ - HTTP: `GET /api/v1/work/memory`
1137
+ - operationId: `get_work_memory_work_memory_get` (also callable as `g8.api.call("get_work_memory_work_memory_get", input)`)
1138
+ - Tier: `read`: reads data; safe to call and to retry
1139
+ - API-key scope: `work:read`
1140
+
1141
+ Every topic in one memory scope, and whether this caller may edit it.
1142
+
1143
+ **Input**
1144
+
1145
+ | Field | Type | Required | Description |
1146
+ |---|---|---|---|
1147
+ | `query.scope` | `"personal" \| "agent" \| "team"` | no | `personal`, `agent` or `team` default `"personal"` |
1148
+ | `query.agent_id` | `string (uuid) \| null` | no | Required for, and only for, `agent` scope |
1149
+
1150
+ **Returns** `ApiResponse_WorkMemoryPage_`: the envelope `{ data: WorkMemoryPage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1151
+
1152
+ Other envelope fields: `pagination` (PaginationMeta).
1153
+
1154
+ `WorkMemoryPage` fields:
1155
+
1156
+ | Field | Type | Required | Description |
1157
+ |---|---|---|---|
1158
+ | `agent_id` | `string \| null` | no | The agent, for `agent` scope |
1159
+ | `can_edit` | `boolean \| null` | no | Whether this caller may edit this scope |
1160
+ | `entries` | `Array<WorkMemoryNote> \| null` | no | The topics |
1161
+ | `scope` | `string \| null` | no | The scope read |
1162
+
1163
+ **Example**
1164
+
1165
+ ```ts
1166
+ const result = await g8.api.work.getWorkMemory();
1167
+ ```
1168
+
1169
+ ---
1170
+
1171
+ <a id="op-getworkmessage"></a>
1172
+
1173
+ ### `g8.api.work.getWorkMessage(input)`
1174
+
1175
+ **Get Work Message**
1176
+
1177
+ - HTTP: `GET /api/v1/work/messages/{message_id}`
1178
+ - operationId: `get_work_message_work_messages__message_id__get` (also callable as `g8.api.call("get_work_message_work_messages__message_id__get", input)`)
1179
+ - Tier: `read`: reads data; safe to call and to retry
1180
+ - API-key scope: `work:read`
1181
+
1182
+ One message, if this credential may read the conversation carrying it.
1183
+
1184
+ **Input**
1185
+
1186
+ | Field | Type | Required | Description |
1187
+ |---|---|---|---|
1188
+ | `path.message_id` | `string` | yes | Message id |
1189
+
1190
+ **Returns** `ApiResponse_WorkMessage_`: the envelope `{ data: WorkMessage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1191
+
1192
+ Other envelope fields: `pagination` (PaginationMeta).
1193
+
1194
+ `WorkMessage` fields:
1195
+
1196
+ | Field | Type | Required | Description |
1197
+ |---|---|---|---|
1198
+ | `author` | `Record<string, unknown> \| null` | no | Resolved author — always the authenticated principal, never a request field |
1199
+ | `channel` | `string \| null` | no | Conversation address — a channel NAME or a direct-message id |
1200
+ | `createdAt` | `string \| null` | no | Creation timestamp |
1201
+ | `document` | `Record<string, unknown> \| null` | no | Rich-text document, normalized server-side |
1202
+ | `id` | `string \| null` | no | Message id |
1203
+ | `text` | `string \| null` | no | Plain-text projection of the document |
1204
+
1205
+ **Example**
1206
+
1207
+ ```ts
1208
+ const result = await g8.api.work.getWorkMessage({ path: { message_id: "id" } });
1209
+ ```
1210
+
1211
+ ---
1212
+
1213
+ <a id="op-getworkoversight"></a>
1214
+
1215
+ ### `g8.api.work.getWorkOversight(input?)`
1216
+
1217
+ **Get Work Oversight**
1218
+
1219
+ - HTTP: `GET /api/v1/work/oversight`
1220
+ - operationId: `get_work_oversight_work_oversight_get` (also callable as `g8.api.call("get_work_oversight_work_oversight_get", input)`)
1221
+ - Tier: `read`: reads data; safe to call and to retry
1222
+ - API-key scope: `work:read`
1223
+
1224
+ What needs a person: pending approvals, blocked work and unattended fixes.
1225
+
1226
+ Read-only, and read from the canonical approval and work-item tables rather
1227
+ than from relay events. Each group carries its own state, so an empty list
1228
+ always says which of "nothing here", "we could not find out" and "nothing is
1229
+ recorded for this workspace" it means. Deciding an approval is not part of
1230
+ this surface — see the module docstring.
1231
+
1232
+ **Input**
1233
+
1234
+ | Field | Type | Required | Description |
1235
+ |---|---|---|---|
1236
+ | `query.limit` | `integer` | no | Maximum rows PER GROUP default `50` |
1237
+ | `query.fix_window_hours` | `integer` | no | How far back autonomous fixes are read default `24` |
1238
+
1239
+ **Returns** `ApiResponse_WorkOversight_`: the envelope `{ data: WorkOversight, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1240
+
1241
+ Other envelope fields: `pagination` (PaginationMeta).
1242
+
1243
+ **Example**
1244
+
1245
+ ```ts
1246
+ const result = await g8.api.work.getWorkOversight();
1247
+ ```
1248
+
1249
+ ---
1250
+
1251
+ <a id="op-getworkreadmarkers"></a>
1252
+
1253
+ ### `g8.api.work.getWorkReadMarkers(input?)`
1254
+
1255
+ **Get Work Read Markers**
1256
+
1257
+ - HTTP: `GET /api/v1/work/read-markers`
1258
+ - operationId: `get_work_read_markers_work_read_markers_get` (also callable as `g8.api.call("get_work_read_markers_work_read_markers_get", input)`)
1259
+ - Tier: `read`: reads data; safe to call and to retry
1260
+ - API-key scope: `work:read`
1261
+
1262
+ How far THIS principal has read each conversation. Never anybody else's.
1263
+
1264
+ **Input**: none.
1265
+
1266
+ **Returns** `ApiResponse_WorkReadMarkers_`: the envelope `{ data: WorkReadMarkers, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1267
+
1268
+ Other envelope fields: `pagination` (PaginationMeta).
1269
+
1270
+ `WorkReadMarkers` fields:
1271
+
1272
+ | Field | Type | Required | Description |
1273
+ |---|---|---|---|
1274
+ | `markers` | `Record<string, unknown> \| null` | no | Conversation key -> the point this principal has read to |
1275
+
1276
+ **Example**
1277
+
1278
+ ```ts
1279
+ const result = await g8.api.work.getWorkReadMarkers();
1280
+ ```
1281
+
1282
+ ---
1283
+
1284
+ <a id="op-getworkroom"></a>
1285
+
1286
+ ### `g8.api.work.getWorkRoom(input?)`
1287
+
1288
+ **Get Work Room**
1289
+
1290
+ - HTTP: `GET /api/v1/work/room`
1291
+ - operationId: `get_work_room_work_room_get` (also callable as `g8.api.call("get_work_room_work_room_get", input)`)
1292
+ - Tier: `read`: reads data; safe to call and to retry
1293
+ - API-key scope: `work:read`
1294
+
1295
+ The whole Work room this credential may read, in one call.
1296
+
1297
+ Channels, conversations, recent messages and events, the member directory
1298
+ and the agent roster — narrowed to the caller's own audience and bounded to
1299
+ the recent end of history. ``truncation`` names what was left out and
1300
+ carries the cursor to resume each conversation from at
1301
+ ``GET /work/conversations/{conversation_id}/messages``.
1302
+
1303
+ For an organisation credential that audience is the built-in channels; see
1304
+ the module docstring for why, and for what it is not.
1305
+
1306
+ **Input**: none.
1307
+
1308
+ **Returns** `ApiResponse_WorkRoom_`: the envelope `{ data: WorkRoom, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1309
+
1310
+ Other envelope fields: `pagination` (PaginationMeta).
1311
+
1312
+ `WorkRoom` fields:
1313
+
1314
+ | Field | Type | Required | Description |
1315
+ |---|---|---|---|
1316
+ | `agents` | `Array<Record<string, unknown>> \| null` | no | Agent roster available in this workspace |
1317
+ | `counts` | `Record<string, unknown> \| null` | no | Per-collection counts of what the caller can see |
1318
+ | `members` | `Array<Record<string, unknown>> \| null` | no | Organization member directory, for turning an actor id into a name |
1319
+ | `room` | `Record<string, unknown> \| null` | no | Channels, direct messages, messages, events and per-viewer state the caller may read |
1320
+ | `truncation` | `Record<string, unknown> \| null` | no | What was left out of the bounded read, and the cursors to resume from |
1321
+
1322
+ **Example**
1323
+
1324
+ ```ts
1325
+ const result = await g8.api.work.getWorkRoom();
1326
+ ```
1327
+
1328
+ ---
1329
+
1330
+ <a id="op-getworkteamhistory"></a>
1331
+
1332
+ ### `g8.api.work.getWorkTeamHistory(input?)`
1333
+
1334
+ **Get Work Team History**
1335
+
1336
+ - HTTP: `GET /api/v1/work/team-hq/history`
1337
+ - operationId: `get_work_team_history_work_team_hq_history_get` (also callable as `g8.api.call("get_work_team_history_work_team_hq_history_get", input)`)
1338
+ - Tier: `read`: reads data; safe to call and to retry
1339
+ - API-key scope: `work:read`
1340
+
1341
+ Per-rep daily series behind the board. A null day was not measured; it is not zero.
1342
+
1343
+ **Input**
1344
+
1345
+ | Field | Type | Required | Description |
1346
+ |---|---|---|---|
1347
+ | `query.days` | `integer` | no | Window size in days; clamped to 3-31 default `7` |
1348
+
1349
+ **Returns** `ApiResponse_WorkTeamHqHistory_`: the envelope `{ data: WorkTeamHqHistory, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1350
+
1351
+ Other envelope fields: `pagination` (PaginationMeta).
1352
+
1353
+ `WorkTeamHqHistory` fields:
1354
+
1355
+ | Field | Type | Required | Description |
1356
+ |---|---|---|---|
1357
+ | `days` | `Array<string> \| null` | no | The dates in the window, oldest first |
1358
+ | `reps` | `Array<Record<string, unknown>> \| null` | no | Per-rep series; null for a day that was not measured (a gap is not a zero) |
1359
+ | `source` | `string \| null` | no | `live`, `cached` or `unavailable` |
1360
+
1361
+ **Example**
1362
+
1363
+ ```ts
1364
+ const result = await g8.api.work.getWorkTeamHistory();
1365
+ ```
1366
+
1367
+ ---
1368
+
1369
+ <a id="op-getworkteamleaderboard"></a>
1370
+
1371
+ ### `g8.api.work.getWorkTeamLeaderboard(input?)`
1372
+
1373
+ **Get Work Team Leaderboard**
1374
+
1375
+ - HTTP: `GET /api/v1/work/team-hq/leaderboard`
1376
+ - operationId: `get_work_team_leaderboard_work_team_hq_leaderboard_get` (also callable as `g8.api.call("get_work_team_leaderboard_work_team_hq_leaderboard_get", input)`)
1377
+ - Tier: `read`: reads data; safe to call and to retry
1378
+ - API-key scope: `work:read`
1379
+
1380
+ The Team HQ board over the organization's own SDR analytics.
1381
+
1382
+ ``source`` is the honesty field: ``live``, ``cached``, ``partial`` (then
1383
+ ``degradedMetrics`` names the columns that failed, ABSENT from every row
1384
+ rather than zero) or ``unavailable`` (``rows`` empty on purpose).
1385
+
1386
+ **Input**
1387
+
1388
+ | Field | Type | Required | Description |
1389
+ |---|---|---|---|
1390
+ | `query.period` | `"day" \| "month"` | no | `day` or `month` default `"day"` |
1391
+
1392
+ **Returns** `ApiResponse_WorkTeamHqLeaderboard_`: the envelope `{ data: WorkTeamHqLeaderboard, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1393
+
1394
+ Other envelope fields: `pagination` (PaginationMeta).
1395
+
1396
+ `WorkTeamHqLeaderboard` fields:
1397
+
1398
+ | Field | Type | Required | Description |
1399
+ |---|---|---|---|
1400
+ | `degradedMetrics` | `Array<string> \| null` | no | Columns that failed to measure; absent from every row rather than zero |
1401
+ | `generatedAt` | `string \| null` | no | When this response was built |
1402
+ | `goals` | `Record<string, unknown> \| null` | no | Per role-group goals, or null |
1403
+ | `measuredAt` | `string \| null` | no | When the rows were measured; null when unavailable |
1404
+ | `period` | `string \| null` | no | `day` or `month` |
1405
+ | `rows` | `Array<Record<string, unknown>> \| null` | no | One row per rep |
1406
+ | `source` | `string \| null` | no | `live`, `cached`, `partial` or `unavailable` |
1407
+
1408
+ **Example**
1409
+
1410
+ ```ts
1411
+ const result = await g8.api.work.getWorkTeamLeaderboard();
1412
+ ```
1413
+
1414
+ ---
1415
+
1416
+ <a id="op-listavailableworkchannels"></a>
1417
+
1418
+ ### `g8.api.work.listAvailableWorkChannels(input?)`
1419
+
1420
+ **List Available Work Channels**
1421
+
1422
+ - HTTP: `GET /api/v1/work/channels/available`
1423
+ - operationId: `list_available_work_channels_work_channels_available_get` (also callable as `g8.api.call("list_available_work_channels_work_channels_available_get", input)`)
1424
+ - Tier: `read`: reads data; safe to call and to retry
1425
+ - API-key scope: `work:read`
1426
+
1427
+ The organization's channels this credential is not part of.
1428
+
1429
+ The channel browser. An ``open`` channel carries its description and member
1430
+ count; a ``private`` one answers with identity only, so a room nobody here
1431
+ belongs to is listed without leaking anything about it. Built-ins and
1432
+ archived channels are absent.
1433
+
1434
+ **Input**: none.
1435
+
1436
+ **Returns** `ApiResponse_WorkAvailableChannelList_`: the envelope `{ data: WorkAvailableChannelList, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1437
+
1438
+ Other envelope fields: `pagination` (PaginationMeta).
1439
+
1440
+ `WorkAvailableChannelList` fields:
1441
+
1442
+ | Field | Type | Required | Description |
1443
+ |---|---|---|---|
1444
+ | `channels` | `Array<WorkAvailableChannel>` | no | Channels the caller is not part of |
1445
+
1446
+ **Example**
1447
+
1448
+ ```ts
1449
+ const result = await g8.api.work.listAvailableWorkChannels();
1450
+ ```
1451
+
1452
+ ---
1453
+
1454
+ <a id="op-listworkactivity"></a>
1455
+
1456
+ ### `g8.api.work.listWorkActivity(input?)`
1457
+
1458
+ **List Work Activity**
1459
+
1460
+ - HTTP: `GET /api/v1/work/activity`
1461
+ - operationId: `list_work_activity_work_activity_get` (also callable as `g8.api.call("list_work_activity_work_activity_get", input)`)
1462
+ - Tier: `read`: reads data; safe to call and to retry
1463
+ - API-key scope: `work:read`
1464
+
1465
+ What happened in Work, newest first, scoped to what this credential may read.
1466
+
1467
+ One row per consequential act — a message sent, a conversation created, an
1468
+ approval decided, an execution finished. Filterable by actor kind, agent,
1469
+ category, conversation, consequence, time window and free text.
1470
+
1471
+ **Input**
1472
+
1473
+ | Field | Type | Required | Description |
1474
+ |---|---|---|---|
1475
+ | `query.limit` | `integer \| null` | no | Page size; clamped to the server maximum |
1476
+ | `query.cursor` | `string \| null` | no | Opaque cursor from a previous page |
1477
+ | `query.actor` | `string \| null` | no | `human`, `agent`, `runner` or `system` |
1478
+ | `query.agentId` | `string \| null` | no | Only this agent's activity |
1479
+ | `query.category` | `string \| null` | no | message, conversation, approval, execution, workflow, canvas or configuration |
1480
+ | `query.conversation` | `string \| null` | no | Only this conversation |
1481
+ | `query.consequence` | `string \| null` | no | requested, changed, approved, completed, failed or recorded |
1482
+ | `query.from` | `string \| null` | no | ISO timestamp; inclusive lower bound |
1483
+ | `query.to` | `string \| null` | no | ISO timestamp; inclusive upper bound |
1484
+ | `query.q` | `string \| null` | no | Free text |
1485
+
1486
+ **Returns** `ApiResponse_WorkActivityPage_`: the envelope `{ data: WorkActivityPage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1487
+
1488
+ Other envelope fields: `pagination` (PaginationMeta).
1489
+
1490
+ `WorkActivityPage` fields:
1491
+
1492
+ | Field | Type | Required | Description |
1493
+ |---|---|---|---|
1494
+ | `events` | `Array<WorkActivityEntry>` | no | Activity entries, newest first |
1495
+ | `has_more` | `boolean` | no | Whether older entries remain default `false` |
1496
+ | `next_cursor` | `string \| null` | no | Opaque cursor for the next page |
1497
+
1498
+ **Example**
1499
+
1500
+ ```ts
1501
+ const result = await g8.api.work.listWorkActivity();
1502
+ ```
1503
+
1504
+ ---
1505
+
1506
+ <a id="op-listworkagentexecutionidentities"></a>
1507
+
1508
+ ### `g8.api.work.listWorkAgentExecutionIdentities(input?)`
1509
+
1510
+ **List Work Agent Execution Identities**
1511
+
1512
+ - HTTP: `GET /api/v1/work/agents/execution-identities`
1513
+ - operationId: `list_work_agent_execution_identities_work_agents_execution_identities_get` (also callable as `g8.api.call("list_work_agent_execution_identities_work_agents_execution_identities_get", input)`)
1514
+ - Tier: `read`: reads data; safe to call and to retry
1515
+ - API-key scope: `work:read`
1516
+
1517
+ The agent identities this caller may run work as.
1518
+
1519
+ A source that could not be read degrades to a ``warnings`` entry rather than
1520
+ failing the list, as in the app.
1521
+
1522
+ **Input**: none.
1523
+
1524
+ **Returns** `ApiResponse_WorkAgentExecutionIdentities_`: the envelope `{ data: WorkAgentExecutionIdentities, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1525
+
1526
+ Other envelope fields: `pagination` (PaginationMeta).
1527
+
1528
+ `WorkAgentExecutionIdentities` fields:
1529
+
1530
+ | Field | Type | Required | Description |
1531
+ |---|---|---|---|
1532
+ | `items` | `Array<Record<string, unknown>> \| null` | no | Execution identities |
1533
+ | `warnings` | `Array<string> \| null` | no | Identities that could not be resolved |
1534
+
1535
+ **Example**
1536
+
1537
+ ```ts
1538
+ const result = await g8.api.work.listWorkAgentExecutionIdentities();
1539
+ ```
1540
+
1541
+ ---
1542
+
1543
+ <a id="op-listworkagents"></a>
1544
+
1545
+ ### `g8.api.work.listWorkAgents(input?)`
1546
+
1547
+ **List Work Agents**
1548
+
1549
+ - HTTP: `GET /api/v1/work/agents`
1550
+ - operationId: `list_work_agents_work_agents_get` (also callable as `g8.api.call("list_work_agents_work_agents_get", input)`)
1551
+ - Tier: `read`: reads data; safe to call and to retry
1552
+ - API-key scope: `work:read`
1553
+
1554
+ The Work agents this caller may see: their own and the organization's shared ones.
1555
+
1556
+ **Input**
1557
+
1558
+ | Field | Type | Required | Description |
1559
+ |---|---|---|---|
1560
+ | `query.limit` | `integer` | no | Page size default `50` |
1561
+ | `query.after` | `string (uuid) \| null` | no | `next_cursor` from the previous page |
1562
+
1563
+ **Returns** `ApiResponse_WorkAgentProfilePage_`: the envelope `{ data: WorkAgentProfilePage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1564
+
1565
+ Other envelope fields: `pagination` (PaginationMeta).
1566
+
1567
+ `WorkAgentProfilePage` fields:
1568
+
1569
+ | Field | Type | Required | Description |
1570
+ |---|---|---|---|
1571
+ | `items` | `Array<WorkAgentProfile>` | no | Agents on this page |
1572
+ | `next_cursor` | `string \| null` | no | Pass as `after` for the next page |
1573
+
1574
+ **Example**
1575
+
1576
+ ```ts
1577
+ const result = await g8.api.work.listWorkAgents();
1578
+ ```
1579
+
1580
+ ---
1581
+
1582
+ <a id="op-listworkchannels"></a>
1583
+
1584
+ ### `g8.api.work.listWorkChannels(input?)`
1585
+
1586
+ **List Work Channels**
1587
+
1588
+ - HTTP: `GET /api/v1/work/channels`
1589
+ - operationId: `list_work_channels_work_channels_get` (also callable as `g8.api.call("list_work_channels_work_channels_get", input)`)
1590
+ - Tier: `read`: reads data; safe to call and to retry
1591
+ - API-key scope: `work:read`
1592
+
1593
+ The channels this credential may read.
1594
+
1595
+ The cheap half of ``GET /work/room``: membership only, no message or event
1596
+ history. Decided by ``room_visibility.visible_room`` — the same predicate
1597
+ the room read and the realtime socket run — so a channel can never be listed
1598
+ here and refused there.
1599
+
1600
+ **Input**: none.
1601
+
1602
+ **Returns** `ApiResponse_WorkChannelList_`: the envelope `{ data: WorkChannelList, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1603
+
1604
+ Other envelope fields: `pagination` (PaginationMeta).
1605
+
1606
+ `WorkChannelList` fields:
1607
+
1608
+ | Field | Type | Required | Description |
1609
+ |---|---|---|---|
1610
+ | `channels` | `Array<WorkChannel>` | no | Channels visible to the caller |
1611
+
1612
+ **Example**
1613
+
1614
+ ```ts
1615
+ const result = await g8.api.work.listWorkChannels();
1616
+ ```
1617
+
1618
+ ---
1619
+
1620
+ <a id="op-listworkconversationevents"></a>
1621
+
1622
+ ### `g8.api.work.listWorkConversationEvents(input)`
1623
+
1624
+ **List Work Conversation Events**
1625
+
1626
+ - HTTP: `GET /api/v1/work/conversations/{conversation_id}/events`
1627
+ - operationId: `list_work_conversation_events_work_conversations__conversation_id__events_get` (also callable as `g8.api.call("list_work_conversation_events_work_conversations__conversation_id__events_get", input)`)
1628
+ - Tier: `read`: reads data; safe to call and to retry
1629
+ - API-key scope: `work:read`
1630
+
1631
+ Page one conversation's chat events, newest first.
1632
+
1633
+ The twin of the message page, and not redundant with it: some Work history
1634
+ exists only as an event and has no message row at all, so a client told
1635
+ ``truncation.events`` needs this route to fetch what it lost. Same
1636
+ authorization, same cursor encoding.
1637
+
1638
+ **Input**
1639
+
1640
+ | Field | Type | Required | Description |
1641
+ |---|---|---|---|
1642
+ | `path.conversation_id` | `string` | yes | Channel name, channel id, or direct-message id |
1643
+ | `query.limit` | `integer` | no | Page size; clamped to the server maximum default `50` |
1644
+ | `query.cursor` | `string \| null` | no | Opaque cursor from a previous page |
1645
+
1646
+ **Returns** `ApiResponse_WorkEventPage_`: the envelope `{ data: WorkEventPage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1647
+
1648
+ Other envelope fields: `pagination` (PaginationMeta).
1649
+
1650
+ `WorkEventPage` fields:
1651
+
1652
+ | Field | Type | Required | Description |
1653
+ |---|---|---|---|
1654
+ | `conversation_id` | `string` | yes | The conversation these events belong to |
1655
+ | `cleared_behind` | `boolean \| null` | no | True when the caller's own clear watermark hides everything older |
1656
+ | `events` | `Array<WorkEvent>` | no | Events the caller may read |
1657
+ | `has_more` | `boolean` | no | Whether older stored rows remain default `false` |
1658
+ | `next_cursor` | `string \| null` | no | Opaque cursor for the next page |
1659
+
1660
+ **Example**
1661
+
1662
+ ```ts
1663
+ const result = await g8.api.work.listWorkConversationEvents({ path: { conversation_id: "id" } });
1664
+ ```
1665
+
1666
+ ---
1667
+
1668
+ <a id="op-listworkconversationfiles"></a>
1669
+
1670
+ ### `g8.api.work.listWorkConversationFiles(input)`
1671
+
1672
+ **List Work Conversation Files**
1673
+
1674
+ - HTTP: `GET /api/v1/work/conversations/{conversation_id}/files`
1675
+ - operationId: `list_work_conversation_files_work_conversations__conversation_id__files_get` (also callable as `g8.api.call("list_work_conversation_files_work_conversations__conversation_id__files_get", input)`)
1676
+ - Tier: `read`: reads data; safe to call and to retry
1677
+ - API-key scope: `work:read`
1678
+
1679
+ The messages in one conversation that carry files, newest first.
1680
+
1681
+ Shared-file history uses exactly the conversation's live read permissions —
1682
+ losing access to a room loses access to what was shared in it.
1683
+
1684
+ **Input**
1685
+
1686
+ | Field | Type | Required | Description |
1687
+ |---|---|---|---|
1688
+ | `path.conversation_id` | `string` | yes | Channel name, channel id, or direct-message id |
1689
+ | `query.limit` | `integer` | no | Page size; clamped to the server maximum default `50` |
1690
+ | `query.cursor` | `string \| null` | no | Opaque cursor from a previous page |
1691
+ | `query.query` | `string` | no | Filter by filename default `""` |
1692
+
1693
+ **Returns** `ApiResponse_WorkMessagePage_`: the envelope `{ data: WorkMessagePage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1694
+
1695
+ Other envelope fields: `pagination` (PaginationMeta).
1696
+
1697
+ `WorkMessagePage` fields:
1698
+
1699
+ | Field | Type | Required | Description |
1700
+ |---|---|---|---|
1701
+ | `conversation_id` | `string` | yes | The conversation these messages belong to |
1702
+ | `cleared_behind` | `boolean \| null` | no | True when the caller's own clear watermark hides everything older |
1703
+ | `has_more` | `boolean` | no | Whether older stored rows remain default `false` |
1704
+ | `messages` | `Array<WorkMessage>` | no | Messages the caller may read |
1705
+ | `next_cursor` | `string \| null` | no | Opaque cursor for the next page |
1706
+
1707
+ **Example**
1708
+
1709
+ ```ts
1710
+ const result = await g8.api.work.listWorkConversationFiles({ path: { conversation_id: "id" } });
1711
+ ```
1712
+
1713
+ ---
1714
+
1715
+ <a id="op-listworkconversationmessages"></a>
1716
+
1717
+ ### `g8.api.work.listWorkConversationMessages(input)`
1718
+
1719
+ **List Work Conversation Messages**
1720
+
1721
+ - HTTP: `GET /api/v1/work/conversations/{conversation_id}/messages`
1722
+ - operationId: `list_work_conversation_messages_work_conversations__conversation_id__messages_get` (also callable as `g8.api.call("list_work_conversation_messages_work_conversations__conversation_id__messages_get", input)`)
1723
+ - Tier: `read`: reads data; safe to call and to retry
1724
+ - API-key scope: `work:read`
1725
+
1726
+ Page one conversation's messages, newest first.
1727
+
1728
+ Authorization happens before a single message is read, and an unreadable id
1729
+ and an unknown id produce the same ``403`` on purpose: handing back an empty
1730
+ page for a conversation the caller may not see would still confirm it
1731
+ exists.
1732
+
1733
+ **Input**
1734
+
1735
+ | Field | Type | Required | Description |
1736
+ |---|---|---|---|
1737
+ | `path.conversation_id` | `string` | yes | Channel name, channel id, or direct-message id |
1738
+ | `query.limit` | `integer` | no | Page size; clamped to the server maximum default `50` |
1739
+ | `query.cursor` | `string \| null` | no | Opaque cursor from a previous page |
1740
+
1741
+ **Returns** `ApiResponse_WorkMessagePage_`: the envelope `{ data: WorkMessagePage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1742
+
1743
+ Other envelope fields: `pagination` (PaginationMeta).
1744
+
1745
+ `WorkMessagePage` fields:
1746
+
1747
+ | Field | Type | Required | Description |
1748
+ |---|---|---|---|
1749
+ | `conversation_id` | `string` | yes | The conversation these messages belong to |
1750
+ | `cleared_behind` | `boolean \| null` | no | True when the caller's own clear watermark hides everything older |
1751
+ | `has_more` | `boolean` | no | Whether older stored rows remain default `false` |
1752
+ | `messages` | `Array<WorkMessage>` | no | Messages the caller may read |
1753
+ | `next_cursor` | `string \| null` | no | Opaque cursor for the next page |
1754
+
1755
+ **Example**
1756
+
1757
+ ```ts
1758
+ const result = await g8.api.work.listWorkConversationMessages({ path: { conversation_id: "id" } });
1759
+ ```
1760
+
1761
+ ---
1762
+
1763
+ <a id="op-listworkitemhistory"></a>
1764
+
1765
+ ### `g8.api.work.listWorkItemHistory(input?)`
1766
+
1767
+ **List Work Item History**
1768
+
1769
+ - HTTP: `GET /api/v1/work/work-items/history`
1770
+ - operationId: `list_work_item_history_work_work_items_history_get` (also callable as `g8.api.call("list_work_item_history_work_work_items_history_get", input)`)
1771
+ - Tier: `read`: reads data; safe to call and to retry
1772
+ - API-key scope: `work:read`
1773
+
1774
+ Agent work that has ENDED — completed, failed or cancelled, newest first.
1775
+
1776
+ Same table and the same visibility scope as ``GET /work/work-items``; each
1777
+ row adds ``sessionId`` when a chat session is bound to it.
1778
+
1779
+ **Input**
1780
+
1781
+ | Field | Type | Required | Description |
1782
+ |---|---|---|---|
1783
+ | `query.limit` | `integer` | no | Maximum rows returned default `50` |
1784
+
1785
+ **Returns** `ApiResponse_WorkItemList_`: the envelope `{ data: WorkItemList, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1786
+
1787
+ Other envelope fields: `pagination` (PaginationMeta).
1788
+
1789
+ `WorkItemList` fields:
1790
+
1791
+ | Field | Type | Required | Description |
1792
+ |---|---|---|---|
1793
+ | `work_items` | `Array<WorkItem>` | no | Work items visible to the caller |
1794
+
1795
+ **Example**
1796
+
1797
+ ```ts
1798
+ const result = await g8.api.work.listWorkItemHistory();
1799
+ ```
1800
+
1801
+ ---
1802
+
1803
+ <a id="op-listworkitems"></a>
1804
+
1805
+ ### `g8.api.work.listWorkItems(input?)`
1806
+
1807
+ **List Work Items**
1808
+
1809
+ - HTTP: `GET /api/v1/work/work-items`
1810
+ - operationId: `list_work_items_work_work_items_get` (also callable as `g8.api.call("list_work_items_work_work_items_get", input)`)
1811
+ - Tier: `read`: reads data; safe to call and to retry
1812
+ - API-key scope: `work:read`
1813
+
1814
+ Agent work that is RUNNING.
1815
+
1816
+ The in-flight half of the All Work board. An organisation credential owns no
1817
+ individual's items, so it sees the organization's shared rows — the same
1818
+ answer the identity filter gives any principal with no personal identity.
1819
+
1820
+ **Input**
1821
+
1822
+ | Field | Type | Required | Description |
1823
+ |---|---|---|---|
1824
+ | `query.limit` | `integer` | no | Maximum rows returned default `50` |
1825
+
1826
+ **Returns** `ApiResponse_WorkItemList_`: the envelope `{ data: WorkItemList, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1827
+
1828
+ Other envelope fields: `pagination` (PaginationMeta).
1829
+
1830
+ `WorkItemList` fields:
1831
+
1832
+ | Field | Type | Required | Description |
1833
+ |---|---|---|---|
1834
+ | `work_items` | `Array<WorkItem>` | no | Work items visible to the caller |
1835
+
1836
+ **Example**
1837
+
1838
+ ```ts
1839
+ const result = await g8.api.work.listWorkItems();
1840
+ ```
1841
+
1842
+ ---
1843
+
1844
+ <a id="op-listworkrecentactivity"></a>
1845
+
1846
+ ### `g8.api.work.listWorkRecentActivity(input?)`
1847
+
1848
+ **List Work Recent Activity**
1849
+
1850
+ - HTTP: `GET /api/v1/work/team-hq/recent-activity`
1851
+ - operationId: `list_work_recent_activity_work_team_hq_recent_activity_get` (also callable as `g8.api.call("list_work_recent_activity_work_team_hq_recent_activity_get", input)`)
1852
+ - Tier: `read`: reads data; safe to call and to retry
1853
+ - API-key scope: `work:read`
1854
+
1855
+ The Team HQ ticker's recent moments for this organization, newest first.
1856
+
1857
+ A different feed from ``GET /work/activity`` (the room's own history): this
1858
+ is the org-wide revenue ticker, read from an org-scoped key, so another
1859
+ organization's log is unreachable by construction.
1860
+
1861
+ **Input**: none.
1862
+
1863
+ **Returns** `ApiResponse_WorkTickerEvents_`: the envelope `{ data: WorkTickerEvents, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1864
+
1865
+ Other envelope fields: `pagination` (PaginationMeta).
1866
+
1867
+ `WorkTickerEvents` fields:
1868
+
1869
+ | Field | Type | Required | Description |
1870
+ |---|---|---|---|
1871
+ | `events` | `Array<Record<string, unknown>> \| null` | no | Moments, newest first |
1872
+ | `source` | `string \| null` | no | `live` for the receipts drill-down |
1873
+
1874
+ **Example**
1875
+
1876
+ ```ts
1877
+ const result = await g8.api.work.listWorkRecentActivity();
1878
+ ```
1879
+
1880
+ ---
1881
+
1882
+ <a id="op-listworkroutineruns"></a>
1883
+
1884
+ ### `g8.api.work.listWorkRoutineRuns(input)`
1885
+
1886
+ **List Work Routine Runs**
1887
+
1888
+ - HTTP: `GET /api/v1/work/routines/{routine_id}/runs`
1889
+ - operationId: `list_work_routine_runs_work_routines__routine_id__runs_get` (also callable as `g8.api.call("list_work_routine_runs_work_routines__routine_id__runs_get", input)`)
1890
+ - Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
1891
+ - API-key scope: `work:run`
1892
+
1893
+ The run ledger for one routine: telemetry only, newest first.
1894
+
1895
+ A plain list. It is named in ``READ_ONLY_ACTIVE_GET_ROUTES`` so the scope
1896
+ generator's ``/run`` marker does not escalate reading history into
1897
+ triggering work.
1898
+
1899
+ **Input**
1900
+
1901
+ | Field | Type | Required | Description |
1902
+ |---|---|---|---|
1903
+ | `path.routine_id` | `string (uuid)` | yes | Routine id |
1904
+ | `query.limit` | `integer` | no | Maximum runs returned default `25` |
1905
+
1906
+ **Returns** `ApiResponse_WorkRoutineRunList_`: the envelope `{ data: WorkRoutineRunList, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1907
+
1908
+ Other envelope fields: `pagination` (PaginationMeta).
1909
+
1910
+ `WorkRoutineRunList` fields:
1911
+
1912
+ | Field | Type | Required | Description |
1913
+ |---|---|---|---|
1914
+ | `runs` | `Array<WorkRoutineRun>` | no | Runs, newest first |
1915
+
1916
+ **Example**
1917
+
1918
+ ```ts
1919
+ // billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
1920
+ const result = await g8.api.work.listWorkRoutineRuns({ path: { routine_id: "00000000-0000-0000-0000-000000000000" } });
1921
+ ```
1922
+
1923
+ ---
1924
+
1925
+ <a id="op-listworkroutines"></a>
1926
+
1927
+ ### `g8.api.work.listWorkRoutines(input?)`
1928
+
1929
+ **List Work Routines**
1930
+
1931
+ - HTTP: `GET /api/v1/work/routines`
1932
+ - operationId: `list_work_routines_work_routines_get` (also callable as `g8.api.call("list_work_routines_work_routines_get", input)`)
1933
+ - Tier: `read`: reads data; safe to call and to retry
1934
+ - API-key scope: `work:read`
1935
+
1936
+ Every routine in this organization's workspace, with its recent run activity.
1937
+
1938
+ A routine is a standing instruction to an agent, delivered into one
1939
+ conversation, on a schedule or on an event. ``503`` when the workspace has
1940
+ never been provisioned to hold routines — nothing the caller sent is wrong.
1941
+
1942
+ **Input**: none.
1943
+
1944
+ **Returns** `ApiResponse_WorkRoutineList_`: the envelope `{ data: WorkRoutineList, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1945
+
1946
+ Other envelope fields: `pagination` (PaginationMeta).
1947
+
1948
+ `WorkRoutineList` fields:
1949
+
1950
+ | Field | Type | Required | Description |
1951
+ |---|---|---|---|
1952
+ | `routines` | `Array<WorkRoutine>` | no | Routines, with recent event activity folded in |
1953
+
1954
+ **Example**
1955
+
1956
+ ```ts
1957
+ const result = await g8.api.work.listWorkRoutines();
1958
+ ```
1959
+
1960
+ ---
1961
+
1962
+ <a id="op-listworkteamreceipts"></a>
1963
+
1964
+ ### `g8.api.work.listWorkTeamReceipts(input)`
1965
+
1966
+ **List Work Team Receipts**
1967
+
1968
+ - HTTP: `GET /api/v1/work/team-hq/receipts`
1969
+ - operationId: `list_work_team_receipts_work_team_hq_receipts_get` (also callable as `g8.api.call("list_work_team_receipts_work_team_hq_receipts_get", input)`)
1970
+ - Tier: `read`: reads data; safe to call and to retry
1971
+ - API-key scope: `work:read`
1972
+
1973
+ One rep's recent ticker moments, newest first. ``400`` for a malformed email.
1974
+
1975
+ **Input**
1976
+
1977
+ | Field | Type | Required | Description |
1978
+ |---|---|---|---|
1979
+ | `query.email` | `string` | yes | The rep whose recent moments to list |
1980
+ | `query.limit` | `integer` | no | Max events; clamped to 1-50 default `20` |
1981
+
1982
+ **Returns** `ApiResponse_WorkTickerEvents_`: the envelope `{ data: WorkTickerEvents, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
1983
+
1984
+ Other envelope fields: `pagination` (PaginationMeta).
1985
+
1986
+ `WorkTickerEvents` fields:
1987
+
1988
+ | Field | Type | Required | Description |
1989
+ |---|---|---|---|
1990
+ | `events` | `Array<Record<string, unknown>> \| null` | no | Moments, newest first |
1991
+ | `source` | `string \| null` | no | `live` for the receipts drill-down |
1992
+
1993
+ **Example**
1994
+
1995
+ ```ts
1996
+ const result = await g8.api.work.listWorkTeamReceipts({ query: { email: "jane@acme.com" } });
1997
+ ```
1998
+
1999
+ ---
2000
+
2001
+ <a id="op-moveworkmemory"></a>
2002
+
2003
+ ### `g8.api.work.moveWorkMemory(input)`
2004
+
2005
+ **Move Work Memory**
2006
+
2007
+ - HTTP: `POST /api/v1/work/memory/move`
2008
+ - operationId: `move_work_memory_work_memory_move_post` (also callable as `g8.api.call("move_work_memory_work_memory_move_post", input)`)
2009
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2010
+ - API-key scope: `work:write`
2011
+
2012
+ Move one topic between scopes, guarded by both sides' revisions.
2013
+
2014
+ **Input**
2015
+
2016
+ | Field | Type | Required | Description |
2017
+ |---|---|---|---|
2018
+ | `body` | `WorkMemoryMoveRequest` | yes | Request body; fields below. |
2019
+
2020
+ Body fields (`WorkMemoryMoveRequest`):
2021
+
2022
+ | Field | Type | Required | Description |
2023
+ |---|---|---|---|
2024
+ | `body.destination` | `WorkMemoryScope` | yes | Where it should go |
2025
+ | `body.destination_revision` | `string \| null` | yes | The destination topic's revision, or null when it is empty pattern `^[a-f0-9]{64}$` |
2026
+ | `body.source` | `WorkMemoryScope` | yes | Where the topic is now |
2027
+ | `body.source_revision` | `string` | yes | The source topic's current revision pattern `^[a-f0-9]{64}$` |
2028
+ | `body.topic` | `"profile" \| "goals" \| "decisions" \| "feedback" \| "corrections" \| "entities"` | yes | The topic to move |
2029
+
2030
+ **Returns** `ApiResponse_WorkMemoryNote_`: the envelope `{ data: WorkMemoryNote, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2031
+
2032
+ Other envelope fields: `pagination` (PaginationMeta).
2033
+
2034
+ `WorkMemoryNote` fields:
2035
+
2036
+ | Field | Type | Required | Description |
2037
+ |---|---|---|---|
2038
+ | `content` | `string \| null` | no | Content |
2039
+ | `revision` | `string \| null` | no | Revision; send it back to edit or move |
2040
+ | `size_bytes` | `integer \| null` | no | Stored size |
2041
+ | `topic` | `string \| null` | no | Topic |
2042
+ | `updated_at` | `string \| null` | no | Last write time |
2043
+
2044
+ **Example**
2045
+
2046
+ ```ts
2047
+ const result = await g8.api.work.moveWorkMemory({
2048
+ body: {
2049
+ destination: {},
2050
+ destination_revision: "example",
2051
+ source: {},
2052
+ source_revision: "example",
2053
+ topic: "profile",
2054
+ },
2055
+ });
2056
+ ```
2057
+
2058
+ ---
2059
+
2060
+ <a id="op-promoteworksignal"></a>
2061
+
2062
+ ### `g8.api.work.promoteWorkSignal(input)`
2063
+
2064
+ **Promote Work Signal**
2065
+
2066
+ - HTTP: `POST /api/v1/work/signals/promote`
2067
+ - operationId: `promote_work_signal_work_signals_promote_post` (also callable as `g8.api.call("promote_work_signal_work_signals_promote_post", input)`)
2068
+ - Tier: `billable`: spends credits; the SDK never blindly retries it; confirm cost before bulk use
2069
+ - API-key scope: `work:run`
2070
+
2071
+ Turn one revenue signal into an accountable Work turn in ``#work``. BILLABLE.
2072
+
2073
+ The promotion is an ordinary send, and like every send it schedules an
2074
+ agent turn after the write commits — which is why this is tiered
2075
+ ``billable``. A replay is safe: the turn is claimed by a durable per-message
2076
+ key, so a second call never makes a second agent answer.
2077
+
2078
+ **Input**
2079
+
2080
+ | Field | Type | Required | Description |
2081
+ |---|---|---|---|
2082
+ | `body` | `WorkSignalPromoteRequest` | yes | Request body; fields below. |
2083
+
2084
+ Body fields (`WorkSignalPromoteRequest`):
2085
+
2086
+ | Field | Type | Required | Description |
2087
+ |---|---|---|---|
2088
+ | `body.signalEventId` | `string` | yes | min length 1, max length 128 |
2089
+
2090
+ **Returns** `ApiResponse_WorkSignalPromoted_`: the envelope `{ data: WorkSignalPromoted, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2091
+
2092
+ Other envelope fields: `pagination` (PaginationMeta).
2093
+
2094
+ `WorkSignalPromoted` fields:
2095
+
2096
+ | Field | Type | Required | Description |
2097
+ |---|---|---|---|
2098
+ | `duplicate` | `boolean \| null` | no | True when this signal had already been promoted |
2099
+ | `message` | `Record<string, unknown> \| null` | no | The stored message that carries the turn |
2100
+
2101
+ **Example**
2102
+
2103
+ ```ts
2104
+ // billable: spends credits; the SDK never blindly retries it; confirm cost before bulk use.
2105
+ const result = await g8.api.work.promoteWorkSignal({ body: { signalEventId: "example" } });
2106
+ ```
2107
+
2108
+ ---
2109
+
2110
+ <a id="op-reacttoworkmessage"></a>
2111
+
2112
+ ### `g8.api.work.reactToWorkMessage(input)`
2113
+
2114
+ **React To Work Message**
2115
+
2116
+ - HTTP: `PUT /api/v1/work/messages/{message_id}/reaction`
2117
+ - operationId: `react_to_work_message_work_messages__message_id__reaction_put` (also callable as `g8.api.call("react_to_work_message_work_messages__message_id__reaction_put", input)`)
2118
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2119
+ - API-key scope: `work:write`
2120
+
2121
+ Add or remove one emoji reaction on a message this credential may read.
2122
+
2123
+ ``active: true`` adds it, ``false`` removes it; sending the same value twice
2124
+ is a no-op rather than an error.
2125
+
2126
+ **Input**
2127
+
2128
+ | Field | Type | Required | Description |
2129
+ |---|---|---|---|
2130
+ | `path.message_id` | `string` | yes | Message id |
2131
+ | `body` | `WorkMessageReactionRequest` | yes | Request body; fields below. |
2132
+
2133
+ Body fields (`WorkMessageReactionRequest`):
2134
+
2135
+ | Field | Type | Required | Description |
2136
+ |---|---|---|---|
2137
+ | `body.active` | `boolean` | yes | |
2138
+ | `body.emoji` | `string` | yes | min length 1, max length 32 |
2139
+
2140
+ **Returns** `ApiResponse_WorkMessage_`: the envelope `{ data: WorkMessage, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2141
+
2142
+ Other envelope fields: `pagination` (PaginationMeta).
2143
+
2144
+ `WorkMessage` fields:
2145
+
2146
+ | Field | Type | Required | Description |
2147
+ |---|---|---|---|
2148
+ | `author` | `Record<string, unknown> \| null` | no | Resolved author — always the authenticated principal, never a request field |
2149
+ | `channel` | `string \| null` | no | Conversation address — a channel NAME or a direct-message id |
2150
+ | `createdAt` | `string \| null` | no | Creation timestamp |
2151
+ | `document` | `Record<string, unknown> \| null` | no | Rich-text document, normalized server-side |
2152
+ | `id` | `string \| null` | no | Message id |
2153
+ | `text` | `string \| null` | no | Plain-text projection of the document |
2154
+
2155
+ **Example**
2156
+
2157
+ ```ts
2158
+ const result = await g8.api.work.reactToWorkMessage({
2159
+ path: { message_id: "id" },
2160
+ body: { active: true, emoji: "example" },
2161
+ });
2162
+ ```
2163
+
2164
+ ---
2165
+
2166
+ <a id="op-runworkroutinenow"></a>
2167
+
2168
+ ### `g8.api.work.runWorkRoutineNow(input)`
2169
+
2170
+ **Run Work Routine Now**
2171
+
2172
+ - HTTP: `POST /api/v1/work/routines/{routine_id}/run`
2173
+ - operationId: `run_work_routine_now_work_routines__routine_id__run_post` (also callable as `g8.api.call("run_work_routine_now_work_routines__routine_id__run_post", input)`)
2174
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2175
+ - API-key scope: `work:write`
2176
+
2177
+ Run one routine immediately, as the caller's own message.
2178
+
2179
+ Deliberately not the scheduled path: the instruction is posted into the
2180
+ delivery conversation as this credential's message and the normal turn
2181
+ machinery answers it, so a run-now exercises exactly what a live ask would —
2182
+ approvals and all. An event routine may carry a ``sampleEvent`` to run
2183
+ against; it is treated as data, never as instructions.
2184
+
2185
+ **Input**
2186
+
2187
+ | Field | Type | Required | Description |
2188
+ |---|---|---|---|
2189
+ | `path.routine_id` | `string (uuid)` | yes | Routine id |
2190
+ | `body` | `WorkRoutineRunNowRequest \| null` | no | Request body; fields below. |
2191
+
2192
+ Body fields:
2193
+
2194
+ | Field | Type | Required | Description |
2195
+ |---|---|---|---|
2196
+ | `body.sampleEvent` | `Record<string, unknown> \| null` | no | Example event payload; treated as data, never as instructions. `event` routines only. |
2197
+
2198
+ **Returns** `ApiResponse_WorkRoutineRunResult_`: the envelope `{ data: WorkRoutineRunResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2199
+
2200
+ Other envelope fields: `pagination` (PaginationMeta).
2201
+
2202
+ `WorkRoutineRunResult` fields:
2203
+
2204
+ | Field | Type | Required | Description |
2205
+ |---|---|---|---|
2206
+ | `conversationId` | `string \| null` | no | Where it was posted |
2207
+ | `messageId` | `string \| null` | no | The message the run posted |
2208
+ | `runId` | `string \| null` | no | Ledger id of this manual run |
2209
+ | `runsPath` | `string \| null` | no | Developer API path to poll for this run's outcome |
2210
+ | `startedAt` | `string \| null` | no | When the run started |
2211
+ | `status` | `string \| null` | no | Always `running` on this response |
2212
+
2213
+ **Example**
2214
+
2215
+ ```ts
2216
+ const result = await g8.api.work.runWorkRoutineNow({ path: { routine_id: "00000000-0000-0000-0000-000000000000" } });
2217
+ ```
2218
+
2219
+ ---
2220
+
2221
+ <a id="op-saveworkchannelcanvas"></a>
2222
+
2223
+ ### `g8.api.work.saveWorkChannelCanvas(input)`
2224
+
2225
+ **Save Work Channel Canvas**
2226
+
2227
+ - HTTP: `POST /api/v1/work/channels/{channel_id}/canvas`
2228
+ - operationId: `save_work_channel_canvas_work_channels__channel_id__canvas_post` (also callable as `g8.api.call("save_work_channel_canvas_work_channels__channel_id__canvas_post", input)`)
2229
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2230
+ - API-key scope: `work:write`
2231
+
2232
+ Replace one channel's Canvas from its content. Signed server-side.
2233
+
2234
+ The counterpart of the published ``GET`` on this path. It is the app's
2235
+ ``POST`` (bare content, revision authored server-side with the caller's
2236
+ derived key), not the ``PUT`` that accepts a client-SIGNED event, which a
2237
+ machine principal has no signing story for.
2238
+
2239
+ ``baseRevisionId`` is a compare-and-swap: send the ``revisionId`` the
2240
+ ``GET`` gave you, omit it to skip the check, or send ``""`` to assert no
2241
+ canvas existed. ``403`` when the caller may not edit the channel; ``409``
2242
+ for an archived channel, a replayed key with a different body, or a stale
2243
+ ``baseRevisionId``.
2244
+
2245
+ **Input**
2246
+
2247
+ | Field | Type | Required | Description |
2248
+ |---|---|---|---|
2249
+ | `path.channel_id` | `string` | yes | Channel id or slug |
2250
+ | `body` | `WorkCanvasSaveRequest` | yes | Request body; fields below. |
2251
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
2252
+
2253
+ Body fields (`WorkCanvasSaveRequest`):
2254
+
2255
+ | Field | Type | Required | Description |
2256
+ |---|---|---|---|
2257
+ | `body.content` | `string` | yes | max length 100000 |
2258
+ | `body.baseRevisionId` | `string \| null` | no | max length 128 |
2259
+
2260
+ **Returns** `ApiResponse_WorkCanvas_`: the envelope `{ data: WorkCanvas, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2261
+
2262
+ Other envelope fields: `pagination` (PaginationMeta).
2263
+
2264
+ `WorkCanvas` fields:
2265
+
2266
+ | Field | Type | Required | Description |
2267
+ |---|---|---|---|
2268
+ | `channelId` | `string \| null` | no | Channel the canvas belongs to |
2269
+ | `content` | `string \| null` | no | Canvas content |
2270
+ | `revisionId` | `string \| null` | no | Current revision id |
2271
+
2272
+ **Example**
2273
+
2274
+ ```ts
2275
+ const result = await g8.api.work.saveWorkChannelCanvas({ path: { channel_id: "id" }, body: { content: "example" } });
2276
+ ```
2277
+
2278
+ ---
2279
+
2280
+ <a id="op-searchwork"></a>
2281
+
2282
+ ### `g8.api.work.searchWork(input)`
2283
+
2284
+ **Search Work**
2285
+
2286
+ - HTTP: `GET /api/v1/work/search`
2287
+ - operationId: `search_work_work_search_get` (also callable as `g8.api.call("search_work_work_search_get", input)`)
2288
+ - Tier: `read`: reads data; safe to call and to retry
2289
+ - API-key scope: `work:read`
2290
+
2291
+ Search everything this credential may read, and nothing else.
2292
+
2293
+ Deliberately has no storage-plane branch: "what can I find" is a question
2294
+ about one caller's permissions, and there is no viewer whose membership
2295
+ could scope an answer for a credential that has none.
2296
+
2297
+ **Input**
2298
+
2299
+ | Field | Type | Required | Description |
2300
+ |---|---|---|---|
2301
+ | `query.q` | `string` | yes | Search text |
2302
+ | `query.limit` | `integer` | no | Maximum hits; clamped to the server maximum default `25` |
2303
+ | `query.conversation` | `string \| null` | no | Channel name or direct-message id to search within |
2304
+
2305
+ **Returns** `ApiResponse_WorkSearchResults_`: the envelope `{ data: WorkSearchResults, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2306
+
2307
+ Other envelope fields: `pagination` (PaginationMeta).
2308
+
2309
+ `WorkSearchResults` fields:
2310
+
2311
+ | Field | Type | Required | Description |
2312
+ |---|---|---|---|
2313
+ | `query` | `string` | yes | The query that was run, as the server normalized it |
2314
+ | `hits` | `Array<WorkSearchHit>` | no | Ranked hits, capped by the server maximum |
2315
+
2316
+ **Example**
2317
+
2318
+ ```ts
2319
+ const result = await g8.api.work.searchWork({ query: { q: "example" } });
2320
+ ```
2321
+
2322
+ ---
2323
+
2324
+ <a id="op-setworkchannelpurpose"></a>
2325
+
2326
+ ### `g8.api.work.setWorkChannelPurpose(input)`
2327
+
2328
+ **Set Work Channel Purpose**
2329
+
2330
+ - HTTP: `PUT /api/v1/work/channels/{channel_id}/purpose`
2331
+ - operationId: `set_work_channel_purpose_work_channels__channel_id__purpose_put` (also callable as `g8.api.call("set_work_channel_purpose_work_channels__channel_id__purpose_put", input)`)
2332
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2333
+ - API-key scope: `work:write`
2334
+
2335
+ Give one channel a purpose, taking it from whichever channel held it.
2336
+
2337
+ ``purpose`` is required but nullable: ``null`` clears it. An empty body is
2338
+ refused rather than guessed, because this operation reassigns state on
2339
+ channels the caller did not name and may not act on an ambiguity —
2340
+ ``reassignedChannelIds`` says which ones it moved.
2341
+
2342
+ **Input**
2343
+
2344
+ | Field | Type | Required | Description |
2345
+ |---|---|---|---|
2346
+ | `path.channel_id` | `string` | yes | Channel id or slug |
2347
+ | `body` | `WorkChannelPurposeRequest` | yes | Request body; fields below. |
2348
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
2349
+
2350
+ Body fields (`WorkChannelPurposeRequest`):
2351
+
2352
+ | Field | Type | Required | Description |
2353
+ |---|---|---|---|
2354
+ | `body.purpose` | `string \| null` | yes | |
2355
+
2356
+ **Returns** `ApiResponse_WorkChannelWriteResult_`: the envelope `{ data: WorkChannelWriteResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2357
+
2358
+ Other envelope fields: `pagination` (PaginationMeta).
2359
+
2360
+ `WorkChannelWriteResult` fields:
2361
+
2362
+ | Field | Type | Required | Description |
2363
+ |---|---|---|---|
2364
+ | `canvasSeeded` | `boolean \| null` | no | Present when `templateId` seeded a Canvas |
2365
+ | `channel` | `WorkChannel \| null` | no | The channel as stored after the write |
2366
+ | `duplicate` | `boolean \| null` | no | True when an Idempotency-Key replay returned the original result |
2367
+
2368
+ **Example**
2369
+
2370
+ ```ts
2371
+ const result = await g8.api.work.setWorkChannelPurpose({ path: { channel_id: "id" }, body: { purpose: "example" } });
2372
+ ```
2373
+
2374
+ ---
2375
+
2376
+ <a id="op-setworkdailybrief"></a>
2377
+
2378
+ ### `g8.api.work.setWorkDailyBrief(input)`
2379
+
2380
+ **Set Work Daily Brief**
2381
+
2382
+ - HTTP: `POST /api/v1/work/preferences/daily-brief`
2383
+ - operationId: `set_work_daily_brief_work_preferences_daily_brief_post` (also callable as `g8.api.call("set_work_daily_brief_work_preferences_daily_brief_post", input)`)
2384
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2385
+ - API-key scope: `work:write`
2386
+
2387
+ Store THIS principal's daily-brief schedule.
2388
+
2389
+ An unknown ``timezone`` is a 422 rather than a UTC guess: a brief is a
2390
+ scheduled send, and a wrong zone delivers a morning brief at midnight.
2391
+
2392
+ **Input**
2393
+
2394
+ | Field | Type | Required | Description |
2395
+ |---|---|---|---|
2396
+ | `body` | `WorkDailyBriefSettingsRequest` | yes | Request body; fields below. |
2397
+
2398
+ Body fields (`WorkDailyBriefSettingsRequest`):
2399
+
2400
+ | Field | Type | Required | Description |
2401
+ |---|---|---|---|
2402
+ | `body.timezone` | `string` | yes | min length 1, max length 100 |
2403
+ | `body.enabled` | `boolean` | no | default `false` |
2404
+ | `body.localTime` | `string \| null` | no | max length 5 |
2405
+ | `body.weekdays` | `Array<integer> \| null` | no | max items 7 |
2406
+
2407
+ **Returns** `ApiResponse_WorkDailyBriefSettings_`: the envelope `{ data: WorkDailyBriefSettings, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2408
+
2409
+ Other envelope fields: `pagination` (PaginationMeta).
2410
+
2411
+ `WorkDailyBriefSettings` fields:
2412
+
2413
+ | Field | Type | Required | Description |
2414
+ |---|---|---|---|
2415
+ | `settings` | `Record<string, unknown> \| null` | no | The stored schedule |
2416
+ | `status` | `Record<string, unknown> \| null` | no | Delivery status (`latestBrief`, `lastBriefDate`, `nextDueAt`, `reason`). Returned on the read only; null on the write |
2417
+
2418
+ **Example**
2419
+
2420
+ ```ts
2421
+ const result = await g8.api.work.setWorkDailyBrief({ body: { timezone: "example" } });
2422
+ ```
2423
+
2424
+ ---
2425
+
2426
+ <a id="op-setworkinboxdisposition"></a>
2427
+
2428
+ ### `g8.api.work.setWorkInboxDisposition(input)`
2429
+
2430
+ **Set Work Inbox Disposition**
2431
+
2432
+ - HTTP: `POST /api/v1/work/inbox-dispositions`
2433
+ - operationId: `set_work_inbox_disposition_work_inbox_dispositions_post` (also callable as `g8.api.call("set_work_inbox_disposition_work_inbox_dispositions_post", input)`)
2434
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2435
+ - API-key scope: `work:write`
2436
+
2437
+ Snooze, archive or reactivate one conversation, for this principal only.
2438
+
2439
+ ``state: "snoozed"`` REQUIRES a future ``snoozedUntil``; the app refuses a
2440
+ snooze without a wake-up with a 422.
2441
+
2442
+ **Input**
2443
+
2444
+ | Field | Type | Required | Description |
2445
+ |---|---|---|---|
2446
+ | `body` | `WorkInboxDispositionRequest` | yes | Request body; fields below. |
2447
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
2448
+
2449
+ Body fields (`WorkInboxDispositionRequest`):
2450
+
2451
+ | Field | Type | Required | Description |
2452
+ |---|---|---|---|
2453
+ | `body.channel` | `string` | yes | min length 1, max length 255 |
2454
+ | `body.conversationKey` | `string` | yes | min length 1, max length 512 |
2455
+ | `body.latestActivityAt` | `integer` | yes | min 0 |
2456
+ | `body.rootId` | `string` | yes | min length 1, max length 128 |
2457
+ | `body.state` | `"active" \| "snoozed" \| "archived"` | yes | |
2458
+ | `body.snoozedUntil` | `string \| null` | no | max length 64 |
2459
+
2460
+ **Returns** `ApiResponse_WorkInboxDisposition_`: the envelope `{ data: WorkInboxDisposition, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2461
+
2462
+ Other envelope fields: `pagination` (PaginationMeta).
2463
+
2464
+ `WorkInboxDisposition` fields:
2465
+
2466
+ | Field | Type | Required | Description |
2467
+ |---|---|---|---|
2468
+ | `disposition` | `Record<string, unknown> \| null` | no | The disposition as stored |
2469
+ | `duplicate` | `boolean \| null` | no | True when an Idempotency-Key replay returned the original result |
2470
+
2471
+ **Example**
2472
+
2473
+ ```ts
2474
+ const result = await g8.api.work.setWorkInboxDisposition({
2475
+ body: {
2476
+ channel: "example",
2477
+ conversationKey: "example",
2478
+ latestActivityAt: 0,
2479
+ rootId: "example",
2480
+ state: "active",
2481
+ },
2482
+ });
2483
+ ```
2484
+
2485
+ ---
2486
+
2487
+ <a id="op-setworkpulsereaction"></a>
2488
+
2489
+ ### `g8.api.work.setWorkPulseReaction(input)`
2490
+
2491
+ **Set Work Pulse Reaction**
2492
+
2493
+ - HTTP: `POST /api/v1/work/pulse/{note_id}/reaction`
2494
+ - operationId: `set_work_pulse_reaction_work_pulse__note_id__reaction_post` (also callable as `g8.api.call("set_work_pulse_reaction_work_pulse__note_id__reaction_post", input)`)
2495
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2496
+ - API-key scope: `work:write`
2497
+
2498
+ Upvote one pulse note, or take the upvote back.
2499
+
2500
+ ``reacted`` is the DESIRED state, not a toggle, so a retry is idempotent.
2501
+ Always ``200``; read ``duplicate`` to know whether anything was written.
2502
+
2503
+ **Input**
2504
+
2505
+ | Field | Type | Required | Description |
2506
+ |---|---|---|---|
2507
+ | `path.note_id` | `string` | yes | Pulse note id |
2508
+ | `body` | `WorkPulseReactionRequest` | yes | Request body; fields below. |
2509
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
2510
+
2511
+ Body fields (`WorkPulseReactionRequest`):
2512
+
2513
+ | Field | Type | Required | Description |
2514
+ |---|---|---|---|
2515
+ | `body.reacted` | `boolean` | yes | |
2516
+
2517
+ **Returns** `ApiResponse_WorkPulseReaction_`: the envelope `{ data: WorkPulseReaction, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2518
+
2519
+ Other envelope fields: `pagination` (PaginationMeta).
2520
+
2521
+ `WorkPulseReaction` fields:
2522
+
2523
+ | Field | Type | Required | Description |
2524
+ |---|---|---|---|
2525
+ | `duplicate` | `boolean \| null` | no | True when the request asked for the state already stored |
2526
+ | `event` | `Record<string, unknown> \| null` | no | The room event, or null when taking back an upvote nobody had left nothing to write |
2527
+ | `reacted` | `boolean \| null` | no | The state that now stands |
2528
+
2529
+ **Example**
2530
+
2531
+ ```ts
2532
+ const result = await g8.api.work.setWorkPulseReaction({ path: { note_id: "id" }, body: { reacted: true } });
2533
+ ```
2534
+
2535
+ ---
2536
+
2537
+ <a id="op-setworkreadmarkers"></a>
2538
+
2539
+ ### `g8.api.work.setWorkReadMarkers(input)`
2540
+
2541
+ **Set Work Read Markers**
2542
+
2543
+ - HTTP: `POST /api/v1/work/read-markers`
2544
+ - operationId: `set_work_read_markers_work_read_markers_post` (also callable as `g8.api.call("set_work_read_markers_work_read_markers_post", input)`)
2545
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2546
+ - API-key scope: `work:write`
2547
+
2548
+ Record that this principal has read these conversations up to a point.
2549
+
2550
+ Batched (1-200 markers per request) and monotonic: a marker that moves
2551
+ backwards is ignored, so a replay changes nothing and no key is asked for.
2552
+
2553
+ **Input**
2554
+
2555
+ | Field | Type | Required | Description |
2556
+ |---|---|---|---|
2557
+ | `body` | `WorkReadMarkersRequest` | yes | Request body; fields below. |
2558
+
2559
+ Body fields (`WorkReadMarkersRequest`):
2560
+
2561
+ | Field | Type | Required | Description |
2562
+ |---|---|---|---|
2563
+ | `body.markers` | `Array<WorkReadMarkerRequest>` | yes | min items 1, max items 200 |
2564
+
2565
+ **Returns** `ApiResponse_WorkReadMarkers_`: the envelope `{ data: WorkReadMarkers, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2566
+
2567
+ Other envelope fields: `pagination` (PaginationMeta).
2568
+
2569
+ `WorkReadMarkers` fields:
2570
+
2571
+ | Field | Type | Required | Description |
2572
+ |---|---|---|---|
2573
+ | `markers` | `Record<string, unknown> \| null` | no | Conversation key -> the point this principal has read to |
2574
+
2575
+ **Example**
2576
+
2577
+ ```ts
2578
+ const result = await g8.api.work.setWorkReadMarkers({
2579
+ body: {
2580
+ markers: [
2581
+ {
2582
+ channel: "example",
2583
+ conversationKey: "example",
2584
+ lastReadAt: 0,
2585
+ rootId: "example",
2586
+ },
2587
+ ],
2588
+ },
2589
+ });
2590
+ ```
2591
+
2592
+ ---
2593
+
2594
+ <a id="op-setworksidebarpreferences"></a>
2595
+
2596
+ ### `g8.api.work.setWorkSidebarPreferences(input)`
2597
+
2598
+ **Set Work Sidebar Preferences**
2599
+
2600
+ - HTTP: `POST /api/v1/work/sidebar-preferences`
2601
+ - operationId: `set_work_sidebar_preferences_work_sidebar_preferences_post` (also callable as `g8.api.call("set_work_sidebar_preferences_work_sidebar_preferences_post", input)`)
2602
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2603
+ - API-key scope: `work:write`
2604
+
2605
+ Store how this principal wants its own sidebar ordered.
2606
+
2607
+ Both halves are required and closed to ``alpha`` | ``recent``. There is no
2608
+ read route here because there is none in the app: the stored value rides
2609
+ the room payload (``GET /work/room``).
2610
+
2611
+ **Input**
2612
+
2613
+ | Field | Type | Required | Description |
2614
+ |---|---|---|---|
2615
+ | `body` | `WorkSidebarPreferencesRequest` | yes | Request body; fields below. |
2616
+
2617
+ Body fields (`WorkSidebarPreferencesRequest`):
2618
+
2619
+ | Field | Type | Required | Description |
2620
+ |---|---|---|---|
2621
+ | `body.channels` | `"alpha" \| "recent"` | yes | |
2622
+ | `body.directMessages` | `"alpha" \| "recent"` | yes | |
2623
+
2624
+ **Returns** `ApiResponse_WorkSidebarPreferences_`: the envelope `{ data: WorkSidebarPreferences, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2625
+
2626
+ Other envelope fields: `pagination` (PaginationMeta).
2627
+
2628
+ `WorkSidebarPreferences` fields:
2629
+
2630
+ | Field | Type | Required | Description |
2631
+ |---|---|---|---|
2632
+ | `preferences` | `Record<string, unknown> \| null` | no | The ordering as stored |
2633
+
2634
+ **Example**
2635
+
2636
+ ```ts
2637
+ const result = await g8.api.work.setWorkSidebarPreferences({ body: { channels: "alpha", directMessages: "alpha" } });
2638
+ ```
2639
+
2640
+ ---
2641
+
2642
+ <a id="op-setworksignalstate"></a>
2643
+
2644
+ ### `g8.api.work.setWorkSignalState(input)`
2645
+
2646
+ **Set Work Signal State**
2647
+
2648
+ - HTTP: `POST /api/v1/work/signals/state`
2649
+ - operationId: `set_work_signal_state_work_signals_state_post` (also callable as `g8.api.call("set_work_signal_state_work_signals_state_post", input)`)
2650
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2651
+ - API-key scope: `work:write`
2652
+
2653
+ Snooze or dismiss one revenue signal.
2654
+
2655
+ No ``Idempotency-Key``, matching the app: the key is derived from the
2656
+ signal and the target state, so it is idempotent by construction. ``404``
2657
+ for a signal that is not there.
2658
+
2659
+ **Input**
2660
+
2661
+ | Field | Type | Required | Description |
2662
+ |---|---|---|---|
2663
+ | `body` | `WorkSignalStateRequest` | yes | Request body; fields below. |
2664
+
2665
+ Body fields (`WorkSignalStateRequest`):
2666
+
2667
+ | Field | Type | Required | Description |
2668
+ |---|---|---|---|
2669
+ | `body.action` | `"snooze" \| "dismiss"` | yes | |
2670
+ | `body.signalEventId` | `string` | yes | min length 1, max length 128 |
2671
+
2672
+ **Returns** `ApiResponse_WorkSignalState_`: the envelope `{ data: WorkSignalState, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2673
+
2674
+ Other envelope fields: `pagination` (PaginationMeta).
2675
+
2676
+ `WorkSignalState` fields:
2677
+
2678
+ | Field | Type | Required | Description |
2679
+ |---|---|---|---|
2680
+ | `duplicate` | `boolean \| null` | no | True when the signal already held the requested state |
2681
+ | `event` | `Record<string, unknown> \| null` | no | The room event the write appended |
2682
+
2683
+ **Example**
2684
+
2685
+ ```ts
2686
+ const result = await g8.api.work.setWorkSignalState({ body: { action: "snooze", signalEventId: "example" } });
2687
+ ```
2688
+
2689
+ ---
2690
+
2691
+ <a id="op-updateworkagent"></a>
2692
+
2693
+ ### `g8.api.work.updateWorkAgent(input)`
2694
+
2695
+ **Update Work Agent**
2696
+
2697
+ - HTTP: `PATCH /api/v1/work/agents/{agent_id}`
2698
+ - operationId: `update_work_agent_work_agents__agent_id__patch` (also callable as `g8.api.call("update_work_agent_work_agents__agent_id__patch", input)`)
2699
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2700
+ - API-key scope: `work:write`
2701
+
2702
+ Replace one agent's profile, versioned.
2703
+
2704
+ ``expected_version`` is the ``version`` you read; a stale one is a ``409``
2705
+ so two editors cannot silently overwrite each other's instructions.
2706
+
2707
+ **Input**
2708
+
2709
+ | Field | Type | Required | Description |
2710
+ |---|---|---|---|
2711
+ | `path.agent_id` | `string (uuid)` | yes | Agent id |
2712
+ | `body` | `WorkAgentProfileEditRequest` | yes | Request body; fields below. |
2713
+
2714
+ Body fields (`WorkAgentProfileEditRequest`):
2715
+
2716
+ | Field | Type | Required | Description |
2717
+ |---|---|---|---|
2718
+ | `body.expected_version` | `integer` | yes | The `version` you read; a stale one is a 409 min 1 |
2719
+ | `body.profile` | `WorkAgentProfileRequest` | yes | The full new profile |
2720
+
2721
+ **Returns** `ApiResponse_WorkAgentProfile_`: the envelope `{ data: WorkAgentProfile, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2722
+
2723
+ Other envelope fields: `pagination` (PaginationMeta).
2724
+
2725
+ `WorkAgentProfile` fields:
2726
+
2727
+ | Field | Type | Required | Description |
2728
+ |---|---|---|---|
2729
+ | `agent_id` | `string \| null` | no | Agent id |
2730
+ | `avatar` | `string \| null` | no | Avatar glyph |
2731
+ | `can_edit` | `boolean \| null` | no | Whether this caller may edit it |
2732
+ | `description` | `string \| null` | no | Instructions |
2733
+ | `name` | `string \| null` | no | Agent name |
2734
+ | `owner_id` | `string \| null` | no | Owner identity |
2735
+ | `role` | `string \| null` | no | Role |
2736
+ | `updated_at` | `string \| null` | no | Last edit time |
2737
+ | `version` | `integer \| null` | no | Profile version; send it back to edit |
2738
+ | `visibility` | `string \| null` | no | `private` or `organization` |
2739
+
2740
+ **Example**
2741
+
2742
+ ```ts
2743
+ const result = await g8.api.work.updateWorkAgent({
2744
+ path: { agent_id: "00000000-0000-0000-0000-000000000000" },
2745
+ body: {
2746
+ expected_version: 1,
2747
+ profile: { description: "example", name: "Example" },
2748
+ },
2749
+ });
2750
+ ```
2751
+
2752
+ ---
2753
+
2754
+ <a id="op-updateworkchannel"></a>
2755
+
2756
+ ### `g8.api.work.updateWorkChannel(input)`
2757
+
2758
+ **Update Work Channel**
2759
+
2760
+ - HTTP: `PATCH /api/v1/work/channels/{channel_id}`
2761
+ - operationId: `update_work_channel_work_channels__channel_id__patch` (also callable as `g8.api.call("update_work_channel_work_channels__channel_id__patch", input)`)
2762
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2763
+ - API-key scope: `work:write`
2764
+
2765
+ Change one channel's display name, description, visibility, seating, agent policy or archive state.
2766
+
2767
+ **Field PRESENCE is the contract** — an omitted field keeps its stored value,
2768
+ and ``description: null`` clears it.
2769
+
2770
+ ``name`` is not accepted and a rename never moves the room: the slug is the
2771
+ channel's address, and changing it would strand every event already filed
2772
+ under the old one. ``403`` when the caller neither owns the channel nor
2773
+ holds owner/admin rights, and separately when a non-admin tries to change
2774
+ agent activation — an organization-level spend decision rather than a
2775
+ room-owner one. ``409`` for a built-in channel's identity or visibility.
2776
+
2777
+ **Input**
2778
+
2779
+ | Field | Type | Required | Description |
2780
+ |---|---|---|---|
2781
+ | `path.channel_id` | `string` | yes | Channel id or slug |
2782
+ | `body` | `WorkChannelSettingsRequest` | yes | Request body; fields below. |
2783
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
2784
+
2785
+ Body fields (`WorkChannelSettingsRequest`):
2786
+
2787
+ | Field | Type | Required | Description |
2788
+ |---|---|---|---|
2789
+ | `body.agentResponsePolicy` | `"mention_required" \| "proactive" \| null` | no | |
2790
+ | `body.archived` | `boolean \| null` | no | |
2791
+ | `body.confirmAgentAccess` | `boolean` | no | default `false` |
2792
+ | `body.description` | `string \| null` | no | max length 1000 |
2793
+ | `body.displayName` | `string \| null` | no | max length 255 |
2794
+ | `body.memberUserIds` | `Array<string>` | no | max items 100 |
2795
+ | `body.participantAgentIds` | `Array<string>` | no | max items 32 |
2796
+ | `body.visibility` | `"open" \| "private" \| null` | no | |
2797
+
2798
+ **Returns** `ApiResponse_WorkChannelWriteResult_`: the envelope `{ data: WorkChannelWriteResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2799
+
2800
+ Other envelope fields: `pagination` (PaginationMeta).
2801
+
2802
+ `WorkChannelWriteResult` fields:
2803
+
2804
+ | Field | Type | Required | Description |
2805
+ |---|---|---|---|
2806
+ | `canvasSeeded` | `boolean \| null` | no | Present when `templateId` seeded a Canvas |
2807
+ | `channel` | `WorkChannel \| null` | no | The channel as stored after the write |
2808
+ | `duplicate` | `boolean \| null` | no | True when an Idempotency-Key replay returned the original result |
2809
+
2810
+ **Example**
2811
+
2812
+ ```ts
2813
+ const result = await g8.api.work.updateWorkChannel({ path: { channel_id: "id" }, body: {} });
2814
+ ```
2815
+
2816
+ ---
2817
+
2818
+ <a id="op-updateworkproject"></a>
2819
+
2820
+ ### `g8.api.work.updateWorkProject(input)`
2821
+
2822
+ **Update Work Project**
2823
+
2824
+ - HTTP: `PATCH /api/v1/work/projects/{project_id}`
2825
+ - operationId: `update_work_project_work_projects__project_id__patch` (also callable as `g8.api.call("update_work_project_work_projects__project_id__patch", input)`)
2826
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2827
+ - API-key scope: `work:write`
2828
+
2829
+ Rename one project, re-describe it, or move its status.
2830
+
2831
+ **Field PRESENCE is the contract**: an omitted field keeps its stored
2832
+ value and ``description: null`` clears it. ``403`` unless the caller
2833
+ created the project or holds Owner/Admin — the SAME rule deletion uses, and
2834
+ the role half only answers correctly because of ``with_org_role``.
2835
+
2836
+ **Input**
2837
+
2838
+ | Field | Type | Required | Description |
2839
+ |---|---|---|---|
2840
+ | `path.project_id` | `string` | yes | Project id |
2841
+ | `body` | `WorkProjectUpdateRequest` | yes | Request body; fields below. |
2842
+ | `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying one returns the ORIGINAL result with `duplicate: true` instead of writing twice. Omit it and the server mints a single-use key, which means a retried request writes again — send your own for anything you may retry. |
2843
+
2844
+ Body fields (`WorkProjectUpdateRequest`):
2845
+
2846
+ | Field | Type | Required | Description |
2847
+ |---|---|---|---|
2848
+ | `body.description` | `string \| null` | no | max length 2000 |
2849
+ | `body.name` | `string \| null` | no | max length 500 |
2850
+ | `body.status` | `"active" \| "paused" \| "completed" \| "archived" \| null` | no | |
2851
+
2852
+ **Returns** `ApiResponse_WorkProjectWriteResult_`: the envelope `{ data: WorkProjectWriteResult, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2853
+
2854
+ Other envelope fields: `pagination` (PaginationMeta).
2855
+
2856
+ `WorkProjectWriteResult` fields:
2857
+
2858
+ | Field | Type | Required | Description |
2859
+ |---|---|---|---|
2860
+ | `compatibilityEventId` | `string \| null` | no | Id of the room event the write appended |
2861
+ | `duplicate` | `boolean \| null` | no | True when an Idempotency-Key replay returned the original result rather than writing again |
2862
+ | `project` | `WorkProject \| null` | no | The project as stored after the write |
2863
+
2864
+ **Example**
2865
+
2866
+ ```ts
2867
+ const result = await g8.api.work.updateWorkProject({ path: { project_id: "id" }, body: {} });
2868
+ ```
2869
+
2870
+ ---
2871
+
2872
+ <a id="op-updateworkroutine"></a>
2873
+
2874
+ ### `g8.api.work.updateWorkRoutine(input)`
2875
+
2876
+ **Update Work Routine**
2877
+
2878
+ - HTTP: `PATCH /api/v1/work/routines/{routine_id}`
2879
+ - operationId: `update_work_routine_work_routines__routine_id__patch` (also callable as `g8.api.call("update_work_routine_work_routines__routine_id__patch", input)`)
2880
+ - Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
2881
+ - API-key scope: `work:write`
2882
+
2883
+ Change one routine.
2884
+
2885
+ Only somebody who can read the routine's delivery conversation may change
2886
+ it, and re-pointing ``deliveryConversationId`` is a second grant: the NEW
2887
+ conversation must be readable too. Omitted fields keep their stored value.
2888
+
2889
+ **Input**
2890
+
2891
+ | Field | Type | Required | Description |
2892
+ |---|---|---|---|
2893
+ | `path.routine_id` | `string (uuid)` | yes | Routine id |
2894
+ | `body` | `WorkRoutinePatchRequest` | yes | Request body; fields below. |
2895
+
2896
+ Body fields (`WorkRoutinePatchRequest`):
2897
+
2898
+ | Field | Type | Required | Description |
2899
+ |---|---|---|---|
2900
+ | `body.agentId` | `string \| null` | no | Agent that runs the routine |
2901
+ | `body.deliveryConversationId` | `string \| null` | no | Re-point delivery; the new conversation must also be readable |
2902
+ | `body.enabled` | `boolean \| null` | no | Turn the routine on or off |
2903
+ | `body.eventPolicy` | `Record<string, unknown> \| null` | no | Optional event-handling policy |
2904
+ | `body.instruction` | `string \| null` | no | What the agent is asked to do each run |
2905
+ | `body.localTime` | `string \| null` | no | Local run time `HH:MM` |
2906
+ | `body.timezone` | `string \| null` | no | IANA timezone the local time is read in |
2907
+ | `body.title` | `string \| null` | no | What the routine is called |
2908
+ | `body.trigger` | `Record<string, unknown> \| null` | no | Trigger config, for `event` routines |
2909
+ | `body.triggerKind` | `string \| null` | no | `schedule` or `event` |
2910
+ | `body.weekdays` | `Array<integer> \| null` | no | Days to run on (0-6) |
2911
+
2912
+ **Returns** `ApiResponse_WorkRoutineEnvelope_`: the envelope `{ data: WorkRoutineEnvelope, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
2913
+
2914
+ Other envelope fields: `pagination` (PaginationMeta).
2915
+
2916
+ `WorkRoutineEnvelope` fields:
2917
+
2918
+ | Field | Type | Required | Description |
2919
+ |---|---|---|---|
2920
+ | `routine` | `WorkRoutine` | yes | The routine as stored after the write |
2921
+
2922
+ **Example**
2923
+
2924
+ ```ts
2925
+ const result = await g8.api.work.updateWorkRoutine({
2926
+ path: { routine_id: "00000000-0000-0000-0000-000000000000" },
2927
+ body: {},
2928
+ });
2929
+ ```
2930
+
2931
+ ---
2932
+
2933
+ ## Referenced types
2934
+
2935
+ Named types that appear in the tables above. Full TypeScript definitions: `G8Contract.<Name>` (`import type { G8Contract } from "@graph8/sdk"`).
2936
+
2937
+ <a id="type-workactivityentry"></a>
2938
+
2939
+ ### `WorkActivityEntry`
2940
+
2941
+ One entry in the Work activity feed.
2942
+
2943
+ | Field | Type | Required | Description |
2944
+ |---|---|---|---|
2945
+ | `actor` | `string \| null` | no | `human`, `agent`, `runner` or `system` |
2946
+ | `category` | `string \| null` | no | message, conversation, approval, execution, workflow, canvas or configuration |
2947
+ | `consequence` | `string \| null` | no | requested, changed, approved, completed, failed or recorded |
2948
+ | `id` | `string \| null` | no | Activity entry id |
2949
+
2950
+ <a id="type-workavailablechannel"></a>
2951
+
2952
+ ### `WorkAvailableChannel`
2953
+
2954
+ A channel of this organization the caller is not currently part of. An `open` channel carries its description and member count; a `private` one answers with identity only, so nothing about the room itself leaks.
2955
+
2956
+ | Field | Type | Required | Description |
2957
+ |---|---|---|---|
2958
+ | `description` | `string \| null` | no | Present for `open` channels only |
2959
+ | `displayName` | `string \| null` | no | Human-readable name |
2960
+ | `id` | `string \| null` | no | Channel id |
2961
+ | `memberCount` | `integer \| null` | no | Present for `open` channels only |
2962
+ | `name` | `string \| null` | no | Channel slug |
2963
+ | `visibility` | `string \| null` | no | `open` or `private` |
2964
+
2965
+ <a id="type-workchannel"></a>
2966
+
2967
+ ### `WorkChannel`
2968
+
2969
+ One Work channel as the room stores it.
2970
+
2971
+ | Field | Type | Required | Description |
2972
+ |---|---|---|---|
2973
+ | `archivedAt` | `string \| null` | no | When the channel was archived, if it is |
2974
+ | `createdAt` | `string \| null` | no | Creation timestamp |
2975
+ | `createdBy` | `string \| null` | no | Identity that created the channel |
2976
+ | `description` | `string \| null` | no | Channel description |
2977
+ | `displayName` | `string \| null` | no | Human-readable name shown in the sidebar |
2978
+ | `id` | `string \| null` | no | Channel id (uuid5 of `{org}:{name}` — the room address) |
2979
+ | `kind` | `string \| null` | no | `stream` or `forum` |
2980
+ | `memberUserIds` | `Array<string> \| null` | no | Seated member identities |
2981
+ | `name` | `string \| null` | no | Slug, unique per organization. Renaming the display name never moves the room. |
2982
+ | `participantAgentIds` | `Array<string> \| null` | no | Seated agent ids |
2983
+ | `system` | `boolean \| null` | no | True for a built-in channel (`#work`, `#signals`) |
2984
+ | `visibility` | `string \| null` | no | `open` (self-serve joinable) or `private` (invite only) |
2985
+
2986
+ <a id="type-workevent"></a>
2987
+
2988
+ ### `WorkEvent`
2989
+
2990
+ One signed Work event from the conversation ledger.
2991
+
2992
+ | Field | Type | Required | Description |
2993
+ |---|---|---|---|
2994
+ | `created_at` | `integer \| null` | no | Event creation time |
2995
+ | `id` | `string \| null` | no | Event id |
2996
+ | `kind` | `integer \| null` | no | Event kind number |
2997
+
2998
+ <a id="type-workitem"></a>
2999
+
3000
+ ### `WorkItem`
3001
+
3002
+ One unit of agent work on the All Work board.
3003
+
3004
+ | Field | Type | Required | Description |
3005
+ |---|---|---|---|
3006
+ | `dueAt` | `string \| null` | no | Due date, when one is set |
3007
+ | `id` | `string \| null` | no | Work item id |
3008
+ | `ownerUserId` | `string \| null` | no | Identity the item is assigned to |
3009
+ | `priority` | `string \| null` | no | Priority band |
3010
+ | `status` | `string \| null` | no | Lifecycle status |
3011
+ | `title` | `string \| null` | no | What the work is |
3012
+
3013
+ <a id="type-workmemoryscope"></a>
3014
+
3015
+ ### `WorkMemoryScope`
3016
+
3017
+ Which memory to act on. Mirrors ``work.memory.MemorySelection``.
3018
+
3019
+ | Field | Type | Required | Description |
3020
+ |---|---|---|---|
3021
+ | `agent_id` | `string (uuid) \| null` | no | Required for, and only for, `agent` scope |
3022
+ | `scope` | `"personal" \| "agent" \| "team"` | no | `personal`, `agent` or `team` default `"personal"` |
3023
+
3024
+ <a id="type-workproject"></a>
3025
+
3026
+ ### `WorkProject`
3027
+
3028
+ One project: a named unit of work attached to a channel.
3029
+
3030
+ | Field | Type | Required | Description |
3031
+ |---|---|---|---|
3032
+ | `channel` | `string \| null` | no | Channel the project belongs to |
3033
+ | `createdBy` | `string \| null` | no | Ownership identity of whoever created it |
3034
+ | `description` | `string \| null` | no | Project description; null when cleared |
3035
+ | `id` | `string \| null` | no | Project id, minted server-side |
3036
+ | `name` | `string \| null` | no | Project name |
3037
+ | `status` | `string \| null` | no | `active`, `paused`, `completed` or `archived` |
3038
+
3039
+ <a id="type-workreadmarkerrequest"></a>
3040
+
3041
+ ### `WorkReadMarkerRequest`
3042
+
3043
+ How far this person has read ONE conversation. `last_read_at` is the conversation's `latestAt` boundary the reader was shown, in unix seconds — the same clock `WorkInboxDispositionRequest` keeps in `latest_activity_at` — not the instant they looked. A newer inbound message therefore lights the badge again on its own: the comparison is `latestAt > lastReadAt`, and nothing has to un-mark anything. Seconds are not a total order: `post_message` truncates event timestamps to whole seconds, so a message that lands in the SAME second as the one the reader saw would compare equal and pass as read. `l…
3044
+
3045
+ | Field | Type | Required | Description |
3046
+ |---|---|---|---|
3047
+ | `channel` | `string` | yes | min length 1, max length 255 |
3048
+ | `conversationKey` | `string` | yes | min length 1, max length 512 |
3049
+ | `lastReadAt` | `integer` | yes | min 0 |
3050
+ | `rootId` | `string` | yes | min length 1, max length 128 |
3051
+ | `lastReadId` | `string \| null` | no | min length 1, max length 128 |
3052
+
3053
+ <a id="type-workroutine"></a>
3054
+
3055
+ ### `WorkRoutine`
3056
+
3057
+ One scheduled or event-triggered Work routine.
3058
+
3059
+ | Field | Type | Required | Description |
3060
+ |---|---|---|---|
3061
+ | `agentId` | `string \| null` | no | Agent that runs the routine |
3062
+ | `deliveryConversationId` | `string \| null` | no | Conversation the routine posts into |
3063
+ | `enabled` | `boolean \| null` | no | Whether the routine is active |
3064
+ | `id` | `string \| null` | no | Routine id |
3065
+ | `instruction` | `string \| null` | no | What the agent is asked to do each run |
3066
+ | `lastRunAt` | `string \| null` | no | When the routine last ran |
3067
+ | `lastStatus` | `string \| null` | no | How the last run ended |
3068
+ | `localTime` | `string \| null` | no | Local run time, for `schedule` routines |
3069
+ | `timezone` | `string \| null` | no | IANA timezone the local time is read in |
3070
+ | `title` | `string \| null` | no | Routine title |
3071
+ | `triggerKind` | `string \| null` | no | `schedule` or `event` |
3072
+ | `weekdays` | `Array<integer> \| null` | no | Schedule weekdays (0-6), for `schedule` routines |
3073
+
3074
+ <a id="type-workroutinerun"></a>
3075
+
3076
+ ### `WorkRoutineRun`
3077
+
3078
+ One entry in a routine's run ledger.
3079
+
3080
+ | Field | Type | Required | Description |
3081
+ |---|---|---|---|
3082
+ | `id` | `string \| null` | no | Run id |
3083
+ | `startedAt` | `string \| null` | no | When the run started |
3084
+ | `status` | `string \| null` | no | How the run ended, or that it is still going |
3085
+
3086
+ <a id="type-worksearchhit"></a>
3087
+
3088
+ ### `WorkSearchHit`
3089
+
3090
+ One search hit — a message or an event, with its conversation.
3091
+
3092
+ | Field | Type | Required | Description |
3093
+ |---|---|---|---|
3094
+ | `conversation` | `string \| null` | no | Conversation the hit belongs to |
3095
+ | `id` | `string \| null` | no | Message or event id |
3096
+ | `text` | `string \| null` | no | Matched text |