# Channel web Widget

## Retrieves web widget settings for a channel

> \
> \
> \*\*Required Permission:\*\* \`chatbots.channels.get\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Channel web-widget","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/chatbots/{chatbotId}/channels/{channelId}/widget":{"get":{"operationId":"ChannelWebWidgetController_getWebWidgetSettings[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot.","schema":{"type":"string"}},{"name":"channelId","required":true,"in":"path","description":"The ID of the web channel.","schema":{"type":"string"}}],"responses":{"200":{"description":"The current widget settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebWidgetSettingsResponseDto"}}}},"403":{"description":"Insufficient permissions."}},"summary":"Retrieves web widget settings for a channel","tags":["Channel web-widget"],"description":"\n\n**Required Permission:** `chatbots.channels.get`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"WebWidgetSettingsResponseDto":{"type":"object","properties":{"error":{"type":"string","description":"Optional error message"},"webWidgetSettings":{"description":"The widgets settings.","nullable":true,"allOf":[{"$ref":"#/components/schemas/WebWidgetSettingsDto"}]}}},"WebWidgetSettingsDto":{"type":"object","properties":{"colors":{"description":"The widget's color settings.","nullable":true,"allOf":[{"$ref":"#/components/schemas/WebWidgetColorsDto"}]},"contents":{"description":"The widget's content settings.","nullable":true,"allOf":[{"$ref":"#/components/schemas/WebWidgetContentsDto"}]},"privacyConsent":{"type":"boolean","description":"Indicates whether the privacy policy must be accepted."},"updated":{"type":"string","description":"Last updated timestamp (ISO format)."},"created":{"type":"string","description":"Creation timestamp (ISO format)."}},"required":["colors","contents","privacyConsent","updated","created"]},"WebWidgetColorsDto":{"type":"object","properties":{"gradientFirst":{"type":"string","description":"First color for the header gradient (Hex)."},"gradientSecond":{"type":"string","description":"Second color for the header gradient (Hex)."},"gradientThird":{"type":"string","description":"Third color for the header gradient (Hex)."},"gradientText":{"type":"string","description":"Color for text placed over the header gradient."},"primary":{"type":"string","description":"Main branding color for the widget."},"onPrimary":{"type":"string","description":"Contrast color for text/icons on top of the primary color."},"secondary":{"type":"string","description":"Accent color used for highlights or secondary UI elements."},"onSecondary":{"type":"string","description":"Contrast color for text/icons on top of the secondary color."},"button":{"type":"string","description":"Background color for primary action buttons."},"onButton":{"type":"string","description":"Color for text/icons inside buttons."},"dark":{"type":"boolean","description":"Activates dark mode."}},"required":["gradientFirst","gradientSecond","gradientThird","gradientText","primary","onPrimary","secondary","onSecondary","button","onButton","dark"]},"WebWidgetContentsDto":{"type":"object","properties":{"headline":{"type":"object","description":"Headline, multilingual.","additionalProperties":{"type":"string"}},"subHeadline":{"type":"object","description":"Sub-headline, multilingual.","additionalProperties":{"type":"string"}},"callToAction":{"type":"object","description":"Call-to-action text, multilingual.","additionalProperties":{"type":"string"}},"callToActionSubtitle":{"type":"object","description":"Call-to-action subtitle, multilingual.","additionalProperties":{"type":"string"}},"botName":{"type":"string","description":"The name of the chatbot displayed in the header."},"hideBotAvatar":{"type":"boolean","description":"Hides the bot's avatar in the chat header."},"hideFileUpload":{"type":"boolean","description":"Hides the option to upload files."}},"required":["headline","subHeadline","callToAction","callToActionSubtitle","botName","hideBotAvatar","hideFileUpload"]}}}}
```

## Updates web widget settings for a channel.

