Skip to content

Duplicate Widget

Endpoint used to duplicate a widget.

Terminal window
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/widget/duplicate/ \
--header 'Authorization: Bearer TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '
{
"id": "uuid" // ID of the widget you want to duplicate
}'
{
"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>",
"botMonetization": {
"credentialId": "uuid",
"price": 123,
"timeTest": 123,
"featuredProduct": true,
"id": "uuid",
"priceId": "uuid",
"coin": "<string>",
"recurring": "<string>"
},
"botGenAI": [
{
"isDefault": true,
"messagesLimit": 123,
"charactersLimit": 123,
"temperature": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123,
"topK": 123,
"messagesQuery": 123,
"id": "uuid",
"botId": "uuid",
"genAIId": "uuid",
"genAIKey": "<string>",
"genAIOrganization": "<string>",
"genAIModelId": "uuid",
"assistantId": "uuid",
"credentialId": "uuid",
"analyticsCredentialId": "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
}
}
}
}
],
"botVoiceConfig": [
{
"visualType": "<string>",
"language": "<string>",
"primaryColor": "<string>",
"buttonColor": "<string>",
"theme": "<string>",
"textTitle": "<string>",
"textDescription": "<string>",
"waitTime": 123,
"callTime": 123,
"id": "uuid",
"botId": "uuid",
"voiceId": "<string>",
"voiceCredentialId": "uuid",
"visualIconId": "uuid",
"voiceModel": "<string>",
"visualIcon": {
"id": "uuid",
"institutionId": "uuid",
"fileName": "<string>",
"url": "<string>",
"size": 123
},
"voiceCredential": {
"id": "uuid",
"name": "<string>",
"userId": "uuid",
"integrationId": "uuid",
"secretId": "uuid"
}
}
]
},
"headerIcon": "uuid",
"widgetIcon": "uuid",
"avatarIcon": "uuid",
"defaultMessages": [
{
"id": "uuid",
"widgetId": "uuid",
"position": 123,
"text": "<string>"
}
],
"audioVoice": "<string>",
"voiceActive": true,
"isPublic": true,
"isOpen": false,
"isActivated": true,
"unity": {
"isActivated": true,
"id": "uuid",
"institutionId": "uuid",
"unityUuid": "uuid",
"name": "<string>",
"credentialProjectId": "uuid"
}
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
idUUIDUnique identifier of the widget you wish to duplicate.Yes

KeyTypeDescription
idUUIDUnique identifier of the Widget configuration.
institutionIdUUIDUnique identifier of the owning institution.
titleStringMain title displayed in the Widget header.
subTitleStringSubtitle displayed below the main title.
headerIconFileIdUUIDHeader icon file ID.
primaryColorStringPrimary interface color (Hexadecimal).
secondaryColorStringSecondary/contrast interface color.
widgetIconFileIdUUIDFloating button icon ID.
primaryAIColorStringBackground color of the agent’s message bubble.
secondaryAIColorStringText color of the agent’s messages.
avatarIconFileIdUUIDAgent’s avatar image ID.
aiFirstMessageStringAutomatic initial greeting sent by the agent.
primaryUserColorStringBackground color of the user’s message bubble.
secondaryUserColorStringText color of the user’s messages.
BotObjectObject containing the logical and AI settings of the linked agent.
Bot.idUUIDUnique agent identifier.
Bot.creativePrecisionNumberPrecision/creativity level configured for the model.
Bot.promptStringComplete System Prompt (rules, personality, and context).
Bot.hasVoiceBooleanIndicates if voice functionality is enabled in the agent.
Bot.botGenAIArrayList of generative models and tools linked to the agent.
Bot.botVoiceConfigArraySpecific voice and provider settings for the agent.
defaultMessagesArrayList of suggested phrases for the user to start the chat.
defaultMessages[].textStringConversation starter content.
defaultMessages[].positionNumberDisplay order of the suggestion in the interface.
audioVoiceStringAudio profile identifier for text reading.
voiceActiveBooleanDefines if audio is on by default in the interface.
isPublicBooleanDefines if the Widget can be accessed externally.
isOpenBooleanDefines if the Widget starts expanded when loading the page.
unityObjectData of the organizational unit to which the agent is linked.
unity.nameStringUnit name linked to the agent.
unity.credentialProjectIdUUIDID of the credentials project associated with the unit.

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