Skip to content

Get Widget by Unit

Endpoint used to get widgets by unit.

Terminal window
curl --request GET \
--url https://chat.api.toolzz.com.br/api/v1/widget/unity/{unityId} \
--header 'Authorization: Bearer TOKEN_HERE'
{
"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
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
unityIdUUIDUnit identifier.Yes

KeyTypeDescription
itemsArrayList containing the configuration objects of each Widget.
items[].idUUIDUnique identifier of the Widget.
items[].titleStringTitle displayed in the Widget header.
items[].subTitleStringSubtitle or status displayed in the header.
items[].primaryColorStringMain interface color (Hexadecimal).
items[].secondaryColorStringContrast/secondary interface color.
items[].aiFirstMessageStringAutomatic initial greeting sent by the Agent.
items[].BotObjectObject containing the logical and AI settings of the linked Agent.
items[].Bot.nameStringName of the Agent linked to the Widget.
items[].Bot.promptStringSystem Prompt with the Agent’s rules and personality.
items[].defaultMessagesArrayList of suggested phrases to start the conversation.
items[].audioVoiceStringIdentifier of the audio profile used by the Agent.
items[].voiceActiveBooleanDefines if the audio feature is enabled.
items[].isPublicBooleanDefines if the Widget is available via public link.
items[].isOpenBooleanDefines if the Widget starts open on the page.
items[].isActiveBooleanAvailability status of the Widget in the system.
totalItemsNumberTotal amount of Widgets returned in the list.
widgetCountNumberTotal amount of Widgets registered for the institution.
activeCountNumberTotal amount of Widgets that are currently active.
widgetLimitNumberMaximum Widget limit allowed by the plan.

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:

  1. Log in to the ToolzzAI platform
  2. Click on “Settings”
  3. Click on “Access Token”
  4. Copy the access token

Access token page