> \
> \
> \*\*Required Permission:\*\* \`chatbots.channels.edit\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Channel web-widget","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/chatbots/{chatbotId}/channels/{channelId}/widget":{"patch":{"operationId":"ChannelWebWidgetController_updateWebWidgetSettings[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot.","schema":{"type":"string"}},{"name":"channelId","required":true,"in":"path","description":"The ID of the web channel.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebWidgetSettingsRequestDto"}}}},"responses":{"200":{"description":"The updated widget settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebWidgetSettingsResponseDto"}}}},"400":{"description":"Invalid input data."},"403":{"description":"Insufficient permissions."}},"summary":"Updates web widget settings for a channel.","tags":["Channel web-widget"],"description":"\n\n**Required Permission:** `chatbots.channels.edit`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"UpdateWebWidgetSettingsRequestDto":{"type":"object","properties":{"updateWebWidget":{"description":"The object containing the widget settings to be updated.","nullable":true,"allOf":[{"$ref":"#/components/schemas/UpdateWebWidgetDto"}]}},"required":["updateWebWidget"]},"UpdateWebWidgetDto":{"type":"object","properties":{"colors":{"description":"The widget's color settings.","nullable":true,"allOf":[{"$ref":"#/components/schemas/WebWidgetColorsDto"}]},"contents":{"description":"The widget's content settings.","nullable":true,"allOf":[{"$ref":"#/components/schemas/WebWidgetContentsDto"}]},"privacyConsent":{"type":"boolean","description":"Indicates whether the privacy policy must be accepted."}},"required":["colors","contents","privacyConsent"]},"WebWidgetColorsDto":{"type":"object","properties":{"gradientFirst":{"type":"string","description":"First color for the header gradient (Hex)."},"gradientSecond":{"type":"string","description":"Second color for the header gradient (Hex)."},"gradientThird":{"type":"string","description":"Third color for the header gradient (Hex)."},"gradientText":{"type":"string","description":"Color for text placed over the header gradient."},"primary":{"type":"string","description":"Main branding color for the widget."},"onPrimary":{"type":"string","description":"Contrast color for text/icons on top of the primary color."},"secondary":{"type":"string","description":"Accent color used for highlights or secondary UI elements."},"onSecondary":{"type":"string","description":"Contrast color for text/icons on top of the secondary color."},"button":{"type":"string","description":"Background color for primary action buttons."},"onButton":{"type":"string","description":"Color for text/icons inside buttons."},"dark":{"type":"boolean","description":"Activates dark mode."}},"required":["gradientFirst","gradientSecond","gradientThird","gradientText","primary","onPrimary","secondary","onSecondary","button","onButton","dark"]},"WebWidgetContentsDto":{"type":"object","properties":{"headline":{"type":"object","description":"Headline, multilingual.","additionalProperties":{"type":"string"}},"subHeadline":{"type":"object","description":"Sub-headline, multilingual.","additionalProperties":{"type":"string"}},"callToAction":{"type":"object","description":"Call-to-action text, multilingual.","additionalProperties":{"type":"string"}},"callToActionSubtitle":{"type":"object","description":"Call-to-action subtitle, multilingual.","additionalProperties":{"type":"string"}},"botName":{"type":"string","description":"The name of the chatbot displayed in the header."},"hideBotAvatar":{"type":"boolean","description":"Hides the bot's avatar in the chat header."},"hideFileUpload":{"type":"boolean","description":"Hides the option to upload files."}},"required":["headline","subHeadline","callToAction","callToActionSubtitle","botName","hideBotAvatar","hideFileUpload"]},"WebWidgetSettingsResponseDto":{"type":"object","properties":{"error":{"type":"string","description":"Optional error message"},"webWidgetSettings":{"description":"The widgets settings.","nullable":true,"allOf":[{"$ref":"#/components/schemas/WebWidgetSettingsDto"}]}}},"WebWidgetSettingsDto":{"type":"object","properties":{"colors":{"description":"The widget's color settings.","nullable":true,"allOf":[{"$ref":"#/components/schemas/WebWidgetColorsDto"}]},"contents":{"description":"The widget's content settings.","nullable":true,"allOf":[{"$ref":"#/components/schemas/WebWidgetContentsDto"}]},"privacyConsent":{"type":"boolean","description":"Indicates whether the privacy policy must be accepted."},"updated":{"type":"string","description":"Last updated timestamp (ISO format)."},"created":{"type":"string","description":"Creation timestamp (ISO format)."}},"required":["colors","contents","privacyConsent","updated","created"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chatcaptain.com/api/api-dokumentation/channel-web-widget.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
