Skip to content

Get Function by ID

Endpoint used to get functions by ID.

Terminal window
curl --request GET \
--url https://chat.api.toolzz.com.br/api/v1/functions/{functionId} \
--header 'Authorization: Bearer TOKEN_HERE'
{
"id": "uuid",
"institutionId": "uuid",
"userId": "uuid",
"unityId": "uuid",
"name": "<string>",
"description": "<string>",
"code": "<javascript_code_string>",
"iconFileId": "uuid",
"status": true,
"color": "<string>",
"isActivated": true,
"pluginIcon": {
"id": "uuid",
"institutionId": "uuid",
"type": "PluginIcon",
"fileName": "<string>",
"url": "<url>",
"extension": "<string>",
"size": 123
},
"outputs": [
{
"id": "uuid",
"type": "number | string | boolean",
"description": "<string>",
"property": "<variable_name>",
"required": false
}
],
"googleCalendarPlugin": [],
"discordPlugin": [],
"telegramPlugin": []
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
functionIdUUIDUnique function identifier.Yes
KeyTypeDescription
idUUIDUnique identifier of the custom function.
institutionIdUUIDID of the institution owning the plugin.
userIdUUIDID of the user who created or manages the function.
unityIdUUIDID of the organizational unit where the plugin is available.
nameStringIdentification name of the function (e.g., “media2”).
descriptionStringExplanation of the function behavior (used by AI to know when to call it).
codeStringJavaScript (Node.js) code block that will be executed asynchronously.
statusBooleanIndicates if the function record is active in the database.
isActivatedBooleanDefines if the plugin is enabled for immediate use by the AI agent.
colorStringVisual identification color of the plugin in the interface.
pluginIconObjectObject containing metadata of the plugin’s icon image.
pluginIcon.urlURLDirect link to the icon image.
pluginIcon.fileNameStringPhysical file name stored in storage.
outputs[]ArrayDefinition of input/output variables that the function handles.
outputs[].propertyStringName of the variable that will be accessed in the code via args.<property>.
outputs[].typeStringExpected data type for the property (e.g., number).
outputs[].descriptionStringDescription of what that field represents.
outputs[].requiredBooleanDefines if the property is mandatory for function execution.
googleCalendarPluginArraySpecific integration settings for Google Calendar.
discordPluginArraySpecific integration settings for Discord.
telegramPluginArraySpecific integration settings for Telegram.

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