Skip to content

Update Google Calendar Function

Endpoint used to update a Google Calendar function.

Terminal window
curl --request PUT \
--url https://chat.api.toolzz.com.br/api/v1/functions/{functionId} \
--header 'Authorization: Bearer TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '
{
"name": "string",
"description": "string",
"iconFileId": null,
"outputs": [],
"googleCalendar": {
"googleId": "string",
"calendarId": "string",
"timezone": "string",
"notificationContent": "string",
"googleUser": {
"name": "string",
"given_name": "string",
"family_name": "string",
"picture": "string",
"email": "string@email",
"hd": "string"
},
"googleToken": "string"
},
"type": "google-calendar",
"userId": "uuid",
"unityId": "uuid"
}
'
{
"id": "uuid",
"institutionId": "uuid",
"userId": "uuid",
"unityId": "uuid",
"code": "string",
"description": "string",
"iconFileId": "string",
"status": true,
"name": "string",
"color": "string",
"outputs": [],
"isActivated": true,
"type": "google-calendar",
"googleCalendarPlugin": [
{
"id": "uuid",
"googleId": "string_digits",
"calendarId": "email@domain.com",
"timezone": "string_timezone",
"pluginId": "uuid",
"notificationType": null,
"notificationContentType": null,
"notificationContent": null,
"notificationDelayMs": 0,
"notificationWaitForSpeech": 0,
"createdAt": "iso-date",
"updatedAt": "iso-date",
"googleUser": {
"name": "string",
"given_name": "string",
"family_name": "string",
"picture": "url",
"email": "email@domain.com",
"hd": "string"
},
"googleToken": "string_token"
}
],
"discordPlugin": [],
"telegramPlugin": []
}
ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
KeyTypeDescriptionRequired
nameStringIdentifier name of the tool in the system.Yes
descriptionStringPrompt that defines the rules for the AI’s use of this function.Yes
iconFileIdNull/UUIDFile ID for a custom icon (null for default).No
outputsArrayList of output variables (send [] if none).No
googleCalendarObjectTechnical data of the connection with the Google API:Yes
googleCalendar.googleIdStringUnique numeric ID of the user’s Google account.Yes
googleCalendar.calendarIdStringE-mail or identifier of the calendar (e.g., primary).Yes
googleCalendar.timezoneStringCalendar timezone (e.g., America/Sao_Paulo).Yes
googleCalendar.notificationContentStringDefault content for notifications of new events.No
googleCalendar.googleTokenStringComplete OAuth2 token for API authorization.Yes
googleCalendar.googleUserObjectProfile information of the authenticated user:Yes
googleUser.nameStringUser’s full name in Google.Yes
googleUser.given_nameStringUser’s first name.Yes
googleUser.family_nameStringUser’s last name.Yes
googleUser.pictureURLLink to the user’s profile photo.No
googleUser.emailStringE-mail address of the linked account.Yes
googleUser.hdStringOrganization domain (Hosted Domain).No
typeStringTechnical type of the integration (fixed: google-calendar).Yes
userIdUUIDUnique identifier of the user performing the action.Yes
unityIdUUIDUnique organizational unit identifier.Yes

CategoryKeyTypeDescription
GeneralidUUIDUnique identifier of the plugin in the database.
institutionIdUUIDUnique identifier of the institution owning the plugin.
userIdUUIDUnique identifier of the user who configured the integration.
unityIdUUIDUnique organizational unit identifier.
codeStringTechnical name or internal identifier of the plugin logic.
descriptionStringInstructions (prompt) that guide the AI on how to use the function.
iconFileIdStringIcon file identifier (if any).
statusBooleanDefines if the plugin is available in the system (true/false).
nameStringFriendly name of the tool (e.g., “Google Calendar”).
colorStringColor identifier for interface display (e.g., gray).
outputsArrayList of output variables generated by the plugin (empty by default).
isActivatedBooleanIndicates if the integration is active and ready for use.
typeStringCategory of the integration (always google-calendar in this case).
InstancegoogleCalendarPlugin[]Array[Obj]List of specific calendar settings:
googleCalendarPlugin[].idUUIDUnique ID of this calendar instance configuration.
googleCalendarPlugin[].googleIdStringUnique snowflake/numeric ID of the Google account.
googleCalendarPlugin[].calendarIdStringTarget calendar e-mail (official ID in Google Calendar).
googleCalendarPlugin[].timezoneStringCalendar timezone (e.g., America/Sao_Paulo).
googleCalendarPlugin[].pluginIdUUIDForeign key referencing the main plugin id.
NotificationsnotificationTypeNull/StrConfigured notification type (Push, Webhook, etc.).
notificationContentTypeNull/StrContent type sent in the notification.
notificationContentNull/StrFixed content or notification template.
notificationDelayMsNumberDelay in milliseconds to trigger the notification.
notificationWaitForSpeechNumberWaiting time for speech before proceeding (in ms).
TimestampscreatedAtStringCreation date and time (ISO 8601).
updatedAtStringLast update date and time (ISO 8601).
Google ProfilegoogleUserObjectMetadata extracted from the authenticated Google account:
googleUser.nameStringFull name displayed on the Google profile.
googleUser.given_nameStringUser’s first name.
googleUser.family_nameStringUser’s last name.
googleUser.pictureURLPublic link to the Google profile photo.
googleUser.emailStringE-mail address of the authenticated Google account.
googleUser.hdStringOrganization domain (Hosted Domain, e.g., toolzz.me).
SecuritygoogleTokenStringOAuth2 token (Access/Refresh) used in API communication.
OthersdiscordPlugin[]ArrayList of linked Discord plugins (empty in this context).
telegramPlugin[]ArrayList of linked Telegram plugins (empty in this context).

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