Skip to content

Duplicate Function

Endpoint used to duplicate a custom function.

Terminal window
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/functions/duplicate/{functionId} \
--header 'Authorization: Bearer TOKEN_HERE'
{
"id": "uuid",
"institutionId": "uuid",
"userId": "uuid",
"unityId": "uuid",
"code": "string",
"description": "string",
"iconFileId": "uuid",
"status": true,
"name": "string",
"pluginIcon": {
"id": "uuid",
"institutionId": "uuid",
"type": "string",
"fileName": "string",
"internalStorageUrl": "string",
"url": "string",
"maskName": "string",
"createdAt": "date",
"updatedAt": "date",
"extension": "string",
"size": 123,
"numberWords": null
},
"color": "string",
"outputs": [
{
"required": false,
"id": "uuid",
"type": "string",
"description": "string",
"customFunctionId": "uuid",
"property": "string"
},
{
"required": false,
"id": "uuid",
"type": "string",
"description": "string",
"customFunctionId": "uuid",
"property": "string"
}
],
"isActivated": true,
"type": null,
"googleCalendarPlugin": [],
"discordPlugin": [],
"telegramPlugin": []
}
ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
functionIdUUIDUnique function identifier.Yes
KeyTypeDescription
idUUIDUnique identifier of the main record.
institutionIdUUIDOwner institution identifier.
userIdUUIDCreating user identifier.
unityIdUUIDOrganizational unit identifier.
codeStringScript or source code of the custom function.
descriptionStringPurpose description of the plugin/function.
iconFileIdUUIDReference to the icon file ID.
statusBooleanDefines if the record is active in the system.
nameStringFunction identification name.
colorStringColor reference for visual interface.
isActivatedBooleanIndicates if the plugin is enabled for immediate use.
typeNullReserved field for future typing.
pluginIconObjectObject with icon metadata (contains: id, url, size, createdAt, etc.).
pluginIcon.urlStringPublic link for viewing the icon image.
pluginIcon.extensionStringFile extension (e.g., “jpeg”, “png”).
pluginIcon.sizeNumberIcon file size in bytes.
outputsArrayList of objects defining the output variables.
outputs[].idUUIDUnique identifier of the output parameter.
outputs[].propertyStringName of the variable used in the code.
outputs[].typeStringExpected data type (e.g., “number”, “string”).
outputs[].requiredBooleanDefines if filling this field is mandatory.
googleCalendarPluginArrayList of settings for Google Calendar integration.
discordPluginArrayList of settings for Discord integration.
telegramPluginArrayList of settings for Telegram integration.

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