Update Google Calendar Function
Endpoint used to update a Google Calendar function.
Request Example
Section titled “Request Example”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"}'Response Example
Section titled “Response Example”{ "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": []}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
Body Parameters
Section titled “Body Parameters”| Key | Type | Description | Required |
|---|---|---|---|
name | String | Identifier name of the tool in the system. | Yes |
description | String | Prompt that defines the rules for the AI’s use of this function. | Yes |
iconFileId | Null/UUID | File ID for a custom icon (null for default). | No |
outputs | Array | List of output variables (send [] if none). | No |
googleCalendar | Object | Technical data of the connection with the Google API: | Yes |
googleCalendar.googleId | String | Unique numeric ID of the user’s Google account. | Yes |
googleCalendar.calendarId | String | E-mail or identifier of the calendar (e.g., primary). | Yes |
googleCalendar.timezone | String | Calendar timezone (e.g., America/Sao_Paulo). | Yes |
googleCalendar.notificationContent | String | Default content for notifications of new events. | No |
googleCalendar.googleToken | String | Complete OAuth2 token for API authorization. | Yes |
googleCalendar.googleUser | Object | Profile information of the authenticated user: | Yes |
googleUser.name | String | User’s full name in Google. | Yes |
googleUser.given_name | String | User’s first name. | Yes |
googleUser.family_name | String | User’s last name. | Yes |
googleUser.picture | URL | Link to the user’s profile photo. | No |
googleUser.email | String | E-mail address of the linked account. | Yes |
googleUser.hd | String | Organization domain (Hosted Domain). | No |
type | String | Technical type of the integration (fixed: google-calendar). | Yes |
userId | UUID | Unique identifier of the user performing the action. | Yes |
unityId | UUID | Unique organizational unit identifier. | Yes |
Response description
Section titled “Response description”| Category | Key | Type | Description |
|---|---|---|---|
| General | id | UUID | Unique identifier of the plugin in the database. |
institutionId | UUID | Unique identifier of the institution owning the plugin. | |
userId | UUID | Unique identifier of the user who configured the integration. | |
unityId | UUID | Unique organizational unit identifier. | |
code | String | Technical name or internal identifier of the plugin logic. | |
description | String | Instructions (prompt) that guide the AI on how to use the function. | |
iconFileId | String | Icon file identifier (if any). | |
status | Boolean | Defines if the plugin is available in the system (true/false). | |
name | String | Friendly name of the tool (e.g., “Google Calendar”). | |
color | String | Color identifier for interface display (e.g., gray). | |
outputs | Array | List of output variables generated by the plugin (empty by default). | |
isActivated | Boolean | Indicates if the integration is active and ready for use. | |
type | String | Category of the integration (always google-calendar in this case). | |
| Instance | googleCalendarPlugin[] | Array[Obj] | List of specific calendar settings: |
googleCalendarPlugin[].id | UUID | Unique ID of this calendar instance configuration. | |
googleCalendarPlugin[].googleId | String | Unique snowflake/numeric ID of the Google account. | |
googleCalendarPlugin[].calendarId | String | Target calendar e-mail (official ID in Google Calendar). | |
googleCalendarPlugin[].timezone | String | Calendar timezone (e.g., America/Sao_Paulo). | |
googleCalendarPlugin[].pluginId | UUID | Foreign key referencing the main plugin id. | |
| Notifications | notificationType | Null/Str | Configured notification type (Push, Webhook, etc.). |
notificationContentType | Null/Str | Content type sent in the notification. | |
notificationContent | Null/Str | Fixed content or notification template. | |
notificationDelayMs | Number | Delay in milliseconds to trigger the notification. | |
notificationWaitForSpeech | Number | Waiting time for speech before proceeding (in ms). | |
| Timestamps | createdAt | String | Creation date and time (ISO 8601). |
updatedAt | String | Last update date and time (ISO 8601). | |
| Google Profile | googleUser | Object | Metadata extracted from the authenticated Google account: |
googleUser.name | String | Full name displayed on the Google profile. | |
googleUser.given_name | String | User’s first name. | |
googleUser.family_name | String | User’s last name. | |
googleUser.picture | URL | Public link to the Google profile photo. | |
googleUser.email | String | E-mail address of the authenticated Google account. | |
googleUser.hd | String | Organization domain (Hosted Domain, e.g., toolzz.me). | |
| Security | googleToken | String | OAuth2 token (Access/Refresh) used in API communication. |
| Others | discordPlugin[] | Array | List of linked Discord plugins (empty in this context). |
telegramPlugin[] | Array | List of linked Telegram plugins (empty in this context). |
Security
Section titled “Security”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:
- Log in to the ToolzzAI platform
- Click on “Settings”
- Click on “Access Token”
- Copy the access token
