Get Widget by Unit
Endpoint used to get widgets by unit.
Request Example
Section titled “Request Example”curl --request GET \ --url https://chat.api.toolzz.com.br/api/v1/widget/unity/{unityId} \ --header 'Authorization: Bearer TOKEN_HERE'Response Example
Section titled “Response Example”{ "items": [ { "id": "uuid", "institutionId": "uuid", "title": "<string>", "subTitle": "<string>", "headerIconFileId": "uuid", "primaryColor": "<string>", "secondaryColor": "<string>", "widgetIconFileId": "uuid", "primaryAIColor": "<string>", "secondaryAIColor": "<string>", "avatarIconFileId": "uuid", "aiFirstMessage": "<string>", "primaryUserColor": "<string>", "secondaryUserColor": "<string>", "Bot": { "id": "uuid", "creativePrecision": 123, "safeMode": false, "isActivated": true, "hasWhatsapp": true, "hasMonetization": true, "hasAnalytics": true, "hasMulti": true, "hasPlugins": true, "hasTools": true, "hasVoice": true, "hasInstagram": true, "hasMessenger": true, "isAdvancedBot": true, "creatorId": "uuid", "institutionId": "uuid", "unityId": "uuid", "knowLedgeBaseId": "uuid", "prompt": "<string>", "tags": [ "<string>" ], "description": "<string>", "name": "<string>", "assistantId": "uuid", "iconFileId": "uuid", "progressStatus": "<string>", "botMonetizationId": "uuid", "metaprompt": "<string>", "botGenAI": [ { "isDefault": true, "messagesLimit": 123, "charactersLimit": 123, "temperature": 123, "topP": 123, "frequencyPenalty": 123, "presencePenalty": 123, "topK": 123, "messagesQuery": 123, "id": "uuid", "botId": "uuid", "model": "<string>", "tools": [ { "type": "<string>", "description": "<string>" } ], "credential": { "status": false, "id": "uuid", "name": "<string>", "userId": "uuid", "unityId": "uuid", "integrationId": "uuid", "secretId": "uuid", "createdAt": "<string>", "updatedAt": "<string>", "virtualKey": "<string>", "integration": { "status": true, "id": "uuid", "name": "<string>", "type": "<string>", "slug": "<string>", "file": { "id": "uuid", "institutionId": "uuid", "type": "<string>", "fileName": "<string>", "url": "<string>", "size": 123 } } } } ] }, "headerIcon": "uuid", "widgetIcon": "uuid", "avatarIcon": "uuid", "defaultMessages": [ { "id": "uuid", "widgetId": "uuid", "position": 123, "text": "<string>" } ], "audioVoice": "<string>", "voiceActive": true, "isPublic": true, "isOpen": false, "isActive": true, "isActivated": true, "isFavorited": false, "favorites": [] } ], "totalItems": 123, "widgetCount": 123, "activeCount": 123, "widgetLimit": 123}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
URL Parameters (Path)
Section titled “URL Parameters (Path)”| Parameter | Type | Description | Required |
|---|---|---|---|
unityId | UUID | Unit identifier. | Yes |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
items | Array | List containing the configuration objects of each Widget. |
items[].id | UUID | Unique identifier of the Widget. |
items[].title | String | Title displayed in the Widget header. |
items[].subTitle | String | Subtitle or status displayed in the header. |
items[].primaryColor | String | Main interface color (Hexadecimal). |
items[].secondaryColor | String | Contrast/secondary interface color. |
items[].aiFirstMessage | String | Automatic initial greeting sent by the Agent. |
items[].Bot | Object | Object containing the logical and AI settings of the linked Agent. |
items[].Bot.name | String | Name of the Agent linked to the Widget. |
items[].Bot.prompt | String | System Prompt with the Agent’s rules and personality. |
items[].defaultMessages | Array | List of suggested phrases to start the conversation. |
items[].audioVoice | String | Identifier of the audio profile used by the Agent. |
items[].voiceActive | Boolean | Defines if the audio feature is enabled. |
items[].isPublic | Boolean | Defines if the Widget is available via public link. |
items[].isOpen | Boolean | Defines if the Widget starts open on the page. |
items[].isActive | Boolean | Availability status of the Widget in the system. |
totalItems | Number | Total amount of Widgets returned in the list. |
widgetCount | Number | Total amount of Widgets registered for the institution. |
activeCount | Number | Total amount of Widgets that are currently active. |
widgetLimit | Number | Maximum Widget limit allowed by the plan. |
Security
Section titled “Security”To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.
To access your access token, follow these steps:
- Log in to the ToolzzAI platform
- Click on “Settings”
- Click on “Access Token”
- Copy the access token
