POST
/
api
/
v1
/
widget
curl --request POST \
  --url https://chat.api.toolzz.com.br/api/v1/widget/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<string>",
  "subTitle": "<string>",
  "primaryColor": "<string>",
  "secondaryColor": "<string>",
  "primaryAIColor": "<string>",
  "secondaryAIColor": "<string>",
  "aiFirstMessage": "<string>",
  "primaryUserColor": "<string>",
  "secondaryUserColor": "<string>"
}'
{
  "id": "<string>",
  "institutionId": "<string>",
  "title": "<string>",
  "subTitle": "<string>",
  "headerIconFileId": "<string>",
  "primaryColor": "<string>",
  "secondaryColor": "<string>",
  "widgetIconFileId": "<string>",
  "primaryAIColor": "<string>",
  "secondaryAIColor": "<string>",
  "avatarIconFileId": "<string>",
  "aiFirstMessage": "<string>",
  "primaryUserColor": "<string>",
  "secondaryUserColor": "<string>",
  "audioVoice": "<string>",
  "voiceActive": true,
  "defaultMessages": [
    {}
  ],
  "Bot": {
    "id": "<string>",
    "creatorId": "<string>",
    "institutionId": "<string>",
    "unityId": "<string>",
    "name": "<string>",
    "description": "<string>",
    "iconFileId": "<string>",
    "creativePrecision": 123,
    "prompt": "<string>",
    "metaprompt": "<string>",
    "tags": [
      {}
    ],
    "safeMode": true,
    "isActivated": true,
    "progressStatus": "<string>",
    "hasMonetization": true,
    "hasAnalytics": true,
    "hasPlugins": true,
    "hasTools": true,
    "isAdvancedBot": true,
    "botGenAI": [
      {}
    ],
    "botMonetization": {
      "id": "<string>",
      "credentialId": "<string>",
      "coin": "<string>",
      "price": 123,
      "timeTest": 123,
      "recurring": "<string>",
      "featuredProduct": true
    }
  },
  "unity": {
    "id": "<string>",
    "institutionId": "<string>",
    "name": "<string>",
    "isActivated": true,
    "credentialProjectId": "<string>"
  },
  "headerIcon": "<string>",
  "widgetIcon": "<string>",
  "avatarIcon": "<string>",
  "isPublic": true,
  "isActive": true,
  "isActivated": true,
  "favorites": [
    {}
  ]
}

Body Description

title
string

The title is required

subTitle
string

The subTitle is required

primaryColor
string

The primary color is required

secondaryColor
string

The secondary color is required

primaryAIColor
string

The primary AI color is required

secondaryAIColor
string

The secondary AI color is required

aiFirstMessage
string

The AI first message is required

primaryUserColor
string

The primary user color is required

secondaryUserColor
string

The secondary user color is required

Response Description

Below you will see the description of the bot response

id
string
required

Unique identifier for the widget.

institutionId
string
required

ID of the associated institution.

title
string
required

Title of the widget.

subTitle
string
required

Subtitle of the widget.

headerIconFileId
string

Optional ID of the header icon file.

primaryColor
string
required

Primary color configuration for the widget.

secondaryColor
string
required

Secondary color configuration for the widget.

widgetIconFileId
string

Optional ID of the widget icon file.

primaryAIColor
string
required

Primary AI color setting.

secondaryAIColor
string
required

Secondary AI color setting.

avatarIconFileId
string

Optional ID of the avatar icon file.

aiFirstMessage
string
required

Initial message displayed by the AI.

primaryUserColor
string
required

Primary user color configuration.

secondaryUserColor
string
required

Secondary user color configuration.

audioVoice
string

Optional audio voice setting.

voiceActive
boolean

Indicates if voice functionality is active.

defaultMessages
array

List of default messages for the widget.

Bot
object
unity
object
headerIcon
string

Optional header icon details.

widgetIcon
string

Optional widget icon details.

avatarIcon
string

Optional avatar icon details.

isPublic
boolean
required

Indicates if the widget is public.

isActive
boolean
required

Indicates if the widget is active.

isActivated
boolean
required

Activation status of the widget.

favorites
array

List of users who have marked the widget as a favorite.

Segurança

Para acessar este endpoint, é necessário enviar um token de acesso válido através do cabeçalho de autorização (Authorization) da requisição. Além disso, a API é protegida por outras medidas de segurança para proteger os dados dos usuários.