POST
/
api
/
v1
/
functions
curl --request POST \
  --url https://chat.api.toolzz.com.br/api/v1/functions/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "userId": "<string>",
  "unityId": "<string>",
  "outputs": [
    {}
  ]
}'
{
  "id": "<string>",
  "institutionId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "code": "<string>",
  "status": true,
  "unityId": "<string>",
  "userId": "<string>",
  "iconFileId": "<string>",
  "color": "<string>",
  "outputs": [
    {}
  ],
  "isActivated": true
}

Body Description

name
string
required

The name field

description
string
required

The description field

userId
string
required

The userId field

unityId
string
required

The unityId field

outputs
array
required

The outputs array

Response Description

Below you will see the description of the Function creation response

id
string
required

Unique identifier for the plugin.

institutionId
string
required

ID of the associated institution.

name
string
required

Name of the plugin.

description
string
required

Description of the plugin functionality.

code
string
required

JavaScript code defining the plugin’s functionality.

status
boolean
required

Indicates whether the plugin is enabled.

unityId
string
required

ID of the associated unity.

userId
string
required

ID of the user who created or manages the plugin.

iconFileId
string

Optional ID of the plugin’s icon file.

color
string
required

Color associated with the plugin for UI purposes.

outputs
array

List of plugin outputs (empty if none exist).

isActivated
boolean
required

Indicates if the plugin is currently activated.

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.