@graph8/sdk 0.251.0 → 0.262.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/dist/cli.js +216 -0
- package/dist/index.d.mts +105 -7
- package/dist/index.d.ts +105 -7
- package/dist/index.js +44 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +44 -3
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +103 -7
- package/dist/react.d.ts +103 -7
- package/dist/react.js +62 -11
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +53 -12
- package/dist/react.mjs.map +1 -1
- package/dist/types/README.md +7 -0
- package/dist/types/agency.d.ts +20 -0
- package/dist/types/agentSetup.d.ts +57 -0
- package/dist/types/api.d.ts +127 -0
- package/dist/types/appClient.d.ts +99 -0
- package/dist/types/appPlatform.d.ts +269 -0
- package/dist/types/appTokens.d.ts +125 -0
- package/dist/types/apps.d.ts +130 -0
- package/dist/types/audiences.d.ts +88 -0
- package/dist/types/calendar.d.ts +55 -0
- package/dist/types/campaigns.d.ts +61 -0
- package/dist/types/chat.d.ts +35 -0
- package/dist/types/cli.d.ts +14 -0
- package/dist/types/companies.d.ts +123 -0
- package/dist/types/contacts.d.ts +200 -0
- package/dist/types/copilot.d.ts +31 -0
- package/dist/types/core.d.ts +1052 -0
- package/dist/types/deals.d.ts +215 -0
- package/dist/types/enrich.d.ts +51 -0
- package/dist/types/fields.d.ts +84 -0
- package/dist/types/forms.d.ts +16 -0
- package/dist/types/http.d.ts +141 -0
- package/dist/types/inbox.d.ts +123 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/intent.d.ts +196 -0
- package/dist/types/lists.d.ts +44 -0
- package/dist/types/mailboxes.d.ts +240 -0
- package/dist/types/marketplace.d.ts +62 -0
- package/dist/types/meetings.d.ts +70 -0
- package/dist/types/newsletter.d.ts +212 -0
- package/dist/types/notes.d.ts +57 -0
- package/dist/types/objects.d.ts +281 -0
- package/dist/types/pipelines.d.ts +135 -0
- package/dist/types/quotes.d.ts +143 -0
- package/dist/types/react.d.ts +978 -0
- package/dist/types/search.d.ts +99 -0
- package/dist/types/sequences.d.ts +255 -0
- package/dist/types/signals.d.ts +28 -0
- package/dist/types/skills.d.ts +176 -0
- package/dist/types/snippet.d.ts +24 -0
- package/dist/types/studio.d.ts +161 -0
- package/dist/types/tasks.d.ts +101 -0
- package/dist/types/types.d.ts +45 -0
- package/dist/types/utils.d.ts +21 -0
- package/dist/types/version.d.ts +10 -0
- package/dist/types/visitors.d.ts +29 -0
- package/dist/types/voice.d.ts +304 -0
- package/dist/types/webhooks.d.ts +71 -0
- package/dist/types/workflows.d.ts +229 -0
- package/docs/agents.md +748 -0
- package/docs/api/README.md +165 -0
- package/docs/api/accounts.d.ts +396 -0
- package/docs/api/accounts.md +644 -0
- package/docs/api/adCampaigns.d.ts +707 -0
- package/docs/api/adCampaigns.md +1091 -0
- package/docs/api/adCreatives.d.ts +996 -0
- package/docs/api/adCreatives.md +1708 -0
- package/docs/api/agency.d.ts +556 -0
- package/docs/api/agency.md +845 -0
- package/docs/api/agent.d.ts +330 -0
- package/docs/api/agent.md +514 -0
- package/docs/api/agents.d.ts +1622 -0
- package/docs/api/agents.md +2860 -0
- package/docs/api/aiInbox.d.ts +1984 -0
- package/docs/api/aiInbox.md +3490 -0
- package/docs/api/analytics.d.ts +1273 -0
- package/docs/api/analytics.md +2095 -0
- package/docs/api/apiKeys.d.ts +252 -0
- package/docs/api/apiKeys.md +318 -0
- package/docs/api/appDeployments.d.ts +236 -0
- package/docs/api/appDeployments.md +471 -0
- package/docs/api/appDomains.d.ts +171 -0
- package/docs/api/appDomains.md +281 -0
- package/docs/api/appLogs.d.ts +120 -0
- package/docs/api/appLogs.md +159 -0
- package/docs/api/appObjects.d.ts +415 -0
- package/docs/api/appObjects.md +568 -0
- package/docs/api/appPages.d.ts +557 -0
- package/docs/api/appPages.md +796 -0
- package/docs/api/appPlatformTokens.d.ts +123 -0
- package/docs/api/appPlatformTokens.md +172 -0
- package/docs/api/appointments.d.ts +2361 -0
- package/docs/api/appointments.md +3917 -0
- package/docs/api/apps.d.ts +822 -0
- package/docs/api/apps.md +1342 -0
- package/docs/api/assertUpsert.d.ts +286 -0
- package/docs/api/assertUpsert.md +370 -0
- package/docs/api/audienceSyncs.d.ts +259 -0
- package/docs/api/audienceSyncs.md +395 -0
- package/docs/api/brandKit.d.ts +686 -0
- package/docs/api/brandKit.md +1133 -0
- package/docs/api/bugReports.d.ts +181 -0
- package/docs/api/bugReports.md +268 -0
- package/docs/api/by-path.md +3260 -0
- package/docs/api/calendarInvites.d.ts +117 -0
- package/docs/api/calendarInvites.md +148 -0
- package/docs/api/campaignWorkflows.d.ts +152 -0
- package/docs/api/campaignWorkflows.md +200 -0
- package/docs/api/campaigns.d.ts +721 -0
- package/docs/api/campaigns.md +1236 -0
- package/docs/api/channels.d.ts +171 -0
- package/docs/api/channels.md +235 -0
- package/docs/api/cliCampaigns.d.ts +205 -0
- package/docs/api/cliCampaigns.md +256 -0
- package/docs/api/cliPipelines.d.ts +324 -0
- package/docs/api/cliPipelines.md +562 -0
- package/docs/api/clickHouse.d.ts +115 -0
- package/docs/api/clickHouse.md +138 -0
- package/docs/api/companies.d.ts +1636 -0
- package/docs/api/companies.md +2211 -0
- package/docs/api/companyIntelligence.d.ts +299 -0
- package/docs/api/companyIntelligence.md +488 -0
- package/docs/api/contacts.d.ts +2173 -0
- package/docs/api/contacts.md +3143 -0
- package/docs/api/content.d.ts +968 -0
- package/docs/api/content.md +1667 -0
- package/docs/api/contentGridSkills.d.ts +177 -0
- package/docs/api/contentGridSkills.md +271 -0
- package/docs/api/copilot.d.ts +1017 -0
- package/docs/api/copilot.md +1765 -0
- package/docs/api/crmSyncs.d.ts +215 -0
- package/docs/api/crmSyncs.md +301 -0
- package/docs/api/customerSuccess.d.ts +491 -0
- package/docs/api/customerSuccess.md +776 -0
- package/docs/api/deals.d.ts +1697 -0
- package/docs/api/deals.md +2436 -0
- package/docs/api/deliverability.d.ts +418 -0
- package/docs/api/deliverability.md +677 -0
- package/docs/api/desk.d.ts +1765 -0
- package/docs/api/desk.md +3007 -0
- package/docs/api/dialer.d.ts +1185 -0
- package/docs/api/dialer.md +2166 -0
- package/docs/api/dialerAnalytics.d.ts +187 -0
- package/docs/api/dialerAnalytics.md +257 -0
- package/docs/api/documents.d.ts +895 -0
- package/docs/api/documents.md +1440 -0
- package/docs/api/duplicates.d.ts +195 -0
- package/docs/api/duplicates.md +315 -0
- package/docs/api/eSign.d.ts +38 -0
- package/docs/api/eSign.md +54 -0
- package/docs/api/eSignature.d.ts +242 -0
- package/docs/api/eSignature.md +341 -0
- package/docs/api/enrichment.d.ts +3207 -0
- package/docs/api/enrichment.md +5225 -0
- package/docs/api/events.d.ts +115 -0
- package/docs/api/events.md +105 -0
- package/docs/api/fields.d.ts +482 -0
- package/docs/api/fields.md +566 -0
- package/docs/api/forms.d.ts +1012 -0
- package/docs/api/forms.md +1542 -0
- package/docs/api/gtmCampaigns.d.ts +662 -0
- package/docs/api/gtmCampaigns.md +1044 -0
- package/docs/api/gtmContext.d.ts +1187 -0
- package/docs/api/gtmContext.md +2112 -0
- package/docs/api/gtmDeliverability.d.ts +60 -0
- package/docs/api/gtmDeliverability.md +63 -0
- package/docs/api/gtmKnowledgeBase.d.ts +76 -0
- package/docs/api/gtmKnowledgeBase.md +91 -0
- package/docs/api/gtmLaunchHelpers.d.ts +123 -0
- package/docs/api/gtmLaunchHelpers.md +148 -0
- package/docs/api/gtmLibrary.d.ts +448 -0
- package/docs/api/gtmLibrary.md +780 -0
- package/docs/api/health.d.ts +39 -0
- package/docs/api/health.md +58 -0
- package/docs/api/imageLibrary.d.ts +341 -0
- package/docs/api/imageLibrary.md +569 -0
- package/docs/api/imports.d.ts +157 -0
- package/docs/api/imports.md +174 -0
- package/docs/api/inbox.d.ts +709 -0
- package/docs/api/inbox.md +1067 -0
- package/docs/api/install.d.ts +213 -0
- package/docs/api/install.md +317 -0
- package/docs/api/installedApps.d.ts +131 -0
- package/docs/api/installedApps.md +241 -0
- package/docs/api/integrationStatus.d.ts +142 -0
- package/docs/api/integrationStatus.md +205 -0
- package/docs/api/integrations.d.ts +2327 -0
- package/docs/api/integrations.md +3791 -0
- package/docs/api/intent.d.ts +482 -0
- package/docs/api/intent.md +858 -0
- package/docs/api/knowledge.d.ts +501 -0
- package/docs/api/knowledge.md +843 -0
- package/docs/api/knowledgeBase.d.ts +84 -0
- package/docs/api/knowledgeBase.md +96 -0
- package/docs/api/landingPages.d.ts +1411 -0
- package/docs/api/landingPages.md +2488 -0
- package/docs/api/leads.d.ts +133 -0
- package/docs/api/leads.md +180 -0
- package/docs/api/library.d.ts +217 -0
- package/docs/api/library.md +338 -0
- package/docs/api/linkedIn.d.ts +227 -0
- package/docs/api/linkedIn.md +289 -0
- package/docs/api/linkedInOutreach.d.ts +727 -0
- package/docs/api/linkedInOutreach.md +990 -0
- package/docs/api/lists.d.ts +1106 -0
- package/docs/api/lists.md +1609 -0
- package/docs/api/logs.d.ts +71 -0
- package/docs/api/logs.md +70 -0
- package/docs/api/mailboxes.d.ts +1050 -0
- package/docs/api/mailboxes.md +1690 -0
- package/docs/api/marketingIntelligence.d.ts +256 -0
- package/docs/api/marketingIntelligence.md +454 -0
- package/docs/api/marketplace.d.ts +3173 -0
- package/docs/api/marketplace.md +5953 -0
- package/docs/api/mcp.d.ts +69 -0
- package/docs/api/mcp.md +69 -0
- package/docs/api/me.d.ts +54 -0
- package/docs/api/me.md +56 -0
- package/docs/api/meetings.d.ts +539 -0
- package/docs/api/meetings.md +747 -0
- package/docs/api/newsletter.d.ts +1613 -0
- package/docs/api/newsletter.md +2746 -0
- package/docs/api/notes.d.ts +517 -0
- package/docs/api/notes.md +888 -0
- package/docs/api/notifications.d.ts +94 -0
- package/docs/api/notifications.md +105 -0
- package/docs/api/objects.d.ts +621 -0
- package/docs/api/objects.md +1098 -0
- package/docs/api/openSearch.d.ts +234 -0
- package/docs/api/openSearch.md +297 -0
- package/docs/api/ops.d.ts +299 -0
- package/docs/api/ops.md +339 -0
- package/docs/api/orgGovernance.d.ts +393 -0
- package/docs/api/orgGovernance.md +623 -0
- package/docs/api/orgVideos.d.ts +184 -0
- package/docs/api/orgVideos.md +252 -0
- package/docs/api/organizationSettings.d.ts +626 -0
- package/docs/api/organizationSettings.md +911 -0
- package/docs/api/phoneNumbers.d.ts +484 -0
- package/docs/api/phoneNumbers.md +777 -0
- package/docs/api/profile.d.ts +329 -0
- package/docs/api/profile.md +540 -0
- package/docs/api/programmaticPages.d.ts +400 -0
- package/docs/api/programmaticPages.md +626 -0
- package/docs/api/providerDomains.d.ts +866 -0
- package/docs/api/providerDomains.md +1446 -0
- package/docs/api/providerUsage.d.ts +129 -0
- package/docs/api/providerUsage.md +186 -0
- package/docs/api/public.d.ts +69 -0
- package/docs/api/public.md +78 -0
- package/docs/api/publicCopilot.d.ts +67 -0
- package/docs/api/publicCopilot.md +80 -0
- package/docs/api/publicSignals.d.ts +66 -0
- package/docs/api/publicSignals.md +71 -0
- package/docs/api/publicVisitors.d.ts +97 -0
- package/docs/api/publicVisitors.md +118 -0
- package/docs/api/quotes.d.ts +1564 -0
- package/docs/api/quotes.md +2553 -0
- package/docs/api/radar.d.ts +808 -0
- package/docs/api/radar.md +1431 -0
- package/docs/api/radarReports.d.ts +208 -0
- package/docs/api/radarReports.md +306 -0
- package/docs/api/recordRoles.d.ts +143 -0
- package/docs/api/recordRoles.md +175 -0
- package/docs/api/repos.d.ts +146 -0
- package/docs/api/repos.md +211 -0
- package/docs/api/research.d.ts +295 -0
- package/docs/api/research.md +534 -0
- package/docs/api/revenue.d.ts +402 -0
- package/docs/api/revenue.md +608 -0
- package/docs/api/revenueAnalytics.d.ts +147 -0
- package/docs/api/revenueAnalytics.md +212 -0
- package/docs/api/revenueLifecycle.d.ts +207 -0
- package/docs/api/revenueLifecycle.md +274 -0
- package/docs/api/revenueRecords.d.ts +372 -0
- package/docs/api/revenueRecords.md +563 -0
- package/docs/api/roles.d.ts +431 -0
- package/docs/api/roles.md +812 -0
- package/docs/api/salesCoach.d.ts +877 -0
- package/docs/api/salesCoach.md +1540 -0
- package/docs/api/sandbox.d.ts +210 -0
- package/docs/api/sandbox.md +380 -0
- package/docs/api/scans.d.ts +104 -0
- package/docs/api/scans.md +136 -0
- package/docs/api/scheduleBuy.d.ts +293 -0
- package/docs/api/scheduleBuy.md +431 -0
- package/docs/api/scraping.d.ts +266 -0
- package/docs/api/scraping.md +383 -0
- package/docs/api/sdrAnalytics.d.ts +138 -0
- package/docs/api/sdrAnalytics.md +246 -0
- package/docs/api/search.d.ts +598 -0
- package/docs/api/search.md +866 -0
- package/docs/api/seo.d.ts +447 -0
- package/docs/api/seo.md +660 -0
- package/docs/api/sequenceLifecycle.d.ts +439 -0
- package/docs/api/sequenceLifecycle.md +513 -0
- package/docs/api/sequences.d.ts +1936 -0
- package/docs/api/sequences.md +3232 -0
- package/docs/api/settings.d.ts +448 -0
- package/docs/api/settings.md +731 -0
- package/docs/api/signals.d.ts +1441 -0
- package/docs/api/signals.md +2526 -0
- package/docs/api/signatures.d.ts +719 -0
- package/docs/api/signatures.md +1247 -0
- package/docs/api/skills.d.ts +230 -0
- package/docs/api/skills.md +466 -0
- package/docs/api/snippet.d.ts +85 -0
- package/docs/api/snippet.md +106 -0
- package/docs/api/socialPublishing.d.ts +824 -0
- package/docs/api/socialPublishing.md +1245 -0
- package/docs/api/studioDocuments.d.ts +244 -0
- package/docs/api/studioDocuments.md +348 -0
- package/docs/api/support.d.ts +90 -0
- package/docs/api/support.md +76 -0
- package/docs/api/suppressions.d.ts +241 -0
- package/docs/api/suppressions.md +343 -0
- package/docs/api/surveys.d.ts +847 -0
- package/docs/api/surveys.md +1223 -0
- package/docs/api/tasks.d.ts +813 -0
- package/docs/api/tasks.md +1344 -0
- package/docs/api/teamMembers.d.ts +668 -0
- package/docs/api/teamMembers.md +1040 -0
- package/docs/api/teams.d.ts +784 -0
- package/docs/api/teams.md +1395 -0
- package/docs/api/usage.d.ts +277 -0
- package/docs/api/usage.md +389 -0
- package/docs/api/visitors.d.ts +690 -0
- package/docs/api/visitors.md +1075 -0
- package/docs/api/voice.d.ts +4661 -0
- package/docs/api/voice.md +7905 -0
- package/docs/api/webAnalytics.d.ts +964 -0
- package/docs/api/webAnalytics.md +1452 -0
- package/docs/api/webChat.d.ts +1704 -0
- package/docs/api/webChat.md +2048 -0
- package/docs/api/webhooks.d.ts +251 -0
- package/docs/api/webhooks.md +386 -0
- package/docs/api/websiteEditor.d.ts +324 -0
- package/docs/api/websiteEditor.md +517 -0
- package/docs/api/work.d.ts +2298 -0
- package/docs/api/work.md +3096 -0
- package/docs/api/workbench.d.ts +2962 -0
- package/docs/api/workbench.md +4884 -0
- package/docs/api/workflows.d.ts +1218 -0
- package/docs/api/workflows.md +2302 -0
- package/docs/sdk-clients.md +4339 -0
- package/package.json +10 -3
|
@@ -0,0 +1,2048 @@
|
|
|
1
|
+
<!-- Generated by sdk/js/scripts/generate-agent-docs.ts from developer-contract/openapi.json. Regenerated on every build. -->
|
|
2
|
+
|
|
3
|
+
# `g8.api.webChat`: Web Chat
|
|
4
|
+
|
|
5
|
+
46 operations (15 read, 22 write, 9 destructive).
|
|
6
|
+
|
|
7
|
+
No hand-written client covers this area. Call it through `g8.api.webChat.*` 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: [webChat.d.ts](webChat.d.ts).
|
|
20
|
+
|
|
21
|
+
## Operations
|
|
22
|
+
|
|
23
|
+
| Call | HTTP | Tier | Scope | Summary |
|
|
24
|
+
|---|---|---|---|---|
|
|
25
|
+
| [`addWebchatHandoffPoolTeams`](#op-addwebchathandoffpoolteams) | `POST /api/v1/webchat/handoff-pool/teams` | write | `inbox:write` | Add Webchat Handoff Pool Teams |
|
|
26
|
+
| [`addWebchatHandoffPoolUsers`](#op-addwebchathandoffpoolusers) | `POST /api/v1/webchat/handoff-pool/users` | write | `inbox:write` | Add Webchat Handoff Pool Users |
|
|
27
|
+
| [`createAssessment`](#op-createassessment) | `POST /api/v1/webchat/assessments` | write | `inbox:write` | Create Assessment |
|
|
28
|
+
| [`createChatBot`](#op-createchatbot) | `POST /api/v1/webchat/chat-bots` | write | `inbox:write` | Create Chat Bot |
|
|
29
|
+
| [`createWebchatAgent`](#op-createwebchatagent) | `POST /api/v1/webchat/agents` | write | `inbox:write` | Create Webchat Agent |
|
|
30
|
+
| [`createWebchatBlog`](#op-createwebchatblog) | `POST /api/v1/webchat/blogs` | write | `inbox:write` | Create Webchat Blog |
|
|
31
|
+
| [`createWebchatButton`](#op-createwebchatbutton) | `POST /api/v1/webchat/buttons` | write | `inbox:write` | Create Webchat Button |
|
|
32
|
+
| [`createWebchatQuestion`](#op-createwebchatquestion) | `POST /api/v1/webchat/questions` | write | `inbox:write` | Create Webchat Question |
|
|
33
|
+
| [`createWebchatSettings`](#op-createwebchatsettings) | `POST /api/v1/webchat/settings` | write | `inbox:write` | Create Webchat Settings |
|
|
34
|
+
| [`deleteAssessment`](#op-deleteassessment) | `DELETE /api/v1/webchat/assessments/{assessment_id}` | destructive | `inbox:delete` | Delete Assessment |
|
|
35
|
+
| [`deleteChatBot`](#op-deletechatbot) | `DELETE /api/v1/webchat/chat-bots/{bot_id}` | destructive | `inbox:delete` | Delete Chat Bot |
|
|
36
|
+
| [`deleteWebchatAgent`](#op-deletewebchatagent) | `DELETE /api/v1/webchat/agents/{agent_id}` | destructive | `inbox:delete` | Delete Webchat Agent |
|
|
37
|
+
| [`deleteWebchatBlog`](#op-deletewebchatblog) | `DELETE /api/v1/webchat/blogs/{blog_id}` | destructive | `inbox:delete` | Delete Webchat Blog |
|
|
38
|
+
| [`deleteWebchatButton`](#op-deletewebchatbutton) | `DELETE /api/v1/webchat/buttons/{button_id}` | destructive | `inbox:delete` | Delete Webchat Button |
|
|
39
|
+
| [`deleteWebchatQuestion`](#op-deletewebchatquestion) | `DELETE /api/v1/webchat/questions/{question_id}` | destructive | `inbox:delete` | Delete Webchat Question |
|
|
40
|
+
| [`deleteWebchatSettings`](#op-deletewebchatsettings) | `DELETE /api/v1/webchat/settings` | destructive | `inbox:delete` | Delete Webchat Settings |
|
|
41
|
+
| [`fetchWebchatBlogMetadata`](#op-fetchwebchatblogmetadata) | `POST /api/v1/webchat/blogs/fetch-metadata` | write | `inbox:write` | Fetch Webchat Blog Metadata |
|
|
42
|
+
| [`getAssessment`](#op-getassessment) | `GET /api/v1/webchat/assessments/{assessment_id}` | read | `inbox:read` | Get Assessment |
|
|
43
|
+
| [`getWebchatHandoffPool`](#op-getwebchathandoffpool) | `GET /api/v1/webchat/handoff-pool` | read | `inbox:read` | Get Webchat Handoff Pool |
|
|
44
|
+
| [`getWebchatHandoffPoolStatus`](#op-getwebchathandoffpoolstatus) | `GET /api/v1/webchat/handoff-pool-status` | read | `inbox:read` | Get Webchat Handoff Pool Status |
|
|
45
|
+
| [`getWebchatHumanAvailability`](#op-getwebchathumanavailability) | `GET /api/v1/webchat/human-availability` | read | `inbox:read` | Get Webchat Human Availability |
|
|
46
|
+
| [`getWebchatSettings`](#op-getwebchatsettings) | `GET /api/v1/webchat/settings` | read | `inbox:read` | Get Webchat Settings |
|
|
47
|
+
| [`getWebchatVisitorFunnel`](#op-getwebchatvisitorfunnel) | `GET /api/v1/webchat/visitors/funnel` | read | `inbox:read` | Get Webchat Visitor Funnel |
|
|
48
|
+
| [`listAssessments`](#op-listassessments) | `GET /api/v1/webchat/assessments` | read | `inbox:read` | List Assessments |
|
|
49
|
+
| [`listChatBots`](#op-listchatbots) | `GET /api/v1/webchat/chat-bots` | read | `inbox:read` | List Chat Bots |
|
|
50
|
+
| [`listWebchatAgents`](#op-listwebchatagents) | `GET /api/v1/webchat/agents` | read | `inbox:read` | List Webchat Agents |
|
|
51
|
+
| [`listWebchatBlogs`](#op-listwebchatblogs) | `GET /api/v1/webchat/blogs` | read | `inbox:read` | List Webchat Blogs |
|
|
52
|
+
| [`listWebchatButtons`](#op-listwebchatbuttons) | `GET /api/v1/webchat/buttons` | read | `inbox:read` | List Webchat Buttons |
|
|
53
|
+
| [`listWebchatQuestions`](#op-listwebchatquestions) | `GET /api/v1/webchat/questions` | read | `inbox:read` | List Webchat Questions |
|
|
54
|
+
| [`listWebchatTeamEventTypes`](#op-listwebchatteameventtypes) | `GET /api/v1/webchat/teams/{team_id}/event-types` | read | `inbox:read` | List Webchat Team Event Types |
|
|
55
|
+
| [`listWebchatTeams`](#op-listwebchatteams) | `GET /api/v1/webchat/teams` | read | `inbox:read` | List Webchat Teams |
|
|
56
|
+
| [`listWebchatVisitors`](#op-listwebchatvisitors) | `GET /api/v1/webchat/visitors` | read | `inbox:read` | List Webchat Visitors |
|
|
57
|
+
| [`promoteChatBotToDefault`](#op-promotechatbottodefault) | `POST /api/v1/webchat/chat-bots/{bot_id}/promote-default` | write | `inbox:write` | Promote Chat Bot To Default |
|
|
58
|
+
| [`putWebchatHumanAvailability`](#op-putwebchathumanavailability) | `PUT /api/v1/webchat/human-availability` | write | `inbox:write` | Put Webchat Human Availability |
|
|
59
|
+
| [`removeWebchatHandoffPoolTeam`](#op-removewebchathandoffpoolteam) | `DELETE /api/v1/webchat/handoff-pool/teams/{team_id}` | destructive | `inbox:delete` | Remove Webchat Handoff Pool Team |
|
|
60
|
+
| [`removeWebchatHandoffPoolUser`](#op-removewebchathandoffpooluser) | `DELETE /api/v1/webchat/handoff-pool/users/{user_id}` | destructive | `inbox:delete` | Remove Webchat Handoff Pool User |
|
|
61
|
+
| [`updateAssessment`](#op-updateassessment) | `PATCH /api/v1/webchat/assessments/{assessment_id}` | write | `inbox:write` | Update Assessment |
|
|
62
|
+
| [`updateChatBot`](#op-updatechatbot) | `PATCH /api/v1/webchat/chat-bots/{bot_id}` | write | `inbox:write` | Update Chat Bot |
|
|
63
|
+
| [`updateWebchatAgent`](#op-updatewebchatagent) | `PATCH /api/v1/webchat/agents/{agent_id}` | write | `inbox:write` | Update Webchat Agent |
|
|
64
|
+
| [`updateWebchatBlog`](#op-updatewebchatblog) | `PATCH /api/v1/webchat/blogs/{blog_id}` | write | `inbox:write` | Update Webchat Blog |
|
|
65
|
+
| [`updateWebchatButton`](#op-updatewebchatbutton) | `PATCH /api/v1/webchat/buttons/{button_id}` | write | `inbox:write` | Update Webchat Button |
|
|
66
|
+
| [`updateWebchatHandoffPoolTeamScope`](#op-updatewebchathandoffpoolteamscope) | `PATCH /api/v1/webchat/handoff-pool/teams/{team_id}/scope` | write | `inbox:write` | Update Webchat Handoff Pool Team Scope |
|
|
67
|
+
| [`updateWebchatHandoffPoolUserScope`](#op-updatewebchathandoffpooluserscope) | `PATCH /api/v1/webchat/handoff-pool/users/{user_id}/scope` | write | `inbox:write` | Update Webchat Handoff Pool User Scope |
|
|
68
|
+
| [`updateWebchatQuestion`](#op-updatewebchatquestion) | `PATCH /api/v1/webchat/questions/{question_id}` | write | `inbox:write` | Update Webchat Question |
|
|
69
|
+
| [`updateWebchatSettings`](#op-updatewebchatsettings) | `PATCH /api/v1/webchat/settings` | write | `inbox:write` | Update Webchat Settings |
|
|
70
|
+
| [`uploadWebchatImage`](#op-uploadwebchatimage) | `POST /api/v1/webchat/images` | write | `inbox:write` | Upload Webchat Image |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
<a id="op-addwebchathandoffpoolteams"></a>
|
|
75
|
+
|
|
76
|
+
### `g8.api.webChat.addWebchatHandoffPoolTeams(input)`
|
|
77
|
+
|
|
78
|
+
**Add Webchat Handoff Pool Teams**
|
|
79
|
+
|
|
80
|
+
- HTTP: `POST /api/v1/webchat/handoff-pool/teams`
|
|
81
|
+
- operationId: `add_webchat_handoff_pool_teams_webchat_handoff_pool_teams_post` (also callable as `g8.api.call("add_webchat_handoff_pool_teams_webchat_handoff_pool_teams_post", input)`)
|
|
82
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
83
|
+
- API-key scope: `inbox:write`
|
|
84
|
+
|
|
85
|
+
Add whole teams to the handoff pool. Returns the whole pool afterwards.
|
|
86
|
+
|
|
87
|
+
A team's members are expanded when a chat is routed, so someone joining
|
|
88
|
+
the team later is reachable without another call.
|
|
89
|
+
|
|
90
|
+
**Input**
|
|
91
|
+
|
|
92
|
+
| Field | Type | Required | Description |
|
|
93
|
+
|---|---|---|---|
|
|
94
|
+
| `body` | `HandoffPoolTeamsRequest` | yes | Request body; fields below. |
|
|
95
|
+
|
|
96
|
+
Body fields (`HandoffPoolTeamsRequest`):
|
|
97
|
+
|
|
98
|
+
| Field | Type | Required | Description |
|
|
99
|
+
|---|---|---|---|
|
|
100
|
+
| `body.team_ids` | `Array<string (uuid)>` | yes | min items 1, max items 200 |
|
|
101
|
+
| `body.chat_bot_ids` | `Array<string (uuid)>` | no | max items 200 |
|
|
102
|
+
| `body.pool` | `"external" \| "internal"` | no | default `"external"` |
|
|
103
|
+
|
|
104
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
105
|
+
|
|
106
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
107
|
+
|
|
108
|
+
**Example**
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
const result = await g8.api.webChat.addWebchatHandoffPoolTeams({ body: { team_ids: ["00000000-0000-0000-0000-000000000000"] } });
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
<a id="op-addwebchathandoffpoolusers"></a>
|
|
117
|
+
|
|
118
|
+
### `g8.api.webChat.addWebchatHandoffPoolUsers(input)`
|
|
119
|
+
|
|
120
|
+
**Add Webchat Handoff Pool Users**
|
|
121
|
+
|
|
122
|
+
- HTTP: `POST /api/v1/webchat/handoff-pool/users`
|
|
123
|
+
- operationId: `add_webchat_handoff_pool_users_webchat_handoff_pool_users_post` (also callable as `g8.api.call("add_webchat_handoff_pool_users_webchat_handoff_pool_users_post", input)`)
|
|
124
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
125
|
+
- API-key scope: `inbox:write`
|
|
126
|
+
|
|
127
|
+
Add people to the handoff pool. Returns the whole pool afterwards.
|
|
128
|
+
|
|
129
|
+
Adding someone already in it is a no-op, not an error. From the first
|
|
130
|
+
member on, handed-off chats go ONLY to the pool.
|
|
131
|
+
|
|
132
|
+
**Input**
|
|
133
|
+
|
|
134
|
+
| Field | Type | Required | Description |
|
|
135
|
+
|---|---|---|---|
|
|
136
|
+
| `body` | `HandoffPoolUsersRequest` | yes | Request body; fields below. |
|
|
137
|
+
|
|
138
|
+
Body fields (`HandoffPoolUsersRequest`):
|
|
139
|
+
|
|
140
|
+
| Field | Type | Required | Description |
|
|
141
|
+
|---|---|---|---|
|
|
142
|
+
| `body.user_ids` | `Array<string>` | yes | min items 1, max items 200 |
|
|
143
|
+
| `body.chat_bot_ids` | `Array<string (uuid)>` | no | max items 200 |
|
|
144
|
+
| `body.pool` | `"external" \| "internal"` | no | default `"external"` |
|
|
145
|
+
|
|
146
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
147
|
+
|
|
148
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
149
|
+
|
|
150
|
+
**Example**
|
|
151
|
+
|
|
152
|
+
```ts
|
|
153
|
+
const result = await g8.api.webChat.addWebchatHandoffPoolUsers({ body: { user_ids: ["id"] } });
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
<a id="op-createassessment"></a>
|
|
159
|
+
|
|
160
|
+
### `g8.api.webChat.createAssessment(input)`
|
|
161
|
+
|
|
162
|
+
**Create Assessment**
|
|
163
|
+
|
|
164
|
+
- HTTP: `POST /api/v1/webchat/assessments`
|
|
165
|
+
- operationId: `create_assessment_webchat_assessments_post` (also callable as `g8.api.call("create_assessment_webchat_assessments_post", input)`)
|
|
166
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
167
|
+
- API-key scope: `inbox:write`
|
|
168
|
+
|
|
169
|
+
Create an assessment.
|
|
170
|
+
|
|
171
|
+
`definition` is the flow itself and is validated HERE, against the app's
|
|
172
|
+
own model - so a graph whose `start_step_id` names a step it does not
|
|
173
|
+
define is a 422 rather than a dead end a visitor walks into.
|
|
174
|
+
|
|
175
|
+
Note `chat_bot_id` is a QUERY parameter on this one and a BODY field on
|
|
176
|
+
every other webchat create. That is the app's own inconsistency, mirrored
|
|
177
|
+
rather than tidied: moving it into the body would send the handler a
|
|
178
|
+
parameter it does not take.
|
|
179
|
+
|
|
180
|
+
**Input**
|
|
181
|
+
|
|
182
|
+
| Field | Type | Required | Description |
|
|
183
|
+
|---|---|---|---|
|
|
184
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
185
|
+
| `body` | `AssessmentCreateRequest` | yes | Request body; fields below. |
|
|
186
|
+
| `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key. Replaying it returns the FIRST result. |
|
|
187
|
+
|
|
188
|
+
Body fields (`AssessmentCreateRequest`):
|
|
189
|
+
|
|
190
|
+
| Field | Type | Required | Description |
|
|
191
|
+
|---|---|---|---|
|
|
192
|
+
| `body.definition` | `AssessmentDefinition` | yes | The flow: `{start_step_id, steps[], results[]}`. |
|
|
193
|
+
| `body.name` | `string` | yes | min length 1, max length 200 |
|
|
194
|
+
| `body.description` | `string \| null` | no | max length 2000 |
|
|
195
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
196
|
+
|
|
197
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
198
|
+
|
|
199
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
200
|
+
|
|
201
|
+
**Example**
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
const result = await g8.api.webChat.createAssessment({
|
|
205
|
+
query: { chat_bot_id: "id" },
|
|
206
|
+
body: { definition: { start_step_id: "id" }, name: "Example" },
|
|
207
|
+
});
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
<a id="op-createchatbot"></a>
|
|
213
|
+
|
|
214
|
+
### `g8.api.webChat.createChatBot(input)`
|
|
215
|
+
|
|
216
|
+
**Create Chat Bot**
|
|
217
|
+
|
|
218
|
+
- HTTP: `POST /api/v1/webchat/chat-bots`
|
|
219
|
+
- operationId: `create_chat_bot_webchat_chat_bots_post` (also callable as `g8.api.call("create_chat_bot_webchat_chat_bots_post", input)`)
|
|
220
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
221
|
+
- API-key scope: `inbox:write`
|
|
222
|
+
|
|
223
|
+
Create a chat bot.
|
|
224
|
+
|
|
225
|
+
`agent_id` seeds the bot with an answering agent. Omitted, the bot is
|
|
226
|
+
created with none and answers nothing until an agent is mapped with
|
|
227
|
+
`POST /webchat/agents`.
|
|
228
|
+
|
|
229
|
+
**Input**
|
|
230
|
+
|
|
231
|
+
| Field | Type | Required | Description |
|
|
232
|
+
|---|---|---|---|
|
|
233
|
+
| `body` | `ChatBotCreateRequest` | yes | Request body; fields below. |
|
|
234
|
+
| `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. |
|
|
235
|
+
|
|
236
|
+
Body fields (`ChatBotCreateRequest`):
|
|
237
|
+
|
|
238
|
+
| Field | Type | Required | Description |
|
|
239
|
+
|---|---|---|---|
|
|
240
|
+
| `body.name` | `string` | yes | min length 1, max length 120 |
|
|
241
|
+
| `body.agent_id` | `string \| null` | no | Optional voice/text agent id used to seed the new bot's external chat agent. When omitted, no agent row is created. max length 255 |
|
|
242
|
+
| `body.agent_name` | `string \| null` | no | Display name of the selected agent. Stored on the agent row so the widget shows the AGENT's name, not the bot's. Falls back to the bot name when omitted. max length 255 |
|
|
243
|
+
|
|
244
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
245
|
+
|
|
246
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
247
|
+
|
|
248
|
+
**Example**
|
|
249
|
+
|
|
250
|
+
```ts
|
|
251
|
+
const result = await g8.api.webChat.createChatBot({ body: { name: "Example" } });
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
<a id="op-createwebchatagent"></a>
|
|
257
|
+
|
|
258
|
+
### `g8.api.webChat.createWebchatAgent(input)`
|
|
259
|
+
|
|
260
|
+
**Create Webchat Agent**
|
|
261
|
+
|
|
262
|
+
- HTTP: `POST /api/v1/webchat/agents`
|
|
263
|
+
- operationId: `create_webchat_agent_webchat_agents_post` (also callable as `g8.api.call("create_webchat_agent_webchat_agents_post", input)`)
|
|
264
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
265
|
+
- API-key scope: `inbox:write`
|
|
266
|
+
|
|
267
|
+
Map an agent onto the URLs it answers on.
|
|
268
|
+
|
|
269
|
+
`url_filter` is matched against the page the widget is embedded on.
|
|
270
|
+
`default: true` is the fallback when nothing matches - without one, a
|
|
271
|
+
visitor on an unlisted page gets no agent.
|
|
272
|
+
|
|
273
|
+
**Input**
|
|
274
|
+
|
|
275
|
+
| Field | Type | Required | Description |
|
|
276
|
+
|---|---|---|---|
|
|
277
|
+
| `body` | `AgentCreateRequest` | yes | Request body; fields below. |
|
|
278
|
+
| `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. |
|
|
279
|
+
|
|
280
|
+
Body fields (`AgentCreateRequest`):
|
|
281
|
+
|
|
282
|
+
| Field | Type | Required | Description |
|
|
283
|
+
|---|---|---|---|
|
|
284
|
+
| `body.agent_name` | `string` | yes | min length 1, max length 255 |
|
|
285
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
286
|
+
| `body.active` | `boolean` | no | default `true` |
|
|
287
|
+
| `body.agent_id` | `string \| null` | no | Agent id from agent settings. max length 255 |
|
|
288
|
+
| `body.default` | `boolean` | no | Used when no URL filter matches. default `false` |
|
|
289
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
290
|
+
| `body.url_filter` | `Array<string>` | no | URL paths where this agent is active. |
|
|
291
|
+
|
|
292
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
293
|
+
|
|
294
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
295
|
+
|
|
296
|
+
**Example**
|
|
297
|
+
|
|
298
|
+
```ts
|
|
299
|
+
const result = await g8.api.webChat.createWebchatAgent({ body: { agent_name: "Example", chat_bot_id: "id" } });
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
<a id="op-createwebchatblog"></a>
|
|
305
|
+
|
|
306
|
+
### `g8.api.webChat.createWebchatBlog(input)`
|
|
307
|
+
|
|
308
|
+
**Create Webchat Blog**
|
|
309
|
+
|
|
310
|
+
- HTTP: `POST /api/v1/webchat/blogs`
|
|
311
|
+
- operationId: `create_webchat_blog_webchat_blogs_post` (also callable as `g8.api.call("create_webchat_blog_webchat_blogs_post", input)`)
|
|
312
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
313
|
+
- API-key scope: `inbox:write`
|
|
314
|
+
|
|
315
|
+
Add an article card. `display_order` is ascending; ties break newest-first.
|
|
316
|
+
|
|
317
|
+
**Input**
|
|
318
|
+
|
|
319
|
+
| Field | Type | Required | Description |
|
|
320
|
+
|---|---|---|---|
|
|
321
|
+
| `body` | `BlogCreateRequest` | yes | Request body; fields below. |
|
|
322
|
+
| `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. |
|
|
323
|
+
|
|
324
|
+
Body fields (`BlogCreateRequest`):
|
|
325
|
+
|
|
326
|
+
| Field | Type | Required | Description |
|
|
327
|
+
|---|---|---|---|
|
|
328
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
329
|
+
| `body.title` | `string` | yes | min length 1, max length 500 |
|
|
330
|
+
| `body.url` | `string` | yes | min length 1, max length 1000 |
|
|
331
|
+
| `body.active` | `boolean` | no | default `true` |
|
|
332
|
+
| `body.description` | `string \| null` | no | |
|
|
333
|
+
| `body.display_order` | `integer` | no | Lower sorts first; ties break newest-first. default `0`, min 0, max 9999 |
|
|
334
|
+
| `body.image_url` | `string \| null` | no | max length 1000 |
|
|
335
|
+
| `body.paths` | `Array<string>` | no | |
|
|
336
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
337
|
+
|
|
338
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
339
|
+
|
|
340
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
341
|
+
|
|
342
|
+
**Example**
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
const result = await g8.api.webChat.createWebchatBlog({
|
|
346
|
+
body: { chat_bot_id: "id", title: "Example", url: "https://example.com" },
|
|
347
|
+
});
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
<a id="op-createwebchatbutton"></a>
|
|
353
|
+
|
|
354
|
+
### `g8.api.webChat.createWebchatButton(input)`
|
|
355
|
+
|
|
356
|
+
**Create Webchat Button**
|
|
357
|
+
|
|
358
|
+
- HTTP: `POST /api/v1/webchat/buttons`
|
|
359
|
+
- operationId: `create_webchat_button_webchat_buttons_post` (also callable as `g8.api.call("create_webchat_button_webchat_buttons_post", input)`)
|
|
360
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
361
|
+
- API-key scope: `inbox:write`
|
|
362
|
+
|
|
363
|
+
Add a quick-action button.
|
|
364
|
+
|
|
365
|
+
`value` is read according to `action`: a URL for `link`, the question text
|
|
366
|
+
for `question`, a calendar slug for `calendar`.
|
|
367
|
+
|
|
368
|
+
**Input**
|
|
369
|
+
|
|
370
|
+
| Field | Type | Required | Description |
|
|
371
|
+
|---|---|---|---|
|
|
372
|
+
| `body` | `ButtonCreateRequest` | yes | Request body; fields below. |
|
|
373
|
+
| `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. |
|
|
374
|
+
|
|
375
|
+
Body fields (`ButtonCreateRequest`):
|
|
376
|
+
|
|
377
|
+
| Field | Type | Required | Description |
|
|
378
|
+
|---|---|---|---|
|
|
379
|
+
| `body.action` | `"link" \| "question" \| "calendar"` | yes | |
|
|
380
|
+
| `body.category` | `string` | yes | min length 1, max length 100 |
|
|
381
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
382
|
+
| `body.label` | `string` | yes | min length 1, max length 255 |
|
|
383
|
+
| `body.value` | `string` | yes | URL for `link`, question text for `question`, slug for `calendar`. min length 1, max length 1000 |
|
|
384
|
+
| `body.active` | `boolean` | no | default `true` |
|
|
385
|
+
| `body.icon` | `string \| null` | no | max length 100 |
|
|
386
|
+
| `body.paths` | `Array<string>` | no | URL paths where the button appears. |
|
|
387
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | NULL shows it on BOTH widgets. |
|
|
388
|
+
|
|
389
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
390
|
+
|
|
391
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
392
|
+
|
|
393
|
+
**Example**
|
|
394
|
+
|
|
395
|
+
```ts
|
|
396
|
+
const result = await g8.api.webChat.createWebchatButton({
|
|
397
|
+
body: {
|
|
398
|
+
action: "link",
|
|
399
|
+
category: "example",
|
|
400
|
+
chat_bot_id: "id",
|
|
401
|
+
label: "example",
|
|
402
|
+
value: "example",
|
|
403
|
+
},
|
|
404
|
+
});
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
<a id="op-createwebchatquestion"></a>
|
|
410
|
+
|
|
411
|
+
### `g8.api.webChat.createWebchatQuestion(input)`
|
|
412
|
+
|
|
413
|
+
**Create Webchat Question**
|
|
414
|
+
|
|
415
|
+
- HTTP: `POST /api/v1/webchat/questions`
|
|
416
|
+
- operationId: `create_webchat_question_webchat_questions_post` (also callable as `g8.api.call("create_webchat_question_webchat_questions_post", input)`)
|
|
417
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
418
|
+
- API-key scope: `inbox:write`
|
|
419
|
+
|
|
420
|
+
Offer a preset question in the widget.
|
|
421
|
+
|
|
422
|
+
`placements` NULL or empty means EVERY placement, not none.
|
|
423
|
+
|
|
424
|
+
**Input**
|
|
425
|
+
|
|
426
|
+
| Field | Type | Required | Description |
|
|
427
|
+
|---|---|---|---|
|
|
428
|
+
| `body` | `QuestionCreateRequest` | yes | Request body; fields below. |
|
|
429
|
+
| `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. |
|
|
430
|
+
|
|
431
|
+
Body fields (`QuestionCreateRequest`):
|
|
432
|
+
|
|
433
|
+
| Field | Type | Required | Description |
|
|
434
|
+
|---|---|---|---|
|
|
435
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
436
|
+
| `body.question` | `string` | yes | min length 1, max length 1000 |
|
|
437
|
+
| `body.active` | `boolean` | no | default `true` |
|
|
438
|
+
| `body.category` | `string \| null` | no | max length 100 |
|
|
439
|
+
| `body.paths` | `Array<string>` | no | |
|
|
440
|
+
| `body.placements` | `Array<"launcher" \| "home" \| "conversation"> \| null` | no | NULL or [] means every placement. |
|
|
441
|
+
| `body.sort_order` | `integer \| null` | no | Order within a placement. NULL sorts last. |
|
|
442
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | NULL shows it on BOTH widgets. |
|
|
443
|
+
|
|
444
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
445
|
+
|
|
446
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
447
|
+
|
|
448
|
+
**Example**
|
|
449
|
+
|
|
450
|
+
```ts
|
|
451
|
+
const result = await g8.api.webChat.createWebchatQuestion({ body: { chat_bot_id: "id", question: "example" } });
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
<a id="op-createwebchatsettings"></a>
|
|
457
|
+
|
|
458
|
+
### `g8.api.webChat.createWebchatSettings(input)`
|
|
459
|
+
|
|
460
|
+
**Create Webchat Settings**
|
|
461
|
+
|
|
462
|
+
- HTTP: `POST /api/v1/webchat/settings`
|
|
463
|
+
- operationId: `create_webchat_settings_webchat_settings_post` (also callable as `g8.api.call("create_webchat_settings_webchat_settings_post", input)`)
|
|
464
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
465
|
+
- API-key scope: `inbox:write`
|
|
466
|
+
|
|
467
|
+
Create the theme for one bot and surface. ONE ROW PER PAIR.
|
|
468
|
+
|
|
469
|
+
409 when one already exists - use `PATCH /webchat/settings` for that.
|
|
470
|
+
|
|
471
|
+
Colours must be hex and dimensions must be CSS lengths; two model-level
|
|
472
|
+
guards additionally refuse an illegible text/background pair and an absurd
|
|
473
|
+
design-token magnitude. All of them run at THIS boundary, so a violation
|
|
474
|
+
is a 422 naming the field.
|
|
475
|
+
|
|
476
|
+
**Input**
|
|
477
|
+
|
|
478
|
+
| Field | Type | Required | Description |
|
|
479
|
+
|---|---|---|---|
|
|
480
|
+
| `body` | `SettingsCreateRequest` | yes | Request body; fields below. |
|
|
481
|
+
| `headers.Idempotency-Key` | `string \| null` | no | Retry-safety key for this create. Replaying the same key returns the FIRST result instead of creating a second row. Durability depends on the tenant's migration state, so treat it as best-effort. |
|
|
482
|
+
|
|
483
|
+
Body fields (`SettingsCreateRequest`):
|
|
484
|
+
|
|
485
|
+
| Field | Type | Required | Description |
|
|
486
|
+
|---|---|---|---|
|
|
487
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
488
|
+
| `body.assistantMessageBgColor` | `string` | no | default `"#fcfcfc"`, max length 20 |
|
|
489
|
+
| `body.assistantMessageTextColor` | `string` | no | default `"#000000"`, max length 20 |
|
|
490
|
+
| `body.assistantName` | `string` | no | default `"Assistant"`, max length 100 |
|
|
491
|
+
| `body.borderRadius` | `string` | no | default `"0.5rem"`, max length 20 |
|
|
492
|
+
| `body.botAvatarCustomUrl` | `string \| null` | no | max length 1000 |
|
|
493
|
+
| `body.botAvatarMode` | `"agent" \| "preset" \| "custom"` | no | default `"agent"` |
|
|
494
|
+
| `body.botAvatarPresetUrl` | `string \| null` | no | max length 1000 |
|
|
495
|
+
| `body.botIconType` | `string` | no | default `"bot"`, max length 50 |
|
|
496
|
+
| `body.chatWidth` | `string` | no | default `"350px"`, max length 20 |
|
|
497
|
+
| `body.copyOverrides` | `Record<string, string> \| null` | no | |
|
|
498
|
+
| `body.darkMode` | `boolean` | no | default `false` |
|
|
499
|
+
| `body.designTokens` | `DesignTokens \| null` | no | Design-token tree. The app's own model, so the magnitude guard runs here rather than inside the proxy. |
|
|
500
|
+
| `body.fontFamily` | `string` | no | default `"Inter"`, max length 100 |
|
|
501
|
+
| `body.fontSize` | `string` | no | default `"14px"`, max length 20 |
|
|
502
|
+
| `body.headerImageUrlExternal` | `string \| null` | no | max length 1000 |
|
|
503
|
+
| `body.headerImageUrlInternal` | `string \| null` | no | max length 1000 |
|
|
504
|
+
| `body.headerTextColor` | `string` | no | default `"#000000"`, max length 20 |
|
|
505
|
+
| `body.primaryColor` | `string` | no | default `"#7E2DF3"`, max length 20 |
|
|
506
|
+
| `body.robotIconColor` | `string` | no | default `"#ffffff"`, max length 20 |
|
|
507
|
+
| `body.robotIconType` | `string` | no | default `"message"`, max length 50 |
|
|
508
|
+
| `body.secondaryColor` | `string` | no | default `"#f8fafc"`, max length 20 |
|
|
509
|
+
| `body.showHeader` | `boolean` | no | default `true` |
|
|
510
|
+
| `body.showQuickActions` | `boolean` | no | default `true` |
|
|
511
|
+
| `body.showSuggestedQuestions` | `boolean` | no | default `true` |
|
|
512
|
+
| `body.suggestedQuestionsBgColor` | `string` | no | default `"#f0f9ff"`, max length 20 |
|
|
513
|
+
| `body.suggestedQuestionsSectionBgColor` | `string` | no | default `"#f8fafc"`, max length 20 |
|
|
514
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | Which widget this theme applies to. Omitted means `external`. `internal` is graph8's own support widget and is refused for any other org. |
|
|
515
|
+
| `body.themeSource` | `"default" \| "brand_kit" \| "custom"` | no | default `"default"` |
|
|
516
|
+
| `body.userMessageBgColor` | `string` | no | default `"#d7d5d5"`, max length 20 |
|
|
517
|
+
| `body.userMessageTextColor` | `string` | no | default `"#000000"`, max length 20 |
|
|
518
|
+
|
|
519
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
520
|
+
|
|
521
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
522
|
+
|
|
523
|
+
**Example**
|
|
524
|
+
|
|
525
|
+
```ts
|
|
526
|
+
const result = await g8.api.webChat.createWebchatSettings({ body: { chat_bot_id: "id" } });
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
|
|
531
|
+
<a id="op-deleteassessment"></a>
|
|
532
|
+
|
|
533
|
+
### `g8.api.webChat.deleteAssessment(input)`
|
|
534
|
+
|
|
535
|
+
**Delete Assessment**
|
|
536
|
+
|
|
537
|
+
- HTTP: `DELETE /api/v1/webchat/assessments/{assessment_id}`
|
|
538
|
+
- operationId: `delete_assessment_webchat_assessments__assessment_id__delete` (also callable as `g8.api.call("delete_assessment_webchat_assessments__assessment_id__delete", input)`)
|
|
539
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
540
|
+
- API-key scope: `inbox:delete`
|
|
541
|
+
|
|
542
|
+
Delete an assessment permanently.
|
|
543
|
+
|
|
544
|
+
Sessions already taken against it are historical records and are not
|
|
545
|
+
rewritten. To retire one reversibly, PATCH it with `active: false`.
|
|
546
|
+
|
|
547
|
+
**Input**
|
|
548
|
+
|
|
549
|
+
| Field | Type | Required | Description |
|
|
550
|
+
|---|---|---|---|
|
|
551
|
+
| `path.assessment_id` | `string` | yes | Assessment id. |
|
|
552
|
+
|
|
553
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
554
|
+
|
|
555
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
556
|
+
|
|
557
|
+
**Example**
|
|
558
|
+
|
|
559
|
+
```ts
|
|
560
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
561
|
+
const result = await g8.api.webChat.deleteAssessment({ path: { assessment_id: "id" } });
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
---
|
|
565
|
+
|
|
566
|
+
<a id="op-deletechatbot"></a>
|
|
567
|
+
|
|
568
|
+
### `g8.api.webChat.deleteChatBot(input)`
|
|
569
|
+
|
|
570
|
+
**Delete Chat Bot**
|
|
571
|
+
|
|
572
|
+
- HTTP: `DELETE /api/v1/webchat/chat-bots/{bot_id}`
|
|
573
|
+
- operationId: `delete_chat_bot_webchat_chat_bots__bot_id__delete` (also callable as `g8.api.call("delete_chat_bot_webchat_chat_bots__bot_id__delete", input)`)
|
|
574
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
575
|
+
- API-key scope: `inbox:delete`
|
|
576
|
+
|
|
577
|
+
Delete a chat bot, and with it the content that belongs to it.
|
|
578
|
+
|
|
579
|
+
Deleting the bot a live embed points at takes that widget down. Check
|
|
580
|
+
which bot is default with `GET /webchat/chat-bots` first.
|
|
581
|
+
|
|
582
|
+
**Input**
|
|
583
|
+
|
|
584
|
+
| Field | Type | Required | Description |
|
|
585
|
+
|---|---|---|---|
|
|
586
|
+
| `path.bot_id` | `string` | yes | Chat bot id (UUID). |
|
|
587
|
+
| `query.expected_revision` | `integer \| null` | no | Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. |
|
|
588
|
+
|
|
589
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
590
|
+
|
|
591
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
592
|
+
|
|
593
|
+
**Example**
|
|
594
|
+
|
|
595
|
+
```ts
|
|
596
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
597
|
+
const result = await g8.api.webChat.deleteChatBot({ path: { bot_id: "id" } });
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
602
|
+
<a id="op-deletewebchatagent"></a>
|
|
603
|
+
|
|
604
|
+
### `g8.api.webChat.deleteWebchatAgent(input)`
|
|
605
|
+
|
|
606
|
+
**Delete Webchat Agent**
|
|
607
|
+
|
|
608
|
+
- HTTP: `DELETE /api/v1/webchat/agents/{agent_id}`
|
|
609
|
+
- operationId: `delete_webchat_agent_webchat_agents__agent_id__delete` (also callable as `g8.api.call("delete_webchat_agent_webchat_agents__agent_id__delete", input)`)
|
|
610
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
611
|
+
- API-key scope: `inbox:delete`
|
|
612
|
+
|
|
613
|
+
Remove an agent mapping. The agent itself is untouched.
|
|
614
|
+
|
|
615
|
+
**Input**
|
|
616
|
+
|
|
617
|
+
| Field | Type | Required | Description |
|
|
618
|
+
|---|---|---|---|
|
|
619
|
+
| `path.agent_id` | `string` | yes | Agent row id. |
|
|
620
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
621
|
+
| `query.expected_revision` | `integer \| null` | no | Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. |
|
|
622
|
+
|
|
623
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
624
|
+
|
|
625
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
626
|
+
|
|
627
|
+
**Example**
|
|
628
|
+
|
|
629
|
+
```ts
|
|
630
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
631
|
+
const result = await g8.api.webChat.deleteWebchatAgent({ path: { agent_id: "id" }, query: { chat_bot_id: "id" } });
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
---
|
|
635
|
+
|
|
636
|
+
<a id="op-deletewebchatblog"></a>
|
|
637
|
+
|
|
638
|
+
### `g8.api.webChat.deleteWebchatBlog(input)`
|
|
639
|
+
|
|
640
|
+
**Delete Webchat Blog**
|
|
641
|
+
|
|
642
|
+
- HTTP: `DELETE /api/v1/webchat/blogs/{blog_id}`
|
|
643
|
+
- operationId: `delete_webchat_blog_webchat_blogs__blog_id__delete` (also callable as `g8.api.call("delete_webchat_blog_webchat_blogs__blog_id__delete", input)`)
|
|
644
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
645
|
+
- API-key scope: `inbox:delete`
|
|
646
|
+
|
|
647
|
+
Remove an article card.
|
|
648
|
+
|
|
649
|
+
**Input**
|
|
650
|
+
|
|
651
|
+
| Field | Type | Required | Description |
|
|
652
|
+
|---|---|---|---|
|
|
653
|
+
| `path.blog_id` | `string` | yes | Article card id. |
|
|
654
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
655
|
+
| `query.expected_revision` | `integer \| null` | no | Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. |
|
|
656
|
+
|
|
657
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
658
|
+
|
|
659
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
660
|
+
|
|
661
|
+
**Example**
|
|
662
|
+
|
|
663
|
+
```ts
|
|
664
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
665
|
+
const result = await g8.api.webChat.deleteWebchatBlog({ path: { blog_id: "id" }, query: { chat_bot_id: "id" } });
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
---
|
|
669
|
+
|
|
670
|
+
<a id="op-deletewebchatbutton"></a>
|
|
671
|
+
|
|
672
|
+
### `g8.api.webChat.deleteWebchatButton(input)`
|
|
673
|
+
|
|
674
|
+
**Delete Webchat Button**
|
|
675
|
+
|
|
676
|
+
- HTTP: `DELETE /api/v1/webchat/buttons/{button_id}`
|
|
677
|
+
- operationId: `delete_webchat_button_webchat_buttons__button_id__delete` (also callable as `g8.api.call("delete_webchat_button_webchat_buttons__button_id__delete", input)`)
|
|
678
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
679
|
+
- API-key scope: `inbox:delete`
|
|
680
|
+
|
|
681
|
+
Remove a button from the widget.
|
|
682
|
+
|
|
683
|
+
**Input**
|
|
684
|
+
|
|
685
|
+
| Field | Type | Required | Description |
|
|
686
|
+
|---|---|---|---|
|
|
687
|
+
| `path.button_id` | `string` | yes | Button id. |
|
|
688
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
689
|
+
| `query.expected_revision` | `integer \| null` | no | Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. |
|
|
690
|
+
|
|
691
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
692
|
+
|
|
693
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
694
|
+
|
|
695
|
+
**Example**
|
|
696
|
+
|
|
697
|
+
```ts
|
|
698
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
699
|
+
const result = await g8.api.webChat.deleteWebchatButton({ path: { button_id: "id" }, query: { chat_bot_id: "id" } });
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
---
|
|
703
|
+
|
|
704
|
+
<a id="op-deletewebchatquestion"></a>
|
|
705
|
+
|
|
706
|
+
### `g8.api.webChat.deleteWebchatQuestion(input)`
|
|
707
|
+
|
|
708
|
+
**Delete Webchat Question**
|
|
709
|
+
|
|
710
|
+
- HTTP: `DELETE /api/v1/webchat/questions/{question_id}`
|
|
711
|
+
- operationId: `delete_webchat_question_webchat_questions__question_id__delete` (also callable as `g8.api.call("delete_webchat_question_webchat_questions__question_id__delete", input)`)
|
|
712
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
713
|
+
- API-key scope: `inbox:delete`
|
|
714
|
+
|
|
715
|
+
Remove a preset question.
|
|
716
|
+
|
|
717
|
+
**Input**
|
|
718
|
+
|
|
719
|
+
| Field | Type | Required | Description |
|
|
720
|
+
|---|---|---|---|
|
|
721
|
+
| `path.question_id` | `string` | yes | Question id. |
|
|
722
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
723
|
+
| `query.expected_revision` | `integer \| null` | no | Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. |
|
|
724
|
+
|
|
725
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
726
|
+
|
|
727
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
728
|
+
|
|
729
|
+
**Example**
|
|
730
|
+
|
|
731
|
+
```ts
|
|
732
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
733
|
+
const result = await g8.api.webChat.deleteWebchatQuestion({ path: { question_id: "id" }, query: { chat_bot_id: "id" } });
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
---
|
|
737
|
+
|
|
738
|
+
<a id="op-deletewebchatsettings"></a>
|
|
739
|
+
|
|
740
|
+
### `g8.api.webChat.deleteWebchatSettings(input)`
|
|
741
|
+
|
|
742
|
+
**Delete Webchat Settings**
|
|
743
|
+
|
|
744
|
+
- HTTP: `DELETE /api/v1/webchat/settings`
|
|
745
|
+
- operationId: `delete_webchat_settings_webchat_settings_delete` (also callable as `g8.api.call("delete_webchat_settings_webchat_settings_delete", input)`)
|
|
746
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
747
|
+
- API-key scope: `inbox:delete`
|
|
748
|
+
|
|
749
|
+
Delete the theme for one bot and surface.
|
|
750
|
+
|
|
751
|
+
The widget falls back to the defaults, which is a VISIBLE change to every
|
|
752
|
+
visitor rather than a tidy-up.
|
|
753
|
+
|
|
754
|
+
**Input**
|
|
755
|
+
|
|
756
|
+
| Field | Type | Required | Description |
|
|
757
|
+
|---|---|---|---|
|
|
758
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
759
|
+
| `query.surface` | `"external" \| "internal" \| null` | no | Which widget: `external` (the customer-facing embed) or `internal` (graph8's own support widget). Omitted means `external`. |
|
|
760
|
+
| `query.expected_revision` | `integer \| null` | no | Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. |
|
|
761
|
+
|
|
762
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
763
|
+
|
|
764
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
765
|
+
|
|
766
|
+
**Example**
|
|
767
|
+
|
|
768
|
+
```ts
|
|
769
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
770
|
+
const result = await g8.api.webChat.deleteWebchatSettings({ query: { chat_bot_id: "id" } });
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
---
|
|
774
|
+
|
|
775
|
+
<a id="op-fetchwebchatblogmetadata"></a>
|
|
776
|
+
|
|
777
|
+
### `g8.api.webChat.fetchWebchatBlogMetadata(input)`
|
|
778
|
+
|
|
779
|
+
**Fetch Webchat Blog Metadata**
|
|
780
|
+
|
|
781
|
+
- HTTP: `POST /api/v1/webchat/blogs/fetch-metadata`
|
|
782
|
+
- operationId: `fetch_webchat_blog_metadata_webchat_blogs_fetch_metadata_post` (also callable as `g8.api.call("fetch_webchat_blog_metadata_webchat_blogs_fetch_metadata_post", input)`)
|
|
783
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
784
|
+
- API-key scope: `inbox:write`
|
|
785
|
+
|
|
786
|
+
Read a page's Open Graph metadata, to pre-fill an article card.
|
|
787
|
+
|
|
788
|
+
Fetches the URL and returns its `og:title`, `og:description` and
|
|
789
|
+
`og:image`. PERSISTS NOTHING and spends nothing - create the card with
|
|
790
|
+
`POST /webchat/blogs` afterwards.
|
|
791
|
+
|
|
792
|
+
**Input**
|
|
793
|
+
|
|
794
|
+
| Field | Type | Required | Description |
|
|
795
|
+
|---|---|---|---|
|
|
796
|
+
| `body` | `BlogMetadataRequest` | yes | Request body; fields below. |
|
|
797
|
+
|
|
798
|
+
Body fields (`BlogMetadataRequest`):
|
|
799
|
+
|
|
800
|
+
| Field | Type | Required | Description |
|
|
801
|
+
|---|---|---|---|
|
|
802
|
+
| `body.url` | `string` | yes | Page to read og:title / og:description / og:image from. min length 1, max length 1000 |
|
|
803
|
+
|
|
804
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
805
|
+
|
|
806
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
807
|
+
|
|
808
|
+
**Example**
|
|
809
|
+
|
|
810
|
+
```ts
|
|
811
|
+
const result = await g8.api.webChat.fetchWebchatBlogMetadata({ body: { url: "https://example.com" } });
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
---
|
|
815
|
+
|
|
816
|
+
<a id="op-getassessment"></a>
|
|
817
|
+
|
|
818
|
+
### `g8.api.webChat.getAssessment(input)`
|
|
819
|
+
|
|
820
|
+
**Get Assessment**
|
|
821
|
+
|
|
822
|
+
- HTTP: `GET /api/v1/webchat/assessments/{assessment_id}`
|
|
823
|
+
- operationId: `get_assessment_webchat_assessments__assessment_id__get` (also callable as `g8.api.call("get_assessment_webchat_assessments__assessment_id__get", input)`)
|
|
824
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
825
|
+
- API-key scope: `inbox:read`
|
|
826
|
+
|
|
827
|
+
One assessment, with its full question graph.
|
|
828
|
+
|
|
829
|
+
**Input**
|
|
830
|
+
|
|
831
|
+
| Field | Type | Required | Description |
|
|
832
|
+
|---|---|---|---|
|
|
833
|
+
| `path.assessment_id` | `string` | yes | Assessment id. |
|
|
834
|
+
|
|
835
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
836
|
+
|
|
837
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
838
|
+
|
|
839
|
+
**Example**
|
|
840
|
+
|
|
841
|
+
```ts
|
|
842
|
+
const result = await g8.api.webChat.getAssessment({ path: { assessment_id: "id" } });
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
---
|
|
846
|
+
|
|
847
|
+
<a id="op-getwebchathandoffpool"></a>
|
|
848
|
+
|
|
849
|
+
### `g8.api.webChat.getWebchatHandoffPool(input?)`
|
|
850
|
+
|
|
851
|
+
**Get Webchat Handoff Pool**
|
|
852
|
+
|
|
853
|
+
- HTTP: `GET /api/v1/webchat/handoff-pool`
|
|
854
|
+
- operationId: `get_webchat_handoff_pool_webchat_handoff_pool_get` (also callable as `g8.api.call("get_webchat_handoff_pool_webchat_handoff_pool_get", input)`)
|
|
855
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
856
|
+
- API-key scope: `inbox:read`
|
|
857
|
+
|
|
858
|
+
The people and teams a handed-off chat can be routed to.
|
|
859
|
+
|
|
860
|
+
Returns `users` and `teams`, each with the bots it is scoped to (an empty
|
|
861
|
+
`chat_bot_ids` means every bot). An EMPTY pool is not "nobody": it means
|
|
862
|
+
the app falls back to its default round-robin.
|
|
863
|
+
|
|
864
|
+
**Input**: none.
|
|
865
|
+
|
|
866
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
867
|
+
|
|
868
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
869
|
+
|
|
870
|
+
**Example**
|
|
871
|
+
|
|
872
|
+
```ts
|
|
873
|
+
const result = await g8.api.webChat.getWebchatHandoffPool();
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
---
|
|
877
|
+
|
|
878
|
+
<a id="op-getwebchathandoffpoolstatus"></a>
|
|
879
|
+
|
|
880
|
+
### `g8.api.webChat.getWebchatHandoffPoolStatus(input?)`
|
|
881
|
+
|
|
882
|
+
**Get Webchat Handoff Pool Status**
|
|
883
|
+
|
|
884
|
+
- HTTP: `GET /api/v1/webchat/handoff-pool-status`
|
|
885
|
+
- operationId: `get_webchat_handoff_pool_status_webchat_handoff_pool_status_get` (also callable as `g8.api.call("get_webchat_handoff_pool_status_webchat_handoff_pool_status_get", input)`)
|
|
886
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
887
|
+
- API-key scope: `inbox:read`
|
|
888
|
+
|
|
889
|
+
Whether anyone is actually in the handoff pool.
|
|
890
|
+
|
|
891
|
+
The other half of the office-hours question: a schedule can say "open"
|
|
892
|
+
while the pool is empty, and this is what tells them apart.
|
|
893
|
+
|
|
894
|
+
**Input**
|
|
895
|
+
|
|
896
|
+
| Field | Type | Required | Description |
|
|
897
|
+
|---|---|---|---|
|
|
898
|
+
| `query.chat_bot_id` | `string \| null` | no | Chat bot the widget serves; the pool is scoped per bot. |
|
|
899
|
+
|
|
900
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
901
|
+
|
|
902
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
903
|
+
|
|
904
|
+
**Example**
|
|
905
|
+
|
|
906
|
+
```ts
|
|
907
|
+
const result = await g8.api.webChat.getWebchatHandoffPoolStatus();
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
---
|
|
911
|
+
|
|
912
|
+
<a id="op-getwebchathumanavailability"></a>
|
|
913
|
+
|
|
914
|
+
### `g8.api.webChat.getWebchatHumanAvailability(input?)`
|
|
915
|
+
|
|
916
|
+
**Get Webchat Human Availability**
|
|
917
|
+
|
|
918
|
+
- HTTP: `GET /api/v1/webchat/human-availability`
|
|
919
|
+
- operationId: `get_webchat_human_availability_webchat_human_availability_get` (also callable as `g8.api.call("get_webchat_human_availability_webchat_human_availability_get", input)`)
|
|
920
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
921
|
+
- API-key scope: `inbox:read`
|
|
922
|
+
|
|
923
|
+
When a human is available to take a handed-off conversation.
|
|
924
|
+
|
|
925
|
+
Unlike the content routes, `chat_bot_id` is OPTIONAL here: omitting it
|
|
926
|
+
reads the org-wide default schedule rather than erroring.
|
|
927
|
+
|
|
928
|
+
**Input**
|
|
929
|
+
|
|
930
|
+
| Field | Type | Required | Description |
|
|
931
|
+
|---|---|---|---|
|
|
932
|
+
| `query.chat_bot_id` | `string \| null` | no | Chat bot id. OMIT for the org-wide default schedule. |
|
|
933
|
+
| `query.surface` | `"external" \| "internal" \| null` | no | Which widget: `external` (the customer-facing embed) or `internal` (graph8's own support widget). Omitted means `external`. |
|
|
934
|
+
|
|
935
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
936
|
+
|
|
937
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
938
|
+
|
|
939
|
+
**Example**
|
|
940
|
+
|
|
941
|
+
```ts
|
|
942
|
+
const result = await g8.api.webChat.getWebchatHumanAvailability();
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
---
|
|
946
|
+
|
|
947
|
+
<a id="op-getwebchatsettings"></a>
|
|
948
|
+
|
|
949
|
+
### `g8.api.webChat.getWebchatSettings(input)`
|
|
950
|
+
|
|
951
|
+
**Get Webchat Settings**
|
|
952
|
+
|
|
953
|
+
- HTTP: `GET /api/v1/webchat/settings`
|
|
954
|
+
- operationId: `get_webchat_settings_webchat_settings_get` (also callable as `g8.api.call("get_webchat_settings_webchat_settings_get", input)`)
|
|
955
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
956
|
+
- API-key scope: `inbox:read`
|
|
957
|
+
|
|
958
|
+
The widget's appearance and behaviour, for one bot and surface.
|
|
959
|
+
|
|
960
|
+
**Input**
|
|
961
|
+
|
|
962
|
+
| Field | Type | Required | Description |
|
|
963
|
+
|---|---|---|---|
|
|
964
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
965
|
+
| `query.surface` | `"external" \| "internal" \| null` | no | Which widget: `external` (the customer-facing embed) or `internal` (graph8's own support widget). Omitted means `external`. |
|
|
966
|
+
|
|
967
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
968
|
+
|
|
969
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
970
|
+
|
|
971
|
+
**Example**
|
|
972
|
+
|
|
973
|
+
```ts
|
|
974
|
+
const result = await g8.api.webChat.getWebchatSettings({ query: { chat_bot_id: "id" } });
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
---
|
|
978
|
+
|
|
979
|
+
<a id="op-getwebchatvisitorfunnel"></a>
|
|
980
|
+
|
|
981
|
+
### `g8.api.webChat.getWebchatVisitorFunnel(input?)`
|
|
982
|
+
|
|
983
|
+
**Get Webchat Visitor Funnel**
|
|
984
|
+
|
|
985
|
+
- HTTP: `GET /api/v1/webchat/visitors/funnel`
|
|
986
|
+
- operationId: `get_webchat_visitor_funnel_webchat_visitors_funnel_get` (also callable as `g8.api.call("get_webchat_visitor_funnel_webchat_visitors_funnel_get", input)`)
|
|
987
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
988
|
+
- API-key scope: `inbox:read`
|
|
989
|
+
|
|
990
|
+
Engagement funnel for the widget: per-event counts, top pages, denominators.
|
|
991
|
+
|
|
992
|
+
`abandonment_window_minutes` IS NOT YET APPLIED by the app: it is validated
|
|
993
|
+
and echoed back, but no number in the response depends on it. Do not build
|
|
994
|
+
on it expecting the figures to move. `answer_feedback` and
|
|
995
|
+
`conversation_abandoned` are declared stages the app does not yet produce,
|
|
996
|
+
so they are absent rather than zero.
|
|
997
|
+
|
|
998
|
+
**Input**
|
|
999
|
+
|
|
1000
|
+
| Field | Type | Required | Description |
|
|
1001
|
+
|---|---|---|---|
|
|
1002
|
+
| `query.bot_id` | `string \| null` | no | |
|
|
1003
|
+
| `query.page_url` | `string \| null` | no | |
|
|
1004
|
+
| `query.date_from` | `string \| null` | no | ISO date, inclusive. |
|
|
1005
|
+
| `query.date_to` | `string \| null` | no | ISO date, inclusive. |
|
|
1006
|
+
| `query.abandonment_window_minutes` | `integer` | no | Validated and echoed back; not yet applied to any figure. default `30` |
|
|
1007
|
+
|
|
1008
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1009
|
+
|
|
1010
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1011
|
+
|
|
1012
|
+
**Example**
|
|
1013
|
+
|
|
1014
|
+
```ts
|
|
1015
|
+
const result = await g8.api.webChat.getWebchatVisitorFunnel();
|
|
1016
|
+
```
|
|
1017
|
+
|
|
1018
|
+
---
|
|
1019
|
+
|
|
1020
|
+
<a id="op-listassessments"></a>
|
|
1021
|
+
|
|
1022
|
+
### `g8.api.webChat.listAssessments(input?)`
|
|
1023
|
+
|
|
1024
|
+
**List Assessments**
|
|
1025
|
+
|
|
1026
|
+
- HTTP: `GET /api/v1/webchat/assessments`
|
|
1027
|
+
- operationId: `list_assessments_webchat_assessments_get` (also callable as `g8.api.call("list_assessments_webchat_assessments_get", input)`)
|
|
1028
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1029
|
+
- API-key scope: `inbox:read`
|
|
1030
|
+
|
|
1031
|
+
Assessments in this organisation.
|
|
1032
|
+
|
|
1033
|
+
**Input**
|
|
1034
|
+
|
|
1035
|
+
| Field | Type | Required | Description |
|
|
1036
|
+
|---|---|---|---|
|
|
1037
|
+
| `query.chat_bot_id` | `string \| null` | no | Filter to one bot. OPTIONAL here, unlike the other webchat content routes - omitted returns every assessment in the org. |
|
|
1038
|
+
|
|
1039
|
+
**Returns** `ApiResponse_WebchatListPayload_`: the envelope `{ data: WebchatListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1040
|
+
|
|
1041
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1042
|
+
|
|
1043
|
+
`WebchatListPayload` fields:
|
|
1044
|
+
|
|
1045
|
+
| Field | Type | Required | Description |
|
|
1046
|
+
|---|---|---|---|
|
|
1047
|
+
| `items` | `Array<unknown>` | no | |
|
|
1048
|
+
|
|
1049
|
+
**Example**
|
|
1050
|
+
|
|
1051
|
+
```ts
|
|
1052
|
+
const result = await g8.api.webChat.listAssessments();
|
|
1053
|
+
```
|
|
1054
|
+
|
|
1055
|
+
---
|
|
1056
|
+
|
|
1057
|
+
<a id="op-listchatbots"></a>
|
|
1058
|
+
|
|
1059
|
+
### `g8.api.webChat.listChatBots(input?)`
|
|
1060
|
+
|
|
1061
|
+
**List Chat Bots**
|
|
1062
|
+
|
|
1063
|
+
- HTTP: `GET /api/v1/webchat/chat-bots`
|
|
1064
|
+
- operationId: `list_chat_bots_webchat_chat_bots_get` (also callable as `g8.api.call("list_chat_bots_webchat_chat_bots_get", input)`)
|
|
1065
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1066
|
+
- API-key scope: `inbox:read`
|
|
1067
|
+
|
|
1068
|
+
Every chat bot in this organisation.
|
|
1069
|
+
|
|
1070
|
+
START HERE. Each bot's id is the `chat_bot_id` that nearly every other
|
|
1071
|
+
call on this surface requires.
|
|
1072
|
+
|
|
1073
|
+
**Input**: none.
|
|
1074
|
+
|
|
1075
|
+
**Returns** `ApiResponse_WebchatListPayload_`: the envelope `{ data: WebchatListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1076
|
+
|
|
1077
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1078
|
+
|
|
1079
|
+
`WebchatListPayload` fields:
|
|
1080
|
+
|
|
1081
|
+
| Field | Type | Required | Description |
|
|
1082
|
+
|---|---|---|---|
|
|
1083
|
+
| `items` | `Array<unknown>` | no | |
|
|
1084
|
+
|
|
1085
|
+
**Example**
|
|
1086
|
+
|
|
1087
|
+
```ts
|
|
1088
|
+
const result = await g8.api.webChat.listChatBots();
|
|
1089
|
+
```
|
|
1090
|
+
|
|
1091
|
+
---
|
|
1092
|
+
|
|
1093
|
+
<a id="op-listwebchatagents"></a>
|
|
1094
|
+
|
|
1095
|
+
### `g8.api.webChat.listWebchatAgents(input)`
|
|
1096
|
+
|
|
1097
|
+
**List Webchat Agents**
|
|
1098
|
+
|
|
1099
|
+
- HTTP: `GET /api/v1/webchat/agents`
|
|
1100
|
+
- operationId: `list_webchat_agents_webchat_agents_get` (also callable as `g8.api.call("list_webchat_agents_webchat_agents_get", input)`)
|
|
1101
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1102
|
+
- API-key scope: `inbox:read`
|
|
1103
|
+
|
|
1104
|
+
Agent-to-URL mappings for one bot, newest first.
|
|
1105
|
+
|
|
1106
|
+
**Input**
|
|
1107
|
+
|
|
1108
|
+
| Field | Type | Required | Description |
|
|
1109
|
+
|---|---|---|---|
|
|
1110
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
1111
|
+
|
|
1112
|
+
**Returns** `ApiResponse_WebchatListPayload_`: the envelope `{ data: WebchatListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1113
|
+
|
|
1114
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1115
|
+
|
|
1116
|
+
`WebchatListPayload` fields:
|
|
1117
|
+
|
|
1118
|
+
| Field | Type | Required | Description |
|
|
1119
|
+
|---|---|---|---|
|
|
1120
|
+
| `items` | `Array<unknown>` | no | |
|
|
1121
|
+
|
|
1122
|
+
**Example**
|
|
1123
|
+
|
|
1124
|
+
```ts
|
|
1125
|
+
const result = await g8.api.webChat.listWebchatAgents({ query: { chat_bot_id: "id" } });
|
|
1126
|
+
```
|
|
1127
|
+
|
|
1128
|
+
---
|
|
1129
|
+
|
|
1130
|
+
<a id="op-listwebchatblogs"></a>
|
|
1131
|
+
|
|
1132
|
+
### `g8.api.webChat.listWebchatBlogs(input)`
|
|
1133
|
+
|
|
1134
|
+
**List Webchat Blogs**
|
|
1135
|
+
|
|
1136
|
+
- HTTP: `GET /api/v1/webchat/blogs`
|
|
1137
|
+
- operationId: `list_webchat_blogs_webchat_blogs_get` (also callable as `g8.api.call("list_webchat_blogs_webchat_blogs_get", input)`)
|
|
1138
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1139
|
+
- API-key scope: `inbox:read`
|
|
1140
|
+
|
|
1141
|
+
Article cards in the widget's rail, for one bot.
|
|
1142
|
+
|
|
1143
|
+
**Input**
|
|
1144
|
+
|
|
1145
|
+
| Field | Type | Required | Description |
|
|
1146
|
+
|---|---|---|---|
|
|
1147
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
1148
|
+
|
|
1149
|
+
**Returns** `ApiResponse_WebchatListPayload_`: the envelope `{ data: WebchatListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1150
|
+
|
|
1151
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1152
|
+
|
|
1153
|
+
`WebchatListPayload` fields:
|
|
1154
|
+
|
|
1155
|
+
| Field | Type | Required | Description |
|
|
1156
|
+
|---|---|---|---|
|
|
1157
|
+
| `items` | `Array<unknown>` | no | |
|
|
1158
|
+
|
|
1159
|
+
**Example**
|
|
1160
|
+
|
|
1161
|
+
```ts
|
|
1162
|
+
const result = await g8.api.webChat.listWebchatBlogs({ query: { chat_bot_id: "id" } });
|
|
1163
|
+
```
|
|
1164
|
+
|
|
1165
|
+
---
|
|
1166
|
+
|
|
1167
|
+
<a id="op-listwebchatbuttons"></a>
|
|
1168
|
+
|
|
1169
|
+
### `g8.api.webChat.listWebchatButtons(input)`
|
|
1170
|
+
|
|
1171
|
+
**List Webchat Buttons**
|
|
1172
|
+
|
|
1173
|
+
- HTTP: `GET /api/v1/webchat/buttons`
|
|
1174
|
+
- operationId: `list_webchat_buttons_webchat_buttons_get` (also callable as `g8.api.call("list_webchat_buttons_webchat_buttons_get", input)`)
|
|
1175
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1176
|
+
- API-key scope: `inbox:read`
|
|
1177
|
+
|
|
1178
|
+
Quick-action buttons for one bot.
|
|
1179
|
+
|
|
1180
|
+
**Input**
|
|
1181
|
+
|
|
1182
|
+
| Field | Type | Required | Description |
|
|
1183
|
+
|---|---|---|---|
|
|
1184
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
1185
|
+
|
|
1186
|
+
**Returns** `ApiResponse_WebchatListPayload_`: the envelope `{ data: WebchatListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1187
|
+
|
|
1188
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1189
|
+
|
|
1190
|
+
`WebchatListPayload` fields:
|
|
1191
|
+
|
|
1192
|
+
| Field | Type | Required | Description |
|
|
1193
|
+
|---|---|---|---|
|
|
1194
|
+
| `items` | `Array<unknown>` | no | |
|
|
1195
|
+
|
|
1196
|
+
**Example**
|
|
1197
|
+
|
|
1198
|
+
```ts
|
|
1199
|
+
const result = await g8.api.webChat.listWebchatButtons({ query: { chat_bot_id: "id" } });
|
|
1200
|
+
```
|
|
1201
|
+
|
|
1202
|
+
---
|
|
1203
|
+
|
|
1204
|
+
<a id="op-listwebchatquestions"></a>
|
|
1205
|
+
|
|
1206
|
+
### `g8.api.webChat.listWebchatQuestions(input)`
|
|
1207
|
+
|
|
1208
|
+
**List Webchat Questions**
|
|
1209
|
+
|
|
1210
|
+
- HTTP: `GET /api/v1/webchat/questions`
|
|
1211
|
+
- operationId: `list_webchat_questions_webchat_questions_get` (also callable as `g8.api.call("list_webchat_questions_webchat_questions_get", input)`)
|
|
1212
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1213
|
+
- API-key scope: `inbox:read`
|
|
1214
|
+
|
|
1215
|
+
Preset questions for one bot.
|
|
1216
|
+
|
|
1217
|
+
**Input**
|
|
1218
|
+
|
|
1219
|
+
| Field | Type | Required | Description |
|
|
1220
|
+
|---|---|---|---|
|
|
1221
|
+
| `query.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). REQUIRED: an org can run several bots and this content belongs to one of them, so it identifies the rows rather than filtering them. |
|
|
1222
|
+
|
|
1223
|
+
**Returns** `ApiResponse_WebchatListPayload_`: the envelope `{ data: WebchatListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1224
|
+
|
|
1225
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1226
|
+
|
|
1227
|
+
`WebchatListPayload` fields:
|
|
1228
|
+
|
|
1229
|
+
| Field | Type | Required | Description |
|
|
1230
|
+
|---|---|---|---|
|
|
1231
|
+
| `items` | `Array<unknown>` | no | |
|
|
1232
|
+
|
|
1233
|
+
**Example**
|
|
1234
|
+
|
|
1235
|
+
```ts
|
|
1236
|
+
const result = await g8.api.webChat.listWebchatQuestions({ query: { chat_bot_id: "id" } });
|
|
1237
|
+
```
|
|
1238
|
+
|
|
1239
|
+
---
|
|
1240
|
+
|
|
1241
|
+
<a id="op-listwebchatteameventtypes"></a>
|
|
1242
|
+
|
|
1243
|
+
### `g8.api.webChat.listWebchatTeamEventTypes(input)`
|
|
1244
|
+
|
|
1245
|
+
**List Webchat Team Event Types**
|
|
1246
|
+
|
|
1247
|
+
- HTTP: `GET /api/v1/webchat/teams/{team_id}/event-types`
|
|
1248
|
+
- operationId: `list_webchat_team_event_types_webchat_teams__team_id__event_types_get` (also callable as `g8.api.call("list_webchat_team_event_types_webchat_teams__team_id__event_types_get", input)`)
|
|
1249
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1250
|
+
- API-key scope: `inbox:read`
|
|
1251
|
+
|
|
1252
|
+
Bookable event types for one team.
|
|
1253
|
+
|
|
1254
|
+
These are the slugs a `calendar` button's `value` refers to.
|
|
1255
|
+
|
|
1256
|
+
**Input**
|
|
1257
|
+
|
|
1258
|
+
| Field | Type | Required | Description |
|
|
1259
|
+
|---|---|---|---|
|
|
1260
|
+
| `path.team_id` | `string` | yes | Scheduling team id. |
|
|
1261
|
+
|
|
1262
|
+
**Returns** `ApiResponse_WebchatListPayload_`: the envelope `{ data: WebchatListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1263
|
+
|
|
1264
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1265
|
+
|
|
1266
|
+
`WebchatListPayload` fields:
|
|
1267
|
+
|
|
1268
|
+
| Field | Type | Required | Description |
|
|
1269
|
+
|---|---|---|---|
|
|
1270
|
+
| `items` | `Array<unknown>` | no | |
|
|
1271
|
+
|
|
1272
|
+
**Example**
|
|
1273
|
+
|
|
1274
|
+
```ts
|
|
1275
|
+
const result = await g8.api.webChat.listWebchatTeamEventTypes({ path: { team_id: "id" } });
|
|
1276
|
+
```
|
|
1277
|
+
|
|
1278
|
+
---
|
|
1279
|
+
|
|
1280
|
+
<a id="op-listwebchatteams"></a>
|
|
1281
|
+
|
|
1282
|
+
### `g8.api.webChat.listWebchatTeams(input?)`
|
|
1283
|
+
|
|
1284
|
+
**List Webchat Teams**
|
|
1285
|
+
|
|
1286
|
+
- HTTP: `GET /api/v1/webchat/teams`
|
|
1287
|
+
- operationId: `list_webchat_teams_webchat_teams_get` (also callable as `g8.api.call("list_webchat_teams_webchat_teams_get", input)`)
|
|
1288
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1289
|
+
- API-key scope: `inbox:read`
|
|
1290
|
+
|
|
1291
|
+
Scheduling teams the widget can book into.
|
|
1292
|
+
|
|
1293
|
+
NOTE: the app's own gate docstring lists `GET /teams` among the public
|
|
1294
|
+
widget-runtime routes, but the route itself carries the `webchat:read`
|
|
1295
|
+
gate and a `get_current_user` dependency, and has done since it was
|
|
1296
|
+
written. The CODE is authoritative and is what this mirrors; the comment is
|
|
1297
|
+
stale. Flagged in the PR body rather than changed here.
|
|
1298
|
+
|
|
1299
|
+
**Input**: none.
|
|
1300
|
+
|
|
1301
|
+
**Returns** `ApiResponse_WebchatListPayload_`: the envelope `{ data: WebchatListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1302
|
+
|
|
1303
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1304
|
+
|
|
1305
|
+
`WebchatListPayload` fields:
|
|
1306
|
+
|
|
1307
|
+
| Field | Type | Required | Description |
|
|
1308
|
+
|---|---|---|---|
|
|
1309
|
+
| `items` | `Array<unknown>` | no | |
|
|
1310
|
+
|
|
1311
|
+
**Example**
|
|
1312
|
+
|
|
1313
|
+
```ts
|
|
1314
|
+
const result = await g8.api.webChat.listWebchatTeams();
|
|
1315
|
+
```
|
|
1316
|
+
|
|
1317
|
+
---
|
|
1318
|
+
|
|
1319
|
+
<a id="op-listwebchatvisitors"></a>
|
|
1320
|
+
|
|
1321
|
+
### `g8.api.webChat.listWebchatVisitors(input?)`
|
|
1322
|
+
|
|
1323
|
+
**List Webchat Visitors**
|
|
1324
|
+
|
|
1325
|
+
- HTTP: `GET /api/v1/webchat/visitors`
|
|
1326
|
+
- operationId: `list_webchat_visitors_webchat_visitors_get` (also callable as `g8.api.call("list_webchat_visitors_webchat_visitors_get", input)`)
|
|
1327
|
+
- Tier: `read`: reads data; safe to call and to retry
|
|
1328
|
+
- API-key scope: `inbox:read`
|
|
1329
|
+
|
|
1330
|
+
People who used the widget, identified where possible.
|
|
1331
|
+
|
|
1332
|
+
**Input**
|
|
1333
|
+
|
|
1334
|
+
| Field | Type | Required | Description |
|
|
1335
|
+
|---|---|---|---|
|
|
1336
|
+
| `query.page` | `integer` | no | default `1` |
|
|
1337
|
+
| `query.page_size` | `integer` | no | default `50` |
|
|
1338
|
+
| `query.identified_only` | `boolean` | no | Only visitors the widget managed to identify. default `false` |
|
|
1339
|
+
| `query.search` | `string \| null` | no | |
|
|
1340
|
+
|
|
1341
|
+
**Returns** `ApiResponse_WebchatListPayload_`: the envelope `{ data: WebchatListPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1342
|
+
|
|
1343
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1344
|
+
|
|
1345
|
+
`WebchatListPayload` fields:
|
|
1346
|
+
|
|
1347
|
+
| Field | Type | Required | Description |
|
|
1348
|
+
|---|---|---|---|
|
|
1349
|
+
| `items` | `Array<unknown>` | no | |
|
|
1350
|
+
|
|
1351
|
+
**Example**
|
|
1352
|
+
|
|
1353
|
+
```ts
|
|
1354
|
+
const result = await g8.api.webChat.listWebchatVisitors();
|
|
1355
|
+
```
|
|
1356
|
+
|
|
1357
|
+
---
|
|
1358
|
+
|
|
1359
|
+
<a id="op-promotechatbottodefault"></a>
|
|
1360
|
+
|
|
1361
|
+
### `g8.api.webChat.promoteChatBotToDefault(input)`
|
|
1362
|
+
|
|
1363
|
+
**Promote Chat Bot To Default**
|
|
1364
|
+
|
|
1365
|
+
- HTTP: `POST /api/v1/webchat/chat-bots/{bot_id}/promote-default`
|
|
1366
|
+
- operationId: `promote_chat_bot_to_default_webchat_chat_bots__bot_id__promote_default_post` (also callable as `g8.api.call("promote_chat_bot_to_default_webchat_chat_bots__bot_id__promote_default_post", input)`)
|
|
1367
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1368
|
+
- API-key scope: `inbox:write`
|
|
1369
|
+
|
|
1370
|
+
Make this the org's DEFAULT bot.
|
|
1371
|
+
|
|
1372
|
+
The default is what a legacy embed snippet with no bot id resolves to, so
|
|
1373
|
+
promoting one CHANGES WHAT LIVE VISITORS SEE on every such page - not just
|
|
1374
|
+
what the admin shows.
|
|
1375
|
+
|
|
1376
|
+
**Input**
|
|
1377
|
+
|
|
1378
|
+
| Field | Type | Required | Description |
|
|
1379
|
+
|---|---|---|---|
|
|
1380
|
+
| `path.bot_id` | `string` | yes | Chat bot id (UUID). |
|
|
1381
|
+
| `query.expected_revision` | `integer \| null` | no | Revision you last read. When given, a concurrent edit is a 409 instead of a silent overwrite. |
|
|
1382
|
+
|
|
1383
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1384
|
+
|
|
1385
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1386
|
+
|
|
1387
|
+
**Example**
|
|
1388
|
+
|
|
1389
|
+
```ts
|
|
1390
|
+
const result = await g8.api.webChat.promoteChatBotToDefault({ path: { bot_id: "id" } });
|
|
1391
|
+
```
|
|
1392
|
+
|
|
1393
|
+
---
|
|
1394
|
+
|
|
1395
|
+
<a id="op-putwebchathumanavailability"></a>
|
|
1396
|
+
|
|
1397
|
+
### `g8.api.webChat.putWebchatHumanAvailability(input)`
|
|
1398
|
+
|
|
1399
|
+
**Put Webchat Human Availability**
|
|
1400
|
+
|
|
1401
|
+
- HTTP: `PUT /api/v1/webchat/human-availability`
|
|
1402
|
+
- operationId: `put_webchat_human_availability_webchat_human_availability_put` (also callable as `g8.api.call("put_webchat_human_availability_webchat_human_availability_put", input)`)
|
|
1403
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1404
|
+
- API-key scope: `inbox:write`
|
|
1405
|
+
|
|
1406
|
+
Set the office hours that decide whether a visitor is offered a person.
|
|
1407
|
+
|
|
1408
|
+
`enabled: true` with no reachable interval is worse than off: the widget
|
|
1409
|
+
offers a handover nobody answers. The app refuses the unreachable shapes
|
|
1410
|
+
and this forwards its answer rather than inventing a second opinion.
|
|
1411
|
+
|
|
1412
|
+
Overlapping and zero-length windows are refused at THIS boundary, because
|
|
1413
|
+
the request model is the app's own.
|
|
1414
|
+
|
|
1415
|
+
**Input**
|
|
1416
|
+
|
|
1417
|
+
| Field | Type | Required | Description |
|
|
1418
|
+
|---|---|---|---|
|
|
1419
|
+
| `body` | `HumanAvailabilityRequest` | yes | Request body; fields below. |
|
|
1420
|
+
|
|
1421
|
+
Body fields (`HumanAvailabilityRequest`):
|
|
1422
|
+
|
|
1423
|
+
| Field | Type | Required | Description |
|
|
1424
|
+
|---|---|---|---|
|
|
1425
|
+
| `body.chat_bot_id` | `string \| null` | no | Bot this schedule applies to. NULL is the org default. |
|
|
1426
|
+
| `body.enabled` | `boolean` | no | default `false` |
|
|
1427
|
+
| `body.intervals` | `Array<AvailabilityInterval>` | no | Weekly windows: `{day: 0-6, start: 'HH:MM', end: 'HH:MM'}`. |
|
|
1428
|
+
| `body.overrides` | `Array<AvailabilityOverride>` | no | Date overrides: `{date: 'YYYY-MM-DD', intervals: [...]}`. |
|
|
1429
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
1430
|
+
| `body.timezone` | `string` | no | IANA zone the intervals are expressed in. default `"UTC"`, min length 1, max length 64 |
|
|
1431
|
+
|
|
1432
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1433
|
+
|
|
1434
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1435
|
+
|
|
1436
|
+
**Example**
|
|
1437
|
+
|
|
1438
|
+
```ts
|
|
1439
|
+
const result = await g8.api.webChat.putWebchatHumanAvailability({ body: {} });
|
|
1440
|
+
```
|
|
1441
|
+
|
|
1442
|
+
---
|
|
1443
|
+
|
|
1444
|
+
<a id="op-removewebchathandoffpoolteam"></a>
|
|
1445
|
+
|
|
1446
|
+
### `g8.api.webChat.removeWebchatHandoffPoolTeam(input)`
|
|
1447
|
+
|
|
1448
|
+
**Remove Webchat Handoff Pool Team**
|
|
1449
|
+
|
|
1450
|
+
- HTTP: `DELETE /api/v1/webchat/handoff-pool/teams/{team_id}`
|
|
1451
|
+
- operationId: `remove_webchat_handoff_pool_team_webchat_handoff_pool_teams__team_id__delete` (also callable as `g8.api.call("remove_webchat_handoff_pool_team_webchat_handoff_pool_teams__team_id__delete", input)`)
|
|
1452
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
1453
|
+
- API-key scope: `inbox:delete`
|
|
1454
|
+
|
|
1455
|
+
Take a team out of the handoff pool. 404 if it is not in it.
|
|
1456
|
+
|
|
1457
|
+
**Input**
|
|
1458
|
+
|
|
1459
|
+
| Field | Type | Required | Description |
|
|
1460
|
+
|---|---|---|---|
|
|
1461
|
+
| `path.team_id` | `string (uuid)` | yes | Team id (UUID). |
|
|
1462
|
+
| `query.pool` | `"external" \| "internal" \| null` | no | Only the row in this pool. Omitted removes the person or team from every pool. `internal` is graph8's own support widget. |
|
|
1463
|
+
| `query.chat_bot_id` | `string (uuid) \| null` | no | Only the row scoped to this chat bot. Omitted removes it across every bot. |
|
|
1464
|
+
|
|
1465
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1466
|
+
|
|
1467
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1468
|
+
|
|
1469
|
+
**Example**
|
|
1470
|
+
|
|
1471
|
+
```ts
|
|
1472
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
1473
|
+
const result = await g8.api.webChat.removeWebchatHandoffPoolTeam({ path: { team_id: "00000000-0000-0000-0000-000000000000" } });
|
|
1474
|
+
```
|
|
1475
|
+
|
|
1476
|
+
---
|
|
1477
|
+
|
|
1478
|
+
<a id="op-removewebchathandoffpooluser"></a>
|
|
1479
|
+
|
|
1480
|
+
### `g8.api.webChat.removeWebchatHandoffPoolUser(input)`
|
|
1481
|
+
|
|
1482
|
+
**Remove Webchat Handoff Pool User**
|
|
1483
|
+
|
|
1484
|
+
- HTTP: `DELETE /api/v1/webchat/handoff-pool/users/{user_id}`
|
|
1485
|
+
- operationId: `remove_webchat_handoff_pool_user_webchat_handoff_pool_users__user_id__delete` (also callable as `g8.api.call("remove_webchat_handoff_pool_user_webchat_handoff_pool_users__user_id__delete", input)`)
|
|
1486
|
+
- Tier: `destructive`: deletes or archives data; confirm with a human before calling
|
|
1487
|
+
- API-key scope: `inbox:delete`
|
|
1488
|
+
|
|
1489
|
+
Take a person out of the handoff pool. 404 if they are not in it.
|
|
1490
|
+
|
|
1491
|
+
**Input**
|
|
1492
|
+
|
|
1493
|
+
| Field | Type | Required | Description |
|
|
1494
|
+
|---|---|---|---|
|
|
1495
|
+
| `path.user_id` | `string` | yes | Member user id. |
|
|
1496
|
+
| `query.pool` | `"external" \| "internal" \| null` | no | Only the row in this pool. Omitted removes the person or team from every pool. `internal` is graph8's own support widget. |
|
|
1497
|
+
| `query.chat_bot_id` | `string (uuid) \| null` | no | Only the row scoped to this chat bot. Omitted removes it across every bot. |
|
|
1498
|
+
|
|
1499
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1500
|
+
|
|
1501
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1502
|
+
|
|
1503
|
+
**Example**
|
|
1504
|
+
|
|
1505
|
+
```ts
|
|
1506
|
+
// destructive: deletes or archives data; confirm with a human before calling.
|
|
1507
|
+
const result = await g8.api.webChat.removeWebchatHandoffPoolUser({ path: { user_id: "id" } });
|
|
1508
|
+
```
|
|
1509
|
+
|
|
1510
|
+
---
|
|
1511
|
+
|
|
1512
|
+
<a id="op-updateassessment"></a>
|
|
1513
|
+
|
|
1514
|
+
### `g8.api.webChat.updateAssessment(input)`
|
|
1515
|
+
|
|
1516
|
+
**Update Assessment**
|
|
1517
|
+
|
|
1518
|
+
- HTTP: `PATCH /api/v1/webchat/assessments/{assessment_id}`
|
|
1519
|
+
- operationId: `update_assessment_webchat_assessments__assessment_id__patch` (also callable as `g8.api.call("update_assessment_webchat_assessments__assessment_id__patch", input)`)
|
|
1520
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1521
|
+
- API-key scope: `inbox:write`
|
|
1522
|
+
|
|
1523
|
+
Partial edit of an assessment.
|
|
1524
|
+
|
|
1525
|
+
`active: false` takes it out of the widget without deleting it, which is
|
|
1526
|
+
the reversible way to retire one.
|
|
1527
|
+
|
|
1528
|
+
The concurrency field is `revision` here, not `expected_revision`. That is
|
|
1529
|
+
the app's spelling on this model alone and is mirrored deliberately - a
|
|
1530
|
+
tidier name would be a field the handler does not read, silently switching
|
|
1531
|
+
the check off.
|
|
1532
|
+
|
|
1533
|
+
**Input**
|
|
1534
|
+
|
|
1535
|
+
| Field | Type | Required | Description |
|
|
1536
|
+
|---|---|---|---|
|
|
1537
|
+
| `path.assessment_id` | `string` | yes | Assessment id. |
|
|
1538
|
+
| `body` | `AssessmentUpdateRequest` | yes | Request body; fields below. |
|
|
1539
|
+
|
|
1540
|
+
Body fields (`AssessmentUpdateRequest`):
|
|
1541
|
+
|
|
1542
|
+
| Field | Type | Required | Description |
|
|
1543
|
+
|---|---|---|---|
|
|
1544
|
+
| `body.active` | `boolean \| null` | no | |
|
|
1545
|
+
| `body.definition` | `AssessmentDefinition \| null` | no | |
|
|
1546
|
+
| `body.description` | `string \| null` | no | max length 2000 |
|
|
1547
|
+
| `body.name` | `string \| null` | no | min length 1, max length 200 |
|
|
1548
|
+
| `body.revision` | `integer \| null` | no | Revision you last read. See the note above on the name. |
|
|
1549
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
1550
|
+
|
|
1551
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1552
|
+
|
|
1553
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1554
|
+
|
|
1555
|
+
**Example**
|
|
1556
|
+
|
|
1557
|
+
```ts
|
|
1558
|
+
const result = await g8.api.webChat.updateAssessment({ path: { assessment_id: "id" }, body: {} });
|
|
1559
|
+
```
|
|
1560
|
+
|
|
1561
|
+
---
|
|
1562
|
+
|
|
1563
|
+
<a id="op-updatechatbot"></a>
|
|
1564
|
+
|
|
1565
|
+
### `g8.api.webChat.updateChatBot(input)`
|
|
1566
|
+
|
|
1567
|
+
**Update Chat Bot**
|
|
1568
|
+
|
|
1569
|
+
- HTTP: `PATCH /api/v1/webchat/chat-bots/{bot_id}`
|
|
1570
|
+
- operationId: `update_chat_bot_webchat_chat_bots__bot_id__patch` (also callable as `g8.api.call("update_chat_bot_webchat_chat_bots__bot_id__patch", input)`)
|
|
1571
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1572
|
+
- API-key scope: `inbox:write`
|
|
1573
|
+
|
|
1574
|
+
Rename a chat bot. `name` is required - it is the only mutable field.
|
|
1575
|
+
|
|
1576
|
+
**Input**
|
|
1577
|
+
|
|
1578
|
+
| Field | Type | Required | Description |
|
|
1579
|
+
|---|---|---|---|
|
|
1580
|
+
| `path.bot_id` | `string` | yes | Chat bot id (UUID). |
|
|
1581
|
+
| `body` | `ChatBotUpdateRequest` | yes | Request body; fields below. |
|
|
1582
|
+
|
|
1583
|
+
Body fields (`ChatBotUpdateRequest`):
|
|
1584
|
+
|
|
1585
|
+
| Field | Type | Required | Description |
|
|
1586
|
+
|---|---|---|---|
|
|
1587
|
+
| `body.name` | `string` | yes | min length 1, max length 120 |
|
|
1588
|
+
| `body.expected_revision` | `integer \| null` | no | Revision you last read. Omit to overwrite unconditionally. min 1 |
|
|
1589
|
+
|
|
1590
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1591
|
+
|
|
1592
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1593
|
+
|
|
1594
|
+
**Example**
|
|
1595
|
+
|
|
1596
|
+
```ts
|
|
1597
|
+
const result = await g8.api.webChat.updateChatBot({ path: { bot_id: "id" }, body: { name: "Example" } });
|
|
1598
|
+
```
|
|
1599
|
+
|
|
1600
|
+
---
|
|
1601
|
+
|
|
1602
|
+
<a id="op-updatewebchatagent"></a>
|
|
1603
|
+
|
|
1604
|
+
### `g8.api.webChat.updateWebchatAgent(input)`
|
|
1605
|
+
|
|
1606
|
+
**Update Webchat Agent**
|
|
1607
|
+
|
|
1608
|
+
- HTTP: `PATCH /api/v1/webchat/agents/{agent_id}`
|
|
1609
|
+
- operationId: `update_webchat_agent_webchat_agents__agent_id__patch` (also callable as `g8.api.call("update_webchat_agent_webchat_agents__agent_id__patch", input)`)
|
|
1610
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1611
|
+
- API-key scope: `inbox:write`
|
|
1612
|
+
|
|
1613
|
+
Partial edit of an agent mapping.
|
|
1614
|
+
|
|
1615
|
+
`chat_bot_id` is required in the body and is not a field being changed - it
|
|
1616
|
+
is how the row is FOUND, because agent ids are unique per bot.
|
|
1617
|
+
|
|
1618
|
+
**Input**
|
|
1619
|
+
|
|
1620
|
+
| Field | Type | Required | Description |
|
|
1621
|
+
|---|---|---|---|
|
|
1622
|
+
| `path.agent_id` | `string` | yes | Agent row id. |
|
|
1623
|
+
| `body` | `AgentUpdateRequest` | yes | Request body; fields below. |
|
|
1624
|
+
|
|
1625
|
+
Body fields (`AgentUpdateRequest`):
|
|
1626
|
+
|
|
1627
|
+
| Field | Type | Required | Description |
|
|
1628
|
+
|---|---|---|---|
|
|
1629
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
1630
|
+
| `body.active` | `boolean \| null` | no | |
|
|
1631
|
+
| `body.agent_id` | `string \| null` | no | max length 255 |
|
|
1632
|
+
| `body.agent_name` | `string \| null` | no | min length 1, max length 255 |
|
|
1633
|
+
| `body.default` | `boolean \| null` | no | |
|
|
1634
|
+
| `body.expected_revision` | `integer \| null` | no | min 1 |
|
|
1635
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
1636
|
+
| `body.url_filter` | `Array<string> \| null` | no | |
|
|
1637
|
+
|
|
1638
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1639
|
+
|
|
1640
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1641
|
+
|
|
1642
|
+
**Example**
|
|
1643
|
+
|
|
1644
|
+
```ts
|
|
1645
|
+
const result = await g8.api.webChat.updateWebchatAgent({ path: { agent_id: "id" }, body: { chat_bot_id: "id" } });
|
|
1646
|
+
```
|
|
1647
|
+
|
|
1648
|
+
---
|
|
1649
|
+
|
|
1650
|
+
<a id="op-updatewebchatblog"></a>
|
|
1651
|
+
|
|
1652
|
+
### `g8.api.webChat.updateWebchatBlog(input)`
|
|
1653
|
+
|
|
1654
|
+
**Update Webchat Blog**
|
|
1655
|
+
|
|
1656
|
+
- HTTP: `PATCH /api/v1/webchat/blogs/{blog_id}`
|
|
1657
|
+
- operationId: `update_webchat_blog_webchat_blogs__blog_id__patch` (also callable as `g8.api.call("update_webchat_blog_webchat_blogs__blog_id__patch", input)`)
|
|
1658
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1659
|
+
- API-key scope: `inbox:write`
|
|
1660
|
+
|
|
1661
|
+
Partial edit of an article card. `chat_bot_id` locates the row.
|
|
1662
|
+
|
|
1663
|
+
**Input**
|
|
1664
|
+
|
|
1665
|
+
| Field | Type | Required | Description |
|
|
1666
|
+
|---|---|---|---|
|
|
1667
|
+
| `path.blog_id` | `string` | yes | Article card id. |
|
|
1668
|
+
| `body` | `BlogUpdateRequest` | yes | Request body; fields below. |
|
|
1669
|
+
|
|
1670
|
+
Body fields (`BlogUpdateRequest`):
|
|
1671
|
+
|
|
1672
|
+
| Field | Type | Required | Description |
|
|
1673
|
+
|---|---|---|---|
|
|
1674
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
1675
|
+
| `body.active` | `boolean \| null` | no | |
|
|
1676
|
+
| `body.description` | `string \| null` | no | |
|
|
1677
|
+
| `body.display_order` | `integer \| null` | no | min 0, max 9999 |
|
|
1678
|
+
| `body.expected_revision` | `integer \| null` | no | min 1 |
|
|
1679
|
+
| `body.image_url` | `string \| null` | no | max length 1000 |
|
|
1680
|
+
| `body.paths` | `Array<string> \| null` | no | |
|
|
1681
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
1682
|
+
| `body.title` | `string \| null` | no | min length 1, max length 500 |
|
|
1683
|
+
| `body.url` | `string \| null` | no | min length 1, max length 1000 |
|
|
1684
|
+
|
|
1685
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1686
|
+
|
|
1687
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1688
|
+
|
|
1689
|
+
**Example**
|
|
1690
|
+
|
|
1691
|
+
```ts
|
|
1692
|
+
const result = await g8.api.webChat.updateWebchatBlog({ path: { blog_id: "id" }, body: { chat_bot_id: "id" } });
|
|
1693
|
+
```
|
|
1694
|
+
|
|
1695
|
+
---
|
|
1696
|
+
|
|
1697
|
+
<a id="op-updatewebchatbutton"></a>
|
|
1698
|
+
|
|
1699
|
+
### `g8.api.webChat.updateWebchatButton(input)`
|
|
1700
|
+
|
|
1701
|
+
**Update Webchat Button**
|
|
1702
|
+
|
|
1703
|
+
- HTTP: `PATCH /api/v1/webchat/buttons/{button_id}`
|
|
1704
|
+
- operationId: `update_webchat_button_webchat_buttons__button_id__patch` (also callable as `g8.api.call("update_webchat_button_webchat_buttons__button_id__patch", input)`)
|
|
1705
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1706
|
+
- API-key scope: `inbox:write`
|
|
1707
|
+
|
|
1708
|
+
Partial edit of a button. `chat_bot_id` locates the row.
|
|
1709
|
+
|
|
1710
|
+
**Input**
|
|
1711
|
+
|
|
1712
|
+
| Field | Type | Required | Description |
|
|
1713
|
+
|---|---|---|---|
|
|
1714
|
+
| `path.button_id` | `string` | yes | Button id. |
|
|
1715
|
+
| `body` | `ButtonUpdateRequest` | yes | Request body; fields below. |
|
|
1716
|
+
|
|
1717
|
+
Body fields (`ButtonUpdateRequest`):
|
|
1718
|
+
|
|
1719
|
+
| Field | Type | Required | Description |
|
|
1720
|
+
|---|---|---|---|
|
|
1721
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
1722
|
+
| `body.action` | `"link" \| "question" \| "calendar" \| null` | no | |
|
|
1723
|
+
| `body.active` | `boolean \| null` | no | |
|
|
1724
|
+
| `body.category` | `string \| null` | no | min length 1, max length 100 |
|
|
1725
|
+
| `body.expected_revision` | `integer \| null` | no | min 1 |
|
|
1726
|
+
| `body.icon` | `string \| null` | no | max length 100 |
|
|
1727
|
+
| `body.label` | `string \| null` | no | min length 1, max length 255 |
|
|
1728
|
+
| `body.paths` | `Array<string> \| null` | no | |
|
|
1729
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
1730
|
+
| `body.value` | `string \| null` | no | min length 1, max length 1000 |
|
|
1731
|
+
|
|
1732
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1733
|
+
|
|
1734
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1735
|
+
|
|
1736
|
+
**Example**
|
|
1737
|
+
|
|
1738
|
+
```ts
|
|
1739
|
+
const result = await g8.api.webChat.updateWebchatButton({ path: { button_id: "id" }, body: { chat_bot_id: "id" } });
|
|
1740
|
+
```
|
|
1741
|
+
|
|
1742
|
+
---
|
|
1743
|
+
|
|
1744
|
+
<a id="op-updatewebchathandoffpoolteamscope"></a>
|
|
1745
|
+
|
|
1746
|
+
### `g8.api.webChat.updateWebchatHandoffPoolTeamScope(input)`
|
|
1747
|
+
|
|
1748
|
+
**Update Webchat Handoff Pool Team Scope**
|
|
1749
|
+
|
|
1750
|
+
- HTTP: `PATCH /api/v1/webchat/handoff-pool/teams/{team_id}/scope`
|
|
1751
|
+
- operationId: `update_webchat_handoff_pool_team_scope_webchat_handoff_pool_teams__team_id__scope_patch` (also callable as `g8.api.call("update_webchat_handoff_pool_team_scope_webchat_handoff_pool_teams__team_id__scope_patch", input)`)
|
|
1752
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1753
|
+
- API-key scope: `inbox:write`
|
|
1754
|
+
|
|
1755
|
+
REPLACE which bots a team takes handoffs for. Empty list = every bot.
|
|
1756
|
+
|
|
1757
|
+
**Input**
|
|
1758
|
+
|
|
1759
|
+
| Field | Type | Required | Description |
|
|
1760
|
+
|---|---|---|---|
|
|
1761
|
+
| `path.team_id` | `string (uuid)` | yes | Team id (UUID). |
|
|
1762
|
+
| `body` | `HandoffPoolScopeRequest` | yes | Request body; fields below. |
|
|
1763
|
+
| `query.pool` | `"external" \| "internal"` | no | Pool to re-scope. Only `external` is accepted by the app: the internal pool is not per-bot. default `"external"` |
|
|
1764
|
+
|
|
1765
|
+
Body fields (`HandoffPoolScopeRequest`):
|
|
1766
|
+
|
|
1767
|
+
| Field | Type | Required | Description |
|
|
1768
|
+
|---|---|---|---|
|
|
1769
|
+
| `body.chat_bot_ids` | `Array<string (uuid)>` | no | max items 200 |
|
|
1770
|
+
|
|
1771
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1772
|
+
|
|
1773
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1774
|
+
|
|
1775
|
+
**Example**
|
|
1776
|
+
|
|
1777
|
+
```ts
|
|
1778
|
+
const result = await g8.api.webChat.updateWebchatHandoffPoolTeamScope({
|
|
1779
|
+
path: { team_id: "00000000-0000-0000-0000-000000000000" },
|
|
1780
|
+
body: {},
|
|
1781
|
+
});
|
|
1782
|
+
```
|
|
1783
|
+
|
|
1784
|
+
---
|
|
1785
|
+
|
|
1786
|
+
<a id="op-updatewebchathandoffpooluserscope"></a>
|
|
1787
|
+
|
|
1788
|
+
### `g8.api.webChat.updateWebchatHandoffPoolUserScope(input)`
|
|
1789
|
+
|
|
1790
|
+
**Update Webchat Handoff Pool User Scope**
|
|
1791
|
+
|
|
1792
|
+
- HTTP: `PATCH /api/v1/webchat/handoff-pool/users/{user_id}/scope`
|
|
1793
|
+
- operationId: `update_webchat_handoff_pool_user_scope_webchat_handoff_pool_users__user_id__scope_patch` (also callable as `g8.api.call("update_webchat_handoff_pool_user_scope_webchat_handoff_pool_users__user_id__scope_patch", input)`)
|
|
1794
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1795
|
+
- API-key scope: `inbox:write`
|
|
1796
|
+
|
|
1797
|
+
REPLACE which bots a person takes handoffs for. Empty list = every bot.
|
|
1798
|
+
|
|
1799
|
+
A replace, not a merge: bots left out of the list are dropped.
|
|
1800
|
+
|
|
1801
|
+
**Input**
|
|
1802
|
+
|
|
1803
|
+
| Field | Type | Required | Description |
|
|
1804
|
+
|---|---|---|---|
|
|
1805
|
+
| `path.user_id` | `string` | yes | Member user id. |
|
|
1806
|
+
| `body` | `HandoffPoolScopeRequest` | yes | Request body; fields below. |
|
|
1807
|
+
| `query.pool` | `"external" \| "internal"` | no | Pool to re-scope. Only `external` is accepted by the app: the internal pool is not per-bot. default `"external"` |
|
|
1808
|
+
|
|
1809
|
+
Body fields (`HandoffPoolScopeRequest`):
|
|
1810
|
+
|
|
1811
|
+
| Field | Type | Required | Description |
|
|
1812
|
+
|---|---|---|---|
|
|
1813
|
+
| `body.chat_bot_ids` | `Array<string (uuid)>` | no | max items 200 |
|
|
1814
|
+
|
|
1815
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1816
|
+
|
|
1817
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1818
|
+
|
|
1819
|
+
**Example**
|
|
1820
|
+
|
|
1821
|
+
```ts
|
|
1822
|
+
const result = await g8.api.webChat.updateWebchatHandoffPoolUserScope({ path: { user_id: "id" }, body: {} });
|
|
1823
|
+
```
|
|
1824
|
+
|
|
1825
|
+
---
|
|
1826
|
+
|
|
1827
|
+
<a id="op-updatewebchatquestion"></a>
|
|
1828
|
+
|
|
1829
|
+
### `g8.api.webChat.updateWebchatQuestion(input)`
|
|
1830
|
+
|
|
1831
|
+
**Update Webchat Question**
|
|
1832
|
+
|
|
1833
|
+
- HTTP: `PATCH /api/v1/webchat/questions/{question_id}`
|
|
1834
|
+
- operationId: `update_webchat_question_webchat_questions__question_id__patch` (also callable as `g8.api.call("update_webchat_question_webchat_questions__question_id__patch", input)`)
|
|
1835
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1836
|
+
- API-key scope: `inbox:write`
|
|
1837
|
+
|
|
1838
|
+
Partial edit of a preset question. `chat_bot_id` locates the row.
|
|
1839
|
+
|
|
1840
|
+
**Input**
|
|
1841
|
+
|
|
1842
|
+
| Field | Type | Required | Description |
|
|
1843
|
+
|---|---|---|---|
|
|
1844
|
+
| `path.question_id` | `string` | yes | Question id. |
|
|
1845
|
+
| `body` | `QuestionUpdateRequest` | yes | Request body; fields below. |
|
|
1846
|
+
|
|
1847
|
+
Body fields (`QuestionUpdateRequest`):
|
|
1848
|
+
|
|
1849
|
+
| Field | Type | Required | Description |
|
|
1850
|
+
|---|---|---|---|
|
|
1851
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
1852
|
+
| `body.active` | `boolean \| null` | no | |
|
|
1853
|
+
| `body.category` | `string \| null` | no | min length 1, max length 100 |
|
|
1854
|
+
| `body.expected_revision` | `integer \| null` | no | min 1 |
|
|
1855
|
+
| `body.paths` | `Array<string> \| null` | no | |
|
|
1856
|
+
| `body.placements` | `Array<"launcher" \| "home" \| "conversation"> \| null` | no | |
|
|
1857
|
+
| `body.question` | `string \| null` | no | min length 1, max length 1000 |
|
|
1858
|
+
| `body.sort_order` | `integer \| null` | no | |
|
|
1859
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
1860
|
+
|
|
1861
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1862
|
+
|
|
1863
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1864
|
+
|
|
1865
|
+
**Example**
|
|
1866
|
+
|
|
1867
|
+
```ts
|
|
1868
|
+
const result = await g8.api.webChat.updateWebchatQuestion({ path: { question_id: "id" }, body: { chat_bot_id: "id" } });
|
|
1869
|
+
```
|
|
1870
|
+
|
|
1871
|
+
---
|
|
1872
|
+
|
|
1873
|
+
<a id="op-updatewebchatsettings"></a>
|
|
1874
|
+
|
|
1875
|
+
### `g8.api.webChat.updateWebchatSettings(input)`
|
|
1876
|
+
|
|
1877
|
+
**Update Webchat Settings**
|
|
1878
|
+
|
|
1879
|
+
- HTTP: `PATCH /api/v1/webchat/settings`
|
|
1880
|
+
- operationId: `update_webchat_settings_webchat_settings_patch` (also callable as `g8.api.call("update_webchat_settings_webchat_settings_patch", input)`)
|
|
1881
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1882
|
+
- API-key scope: `inbox:write`
|
|
1883
|
+
|
|
1884
|
+
Partial edit of the theme. An unset field is left untouched.
|
|
1885
|
+
|
|
1886
|
+
THIS IS LIVE. A saved theme is what the next visitor sees, with no publish
|
|
1887
|
+
step in between.
|
|
1888
|
+
|
|
1889
|
+
To REMOVE a design-token override, list its path in
|
|
1890
|
+
`themeOverridesRemove`. Sending `null` for it does not remove it - under a
|
|
1891
|
+
partial update that reads as "leave it alone".
|
|
1892
|
+
|
|
1893
|
+
**Input**
|
|
1894
|
+
|
|
1895
|
+
| Field | Type | Required | Description |
|
|
1896
|
+
|---|---|---|---|
|
|
1897
|
+
| `body` | `SettingsUpdateRequest` | yes | Request body; fields below. |
|
|
1898
|
+
|
|
1899
|
+
Body fields (`SettingsUpdateRequest`):
|
|
1900
|
+
|
|
1901
|
+
| Field | Type | Required | Description |
|
|
1902
|
+
|---|---|---|---|
|
|
1903
|
+
| `body.chat_bot_id` | `string` | yes | Owning chat bot id (UUID). |
|
|
1904
|
+
| `body.assistantMessageBgColor` | `string \| null` | no | max length 20 |
|
|
1905
|
+
| `body.assistantMessageTextColor` | `string \| null` | no | max length 20 |
|
|
1906
|
+
| `body.assistantName` | `string \| null` | no | max length 100 |
|
|
1907
|
+
| `body.borderRadius` | `string \| null` | no | max length 20 |
|
|
1908
|
+
| `body.botAvatarCustomUrl` | `string \| null` | no | max length 1000 |
|
|
1909
|
+
| `body.botAvatarMode` | `"agent" \| "preset" \| "custom" \| null` | no | |
|
|
1910
|
+
| `body.botAvatarPresetUrl` | `string \| null` | no | max length 1000 |
|
|
1911
|
+
| `body.botIconType` | `string \| null` | no | max length 50 |
|
|
1912
|
+
| `body.chatWidth` | `string \| null` | no | max length 20 |
|
|
1913
|
+
| `body.conversationQuestionLimit` | `integer \| null` | no | min 0, max 20 |
|
|
1914
|
+
| `body.conversationQuestionsAfterFirstMessage` | `"hide" \| "remain" \| "collapse" \| null` | no | |
|
|
1915
|
+
| `body.copyOverrides` | `Record<string, string> \| null` | no | |
|
|
1916
|
+
| `body.darkMode` | `boolean \| null` | no | |
|
|
1917
|
+
| `body.designTokens` | `DesignTokens \| null` | no | |
|
|
1918
|
+
| `body.expected_revision` | `integer \| null` | no | min 1 |
|
|
1919
|
+
| `body.fontFamily` | `string \| null` | no | max length 100 |
|
|
1920
|
+
| `body.fontSize` | `string \| null` | no | max length 20 |
|
|
1921
|
+
| `body.headerImageUrlExternal` | `string \| null` | no | max length 1000 |
|
|
1922
|
+
| `body.headerImageUrlInternal` | `string \| null` | no | max length 1000 |
|
|
1923
|
+
| `body.headerTextColor` | `string \| null` | no | max length 20 |
|
|
1924
|
+
| `body.homeQuestionLimit` | `integer \| null` | no | min 0, max 20 |
|
|
1925
|
+
| `body.launcherQuestionLimit` | `integer \| null` | no | min 0, max 20 |
|
|
1926
|
+
| `body.primaryColor` | `string \| null` | no | max length 20 |
|
|
1927
|
+
| `body.robotIconColor` | `string \| null` | no | max length 20 |
|
|
1928
|
+
| `body.robotIconType` | `string \| null` | no | max length 50 |
|
|
1929
|
+
| `body.secondaryColor` | `string \| null` | no | max length 20 |
|
|
1930
|
+
| `body.showHeader` | `boolean \| null` | no | |
|
|
1931
|
+
| `body.showQuickActions` | `boolean \| null` | no | |
|
|
1932
|
+
| `body.showSuggestedQuestions` | `boolean \| null` | no | |
|
|
1933
|
+
| `body.suggestedQuestionsBgColor` | `string \| null` | no | max length 20 |
|
|
1934
|
+
| `body.suggestedQuestionsSectionBgColor` | `string \| null` | no | max length 20 |
|
|
1935
|
+
| `body.surface` | `"external" \| "internal" \| null` | no | |
|
|
1936
|
+
| `body.themeOverridesRemove` | `Array<string> \| null` | no | Token paths to REMOVE. Unsetting a token is not the same as this. max items 64 |
|
|
1937
|
+
| `body.themeSource` | `"default" \| "brand_kit" \| "custom" \| null` | no | |
|
|
1938
|
+
| `body.userMessageBgColor` | `string \| null` | no | max length 20 |
|
|
1939
|
+
| `body.userMessageTextColor` | `string \| null` | no | max length 20 |
|
|
1940
|
+
|
|
1941
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1942
|
+
|
|
1943
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1944
|
+
|
|
1945
|
+
**Example**
|
|
1946
|
+
|
|
1947
|
+
```ts
|
|
1948
|
+
const result = await g8.api.webChat.updateWebchatSettings({ body: { chat_bot_id: "id" } });
|
|
1949
|
+
```
|
|
1950
|
+
|
|
1951
|
+
---
|
|
1952
|
+
|
|
1953
|
+
<a id="op-uploadwebchatimage"></a>
|
|
1954
|
+
|
|
1955
|
+
### `g8.api.webChat.uploadWebchatImage(input?)`
|
|
1956
|
+
|
|
1957
|
+
**Upload Webchat Image**
|
|
1958
|
+
|
|
1959
|
+
- HTTP: `POST /api/v1/webchat/images`
|
|
1960
|
+
- operationId: `upload_webchat_image_webchat_images_post` (also callable as `g8.api.call("upload_webchat_image_webchat_images_post", input)`)
|
|
1961
|
+
- Tier: `write`: creates or changes records; the SDK sends an Idempotency-Key and retries transient failures
|
|
1962
|
+
- API-key scope: `inbox:write`
|
|
1963
|
+
|
|
1964
|
+
Upload an image for the widget and get back its public URL.
|
|
1965
|
+
|
|
1966
|
+
STATELESS: this does not change the widget. Write the returned URL into
|
|
1967
|
+
the theme with `PATCH /webchat/settings` - `headerImageUrlExternal` /
|
|
1968
|
+
`headerImageUrlInternal` for a header, `botAvatarCustomUrl` for an avatar.
|
|
1969
|
+
The file type is checked from its bytes, not its declared content type.
|
|
1970
|
+
|
|
1971
|
+
**Input**
|
|
1972
|
+
|
|
1973
|
+
| Field | Type | Required | Description |
|
|
1974
|
+
|---|---|---|---|
|
|
1975
|
+
| `query.purpose` | `"header" \| "avatar"` | no | `header` (the widget header image) or `avatar` (the assistant avatar). Only selects where the file is stored. default `"header"` |
|
|
1976
|
+
|
|
1977
|
+
**Returns** `ApiResponse_WebchatPayload_`: the envelope `{ data: WebchatPayload, ... }`. `g8.api` returns the envelope as-is, so read `result.data`.
|
|
1978
|
+
|
|
1979
|
+
Other envelope fields: `pagination` (PaginationMeta).
|
|
1980
|
+
|
|
1981
|
+
**Example**
|
|
1982
|
+
|
|
1983
|
+
```ts
|
|
1984
|
+
const result = await g8.api.webChat.uploadWebchatImage();
|
|
1985
|
+
```
|
|
1986
|
+
|
|
1987
|
+
---
|
|
1988
|
+
|
|
1989
|
+
## Referenced types
|
|
1990
|
+
|
|
1991
|
+
Named types that appear in the tables above. Full TypeScript definitions: `G8Contract.<Name>` (`import type { G8Contract } from "@graph8/sdk"`).
|
|
1992
|
+
|
|
1993
|
+
<a id="type-assessmentdefinition"></a>
|
|
1994
|
+
|
|
1995
|
+
### `AssessmentDefinition`
|
|
1996
|
+
|
|
1997
|
+
Complete branching graph stored as JSONB in chat_assessments.definition.
|
|
1998
|
+
|
|
1999
|
+
| Field | Type | Required | Description |
|
|
2000
|
+
|---|---|---|---|
|
|
2001
|
+
| `start_step_id` | `string` | yes | min length 1, max length 64 |
|
|
2002
|
+
| `results` | `Array<AssessmentResultDef>` | no | |
|
|
2003
|
+
| `steps` | `Array<AssessmentStepDef>` | no | |
|
|
2004
|
+
|
|
2005
|
+
<a id="type-availabilityinterval"></a>
|
|
2006
|
+
|
|
2007
|
+
### `AvailabilityInterval`
|
|
2008
|
+
|
|
2009
|
+
A weekly recurring window. `day` is 0-6 with Monday = 0.
|
|
2010
|
+
|
|
2011
|
+
| Field | Type | Required | Description |
|
|
2012
|
+
|---|---|---|---|
|
|
2013
|
+
| `day` | `integer` | yes | min 0, max 6 |
|
|
2014
|
+
| `end` | `string` | yes | min length 5, max length 5, pattern `^(([01]\\d\|2[0-3]):[0-5]\\d\|24:00)$` |
|
|
2015
|
+
| `start` | `string` | yes | min length 5, max length 5, pattern `^([01]\\d\|2[0-3]):[0-5]\\d$` |
|
|
2016
|
+
|
|
2017
|
+
<a id="type-availabilityoverride"></a>
|
|
2018
|
+
|
|
2019
|
+
### `AvailabilityOverride`
|
|
2020
|
+
|
|
2021
|
+
A single calendar date whose windows REPLACE that weekday's windows. An empty `intervals` list means closed all day — that is the whole point of an override, so it is not treated as "unset". Window `day` values are ignored here (the date already fixes the day), and a client that sends one has it dropped by Pydantic's default `extra="ignore"`.
|
|
2022
|
+
|
|
2023
|
+
| Field | Type | Required | Description |
|
|
2024
|
+
|---|---|---|---|
|
|
2025
|
+
| `date` | `string` | yes | min length 10, max length 10, pattern `^\\d{4}-\\d{2}-\\d{2}$` |
|
|
2026
|
+
| `intervals` | `Array<AvailabilityWindow>` | no | max items 10 |
|
|
2027
|
+
|
|
2028
|
+
<a id="type-designtokens"></a>
|
|
2029
|
+
|
|
2030
|
+
### `DesignTokens`
|
|
2031
|
+
|
|
2032
|
+
Extended widget theme tokens stored in chat_widget_settings.designTokens. Shape is the shared FE/BE contract — the TypeScript twin lives in frontend/features/webchat/widget-preview/chat-design-settings.ts.
|
|
2033
|
+
|
|
2034
|
+
| Field | Type | Required | Description |
|
|
2035
|
+
|---|---|---|---|
|
|
2036
|
+
| `badge` | `DesignTokenBadge \| null` | no | |
|
|
2037
|
+
| `colors` | `DesignTokenColors \| null` | no | |
|
|
2038
|
+
| `colorsDark` | `DesignTokenColorsDark \| null` | no | |
|
|
2039
|
+
| `geometry` | `DesignTokenGeometry \| null` | no | |
|
|
2040
|
+
| `header` | `DesignTokenHeader \| null` | no | |
|
|
2041
|
+
| `input` | `DesignTokenInput \| null` | no | |
|
|
2042
|
+
| `motion` | `DesignTokenMotion \| null` | no | |
|
|
2043
|
+
| `radius` | `DesignTokenRadius \| null` | no | |
|
|
2044
|
+
| `shadows` | `DesignTokenShadows \| null` | no | |
|
|
2045
|
+
| `spacing` | `DesignTokenSpacing \| null` | no | |
|
|
2046
|
+
| `transform` | `DesignTokenTransform \| null` | no | |
|
|
2047
|
+
| `typography` | `DesignTokenTypography \| null` | no | |
|
|
2048
|
+
| `version` | `integer` | no | default `1` |
|