/google-chat-api-management | Type: Application | PCID required: Yes
Tools
google-chat-api-management_create_custom_emoji
Creates a custom emoji. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
emojiName | string | Yes | — | Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization. Required when the custom emoji is created, output only otherwise. Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively. Example: :valid-emoji-name: |
name | string | No | — | Identifier. The resource name of the custom emoji, assigned by the server. Format: customEmojis/{customEmoji} |
payload | object | Yes | — | Payload data for the custom emoji. |
temporaryImageUri | string | No | — | Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created. |
uid | string | No | — | Output only. Unique key for the custom emoji resource. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"emojiName": {
"type": "string",
"description": "Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization. Required when the custom emoji is created, output only otherwise. Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively. Example: `:valid-emoji-name:`"
},
"name": {
"type": "string",
"description": "Identifier. The resource name of the custom emoji, assigned by the server. Format: `customEmojis/{customEmoji}`"
},
"payload": {
"type": "object",
"description": "Payload data for the custom emoji.",
"properties": {
"fileContent": {
"type": "string",
"description": "Required. Input only. The image used for the custom emoji. The payload must be under 256 KB and the dimension of the image must be square and between 64 and 500 pixels. The restrictions are subject to change."
},
"filename": {
"type": "string",
"description": "Required. Input only. The image file name. Supported file extensions: `.png`, `.jpg`, `.gif`."
}
},
"required": [
"fileContent",
"filename"
]
},
"temporaryImageUri": {
"type": "string",
"description": "Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created."
},
"uid": {
"type": "string",
"description": "Output only. Unique key for the custom emoji resource."
}
},
"required": [
"PCID",
"emojiName",
"payload"
]
}
google-chat-api-management_create_member
Creates a membership for the calling Chat app, a user, or a Google Group. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
useAdminAccess | boolean | No | — | Optional. When true, the method runs using the user’s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires the chat.admin.memberships OAuth 2.0 scope. Creating app memberships or creating memberships for users outside the administrator’s Google Workspace organization isn’t supported using admin access. |
spacesId | string | Yes | — | The ID of the spaces. |
affiliation | string | No | — | Output only. A user’s relationship to the Workspace organization that owns the space. In spaces owned by consumer accounts, the affiliation of all members is EXTERNAL. |
createTime | string | No | — | Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces. |
deleteTime | string | No | — | Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces. |
groupMember | object | No | — | A Google Group in Google Chat. |
member | object | No | — | A user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user, the output for a User resource only populates the user’s name and type. |
name | string | No | — | Identifier. Resource name of the membership, assigned by the server. Format: spaces/{space}/members/{member} |
role | string | No | — | Optional. User’s role within a Chat space, which determines their permitted actions in the space. This field can only be used as input in UpdateMembership. |
state | string | No | — | Output only. State of the membership. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"useAdminAccess": {
"type": "boolean",
"description": "Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Creating app memberships or creating memberships for users outside the administrator's Google Workspace organization isn't supported using admin access."
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
},
"affiliation": {
"type": "string",
"description": "Output only. A user's relationship to the Workspace organization that owns the space. In spaces owned by consumer accounts, the affiliation of all members is `EXTERNAL`.",
"enum": [
"AFFILIATION_UNSPECIFIED",
"INTERNAL",
"EXTERNAL",
"MANAGED_EXTERNAL"
]
},
"createTime": {
"type": "string",
"description": "Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces."
},
"deleteTime": {
"type": "string",
"description": "Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces."
},
"groupMember": {
"type": "object",
"description": "A Google Group in Google Chat.",
"properties": {
"name": {
"type": "string",
"description": "Resource name for a Google Group. Represents a [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in Cloud Identity Groups API. Format: groups/{group}"
}
}
},
"member": {
"type": "object",
"description": "A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output for a `User` resource only populates the user's `name` and `type`.",
"properties": {
"domainId": {
"type": "string",
"description": "Unique identifier of the user's Google Workspace domain."
},
"isAnonymous": {
"type": "boolean",
"description": "Output only. When `true`, the user is deleted or their profile is not visible."
},
"type": {
"type": "string",
"description": "User type.",
"enum": [
"TYPE_UNSPECIFIED",
"HUMAN",
"BOT"
]
},
"name": {
"type": "string",
"description": "Resource name for a Google Chat user. Format: `users/{user}`. `users/app` can be used as an alias for the calling app bot user. For human users, `{user}` is the same user identifier as: - the `id` for the [Person](https://developers.google.com/people/api/rest/v1/people) in the People API. For example, `users/123456789` in Chat API represents the same person as the `123456789` Person profile ID in People API. - the `id` for a [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. - the user's email address can be used as an alias for `{user}` in API requests. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can use `users/user@example.com` as an alias to reference `users/123456789`. Only the canonical resource name (for example `users/123456789`) will be returned from the API."
},
"displayName": {
"type": "string",
"description": "Output only. The user's display name."
}
}
},
"name": {
"type": "string",
"description": "Identifier. Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}`"
},
"role": {
"type": "string",
"description": "Optional. User's role within a Chat space, which determines their permitted actions in the space. This field can only be used as input in `UpdateMembership`.",
"enum": [
"MEMBERSHIP_ROLE_UNSPECIFIED",
"ROLE_MEMBER",
"ROLE_MANAGER",
"ROLE_ASSISTANT_MANAGER"
]
},
"state": {
"type": "string",
"description": "Output only. State of the membership.",
"enum": [
"MEMBERSHIP_STATE_UNSPECIFIED",
"JOINED",
"INVITED",
"NOT_A_MEMBER"
]
}
},
"required": [
"PCID",
"spacesId"
]
}
google-chat-api-management_create_space
Creates a space. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
requestId | string | No | — | Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error. |
accessSettings | object | No | — | Represents the access setting of the space. |
adminInstalled | boolean | No | — | Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging. |
createTime | string | No | — | Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when spaceType is GROUP_CHAT or SPACE. |
customer | string | No | — | Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with app authentication and SpaceType is SPACE, otherwise should not be set. In the format customers/{customer}, where customer is the id from the Admin SDK customer resource. Private apps can also use the customers/my_customer alias to create the space in the same Google Workspace organization as the app. This field isn’t populated for direct messages (DMs) or when the space is created by non-Google Workspace users. |
displayName | string | No | — | Optional. The space’s display name. Required when creating a space with a spaceType of SPACE. If you receive the error message ALREADY_EXISTS when creating a space or updating the displayName, try a different displayName. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters. |
externalUserAllowed | boolean | No | — | Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. For existing spaces, this field is output only. |
importMode | boolean | No | — | Optional. Whether this space is created in Import Mode as part of a data migration into Google Workspace. While spaces are being imported, they aren’t visible to users until the import is complete. Creating a space in Import Moderequires user authentication. |
importModeExpireTime | string | No | — | Output only. The time when the space will be automatically deleted by the system if it remains in import mode. Each space created in import mode must exit this mode before this expire time using spaces.completeImport. This field is only populated for spaces that were created with import mode. |
lastActiveTime | string | No | — | Output only. Timestamp of the last message in the space. |
membershipCount | object | No | — | Represents the count of memberships of a space, grouped into categories. |
name | string | No | — | Identifier. Resource name of the space. Format: spaces/{space} Where {space} represents the system-assigned ID for the space. You can obtain the space ID by calling the spaces.list() method or from the space URL. For example, if the space URL is https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA, the space ID is AAAAAAAAA. |
permissionSettings | object | No | — | Permission settings that you can specify when updating an existing named space. To set permission settings when creating a space, specify the PredefinedPermissionSettings field in your request. |
predefinedPermissionSettings | string | No | — | Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the PermissionSettings field. Setting predefined permission settings supports: - App authentication with administrator approval with the chat.app.spaces or chat.app.spaces.create scopes. - User authentication |
singleUserBotDm | boolean | No | — | Optional. Whether the space is a DM between a Chat app and a single human. |
spaceDetails | object | No | — | Details about the space including description and rules. |
spaceHistoryState | string | No | — | Optional. The message history state for messages and threads in this space. |
spaceThreadingState | string | No | — | Output only. The threading state in the Chat space. |
spaceType | string | Yes | — | Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage. |
spaceUri | string | No | — | Output only. The URI for a user to access the space. |
threaded | boolean | No | — | Output only. Deprecated: Use spaceThreadingState instead. Whether messages are threaded in this space. |
type | string | No | — | Output only. Deprecated: Use space_type instead. The type of a space. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"requestId": {
"type": "string",
"description": "Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error."
},
"accessSettings": {
"type": "object",
"description": "Represents the [access setting](https://support.google.com/chat/answer/11971020) of the space.",
"properties": {
"accessState": {
"type": "string",
"description": "Output only. Indicates the access state of the space.",
"enum": [
"ACCESS_STATE_UNSPECIFIED",
"PRIVATE",
"DISCOVERABLE"
]
},
"accessPermissionSettings": {
"type": "object",
"description": "Access permission settings for a space."
},
"audience": {
"type": "string",
"description": "Optional. The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience). Format: `audiences/{audience}` To use the default target audience for the Google Workspace organization, set to `audiences/default`. Reading the target audience supports: - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope. This field is not populated when using the `chat.bot` scope with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). Setting the target audience requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
}
}
},
"adminInstalled": {
"type": "boolean",
"description": "Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging."
},
"createTime": {
"type": "string",
"description": "Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`."
},
"customer": {
"type": "string",
"description": "Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and `SpaceType` is `SPACE`, otherwise should not be set. In the format `customers/{customer}`, where `customer` is the `id` from the [Admin SDK customer resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). Private apps can also use the `customers/my_customer` alias to create the space in the same Google Workspace organization as the app. This field isn't populated for direct messages (DMs) or when the space is created by non-Google Workspace users."
},
"displayName": {
"type": "string",
"description": "Optional. The space's display name. Required when [creating a space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) with a `spaceType` of `SPACE`. If you receive the error message `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters."
},
"externalUserAllowed": {
"type": "boolean",
"description": "Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. For existing spaces, this field is output only."
},
"importMode": {
"type": "boolean",
"description": "Optional. Whether this space is created in `Import Mode` as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete. Creating a space in `Import Mode`requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
},
"importModeExpireTime": {
"type": "string",
"description": "Output only. The time when the space will be automatically deleted by the system if it remains in import mode. Each space created in import mode must exit this mode before this expire time using `spaces.completeImport`. This field is only populated for spaces that were created with import mode."
},
"lastActiveTime": {
"type": "string",
"description": "Output only. Timestamp of the last message in the space."
},
"membershipCount": {
"type": "object",
"description": "Represents the count of memberships of a space, grouped into categories.",
"properties": {
"joinedGroupCount": {
"type": "integer",
"description": "Output only. Count of all groups that have directly joined the space."
},
"joinedDirectHumanUserCount": {
"type": "integer",
"description": "Output only. Count of human users that have directly joined the space, not counting users joined by having membership in a joined group."
}
}
},
"name": {
"type": "string",
"description": "Identifier. Resource name of the space. Format: `spaces/{space}` Where `{space}` represents the system-assigned ID for the space. You can obtain the space ID by calling the [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) method or from the space URL. For example, if the space URL is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID is `AAAAAAAAA`."
},
"permissionSettings": {
"type": "object",
"description": "[Permission settings](https://support.google.com/chat/answer/13340792) that you can specify when updating an existing named space. To set permission settings when creating a space, specify the `PredefinedPermissionSettings` field in your request.",
"properties": {
"useAtMentionAll": {
"type": "object",
"description": "Represents a space permission setting."
},
"manageApps": {
"type": "object",
"description": "Represents a space permission setting."
},
"modifySpaceDetails": {
"type": "object",
"description": "Represents a space permission setting."
},
"toggleHistory": {
"type": "object",
"description": "Represents a space permission setting."
},
"replyMessages": {
"type": "object",
"description": "Represents a space permission setting."
},
"manageWebhooks": {
"type": "object",
"description": "Represents a space permission setting."
},
"manageMembersAndGroups": {
"type": "object",
"description": "Represents a space permission setting."
},
"postMessages": {
"type": "object",
"description": "Represents a space permission setting."
}
}
},
"predefinedPermissionSettings": {
"type": "string",
"description": "Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the `PermissionSettings` field. Setting predefined permission settings supports: - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` or `chat.app.spaces.create` scopes. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)",
"enum": [
"PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED",
"COLLABORATION_SPACE",
"ANNOUNCEMENT_SPACE"
]
},
"singleUserBotDm": {
"type": "boolean",
"description": "Optional. Whether the space is a DM between a Chat app and a single human."
},
"spaceDetails": {
"type": "object",
"description": "Details about the space including description and rules.",
"properties": {
"description": {
"type": "string",
"description": "Optional. A description of the space. For example, describe the space's discussion topic, functional purpose, or participants. Supports up to 150 characters."
},
"guidelines": {
"type": "string",
"description": "Optional. The space's rules, expectations, and etiquette. Supports up to 5,000 characters."
}
}
},
"spaceHistoryState": {
"type": "string",
"description": "Optional. The message history state for messages and threads in this space.",
"enum": [
"HISTORY_STATE_UNSPECIFIED",
"HISTORY_OFF",
"HISTORY_ON"
]
},
"spaceThreadingState": {
"type": "string",
"description": "Output only. The threading state in the Chat space.",
"enum": [
"SPACE_THREADING_STATE_UNSPECIFIED",
"THREADED_MESSAGES",
"GROUPED_MESSAGES",
"UNTHREADED_MESSAGES"
]
},
"spaceType": {
"type": "string",
"description": "Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.",
"enum": [
"SPACE_TYPE_UNSPECIFIED",
"SPACE",
"GROUP_CHAT",
"DIRECT_MESSAGE"
]
},
"spaceUri": {
"type": "string",
"description": "Output only. The URI for a user to access the space."
},
"threaded": {
"type": "boolean",
"description": "Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space."
},
"type": {
"type": "string",
"description": "Output only. Deprecated: Use `space_type` instead. The type of a space.",
"enum": [
"TYPE_UNSPECIFIED",
"ROOM",
"DM"
]
}
},
"required": [
"PCID",
"spaceType"
]
}
google-chat-api-management_delete_custom_emoji
Deletes a custom emoji. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customEmojisId | string | Yes | — | The ID of the customEmojis. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"customEmojisId": {
"type": "string",
"description": "The ID of the customEmojis."
}
},
"required": [
"PCID",
"customEmojisId"
]
}
google-chat-api-management_delete_member
Deletes a membership. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
useAdminAccess | boolean | No | — | Optional. When true, the method runs using the user’s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires the chat.admin.memberships OAuth 2.0 scope. Deleting app memberships in a space isn’t supported using admin access. |
membersId | string | Yes | — | The ID of the members. |
spacesId | string | Yes | — | The ID of the spaces. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"useAdminAccess": {
"type": "boolean",
"description": "Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Deleting app memberships in a space isn't supported using admin access."
},
"membersId": {
"type": "string",
"description": "The ID of the members."
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
}
},
"required": [
"PCID",
"membersId",
"spacesId"
]
}
google-chat-api-management_delete_space
Deletes a named space. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
useAdminAccess | boolean | No | — | Optional. When true, the method runs using the user’s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires the chat.admin.delete OAuth 2.0 scope. |
spacesId | string | Yes | — | The ID of the spaces. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"useAdminAccess": {
"type": "boolean",
"description": "Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.delete` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes)."
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
}
},
"required": [
"PCID",
"spacesId"
]
}
google-chat-api-management_find_direct_message
Returns the existing direct message with the specified user. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Required. Resource name of the user to find direct message with. Format: users/{user}, where {user} is either the id for the person from the People API, or the id for the user in the Directory API. For example, if the People API profile ID is 123456789, you can find a direct message with that person by using users/123456789 as the name. When authenticated as a user, you can use the email as an alias for {user}. For example, users/example@gmail.com where example@gmail.com is the email of the Google Chat user. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"name": {
"type": "string",
"description": "Required. Resource name of the user to find direct message with. Format: `users/{user}`, where `{user}` is either the `id` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API profile ID is `123456789`, you can find a direct message with that person by using `users/123456789` as the `name`. When [authenticated as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can use the email as an alias for `{user}`. For example, `users/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user."
}
},
"required": [
"PCID",
"name"
]
}
google-chat-api-management_get_custom_emoji
Returns details about a custom emoji. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
customEmojisId | string | Yes | — | The ID of the customEmojis. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"customEmojisId": {
"type": "string",
"description": "The ID of the customEmojis."
}
},
"required": [
"PCID",
"customEmojisId"
]
}
google-chat-api-management_get_member
Returns details about a membership. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
useAdminAccess | boolean | No | — | Optional. When true, the method runs using the user’s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires the chat.admin.memberships or chat.admin.memberships.readonly OAuth 2.0 scopes. Getting app memberships in a space isn’t supported when using admin access. |
membersId | string | Yes | — | The ID of the members. |
spacesId | string | Yes | — | The ID of the spaces. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"useAdminAccess": {
"type": "boolean",
"description": "Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Getting app memberships in a space isn't supported when using admin access."
},
"membersId": {
"type": "string",
"description": "The ID of the members."
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
}
},
"required": [
"PCID",
"membersId",
"spacesId"
]
}
google-chat-api-management_get_space
Returns details about a space. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
useAdminAccess | boolean | No | — | Optional. When true, the method runs using the user’s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires the chat.admin.spaces or chat.admin.spaces.readonly OAuth 2.0 scopes. |
spacesId | string | Yes | — | The ID of the spaces. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"useAdminAccess": {
"type": "boolean",
"description": "Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes)."
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
}
},
"required": [
"PCID",
"spacesId"
]
}
google-chat-api-management_get_space_event
Returns an event from a Google Chat space. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
spaceEventsId | string | Yes | — | The ID of the spaceEvents. |
spacesId | string | Yes | — | The ID of the spaces. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"spaceEventsId": {
"type": "string",
"description": "The ID of the spaceEvents."
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
}
},
"required": [
"PCID",
"spaceEventsId",
"spacesId"
]
}
google-chat-api-management_list_custom_emojis
Lists custom emojis visible to the authenticated user. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pageSize | integer | No | — | Optional. The maximum number of custom emojis returned. The service can return fewer custom emojis than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200. |
filter | string | No | — | Optional. A query filter. Supports filtering by creator. To filter by creator, you must specify a valid value. Currently only creator("users/me") and NOT creator("users/me") are accepted to filter custom emojis by whether they were created by the calling user or not. For example, the following query returns custom emojis created by the caller: creator("users/me") Invalid queries are rejected with an INVALID_ARGUMENT error. |
pageToken | string | No | — | Optional. (If resuming from a previous query.) A page token received from a previous list custom emoji call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"pageSize": {
"type": "integer",
"description": "Optional. The maximum number of custom emojis returned. The service can return fewer custom emojis than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200."
},
"filter": {
"type": "string",
"description": "Optional. A query filter. Supports filtering by creator. To filter by creator, you must specify a valid value. Currently only `creator(\"users/me\")` and `NOT creator(\"users/me\")` are accepted to filter custom emojis by whether they were created by the calling user or not. For example, the following query returns custom emojis created by the caller: ``` creator(\"users/me\") ``` Invalid queries are rejected with an `INVALID_ARGUMENT` error."
},
"pageToken": {
"type": "string",
"description": "Optional. (If resuming from a previous query.) A page token received from a previous list custom emoji call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results."
}
},
"required": [
"PCID"
]
}
google-chat-api-management_list_members
Lists memberships in a space. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
filter | string | No | — | Optional. A query filter. You can filter memberships by a member’s role (role) and type (member.type). To filter by role, set role to ROLE_MEMBER or ROLE_MANAGER. To filter by type, set member.type to HUMAN or BOT. You can also filter for member.type using the != operator. To filter by both role and type, use the AND operator. To filter by either role or type, use the OR operator. Either member.type = "HUMAN" or member.type != "BOT" is required when use_admin_access is set to true. Other member type filters will be rejected. For example, the following queries are valid: role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" member.type = "HUMAN" AND role = "ROLE_MANAGER" member.type != "BOT" The following queries are invalid: member.type = "HUMAN" AND member.type = "BOT" role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" Invalid queries are rejected by the server with an INVALID_ARGUMENT error. |
pageSize | integer | No | — | Optional. The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000. If you use a value more than 1000, it’s automatically changed to 1000. Negative values return an INVALID_ARGUMENT error. |
showInvited | boolean | No | — | Optional. When true, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don’t match the filter criteria aren’t returned. Currently requires user authentication. |
pageToken | string | No | — | Optional. A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. |
showGroups | boolean | No | — | Optional. When true, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memberships that don’t match the filter criteria aren’t returned. |
useAdminAccess | boolean | No | — | Optional. When true, the method runs using the user’s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires either the chat.admin.memberships.readonly or chat.admin.memberships OAuth 2.0 scope. Listing app memberships in a space isn’t supported when using admin access. |
spacesId | string | Yes | — | The ID of the spaces. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"filter": {
"type": "string",
"description": "Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also filter for `member.type` using the `!=` operator. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. Either `member.type = \"HUMAN\"` or `member.type != \"BOT\"` is required when `use_admin_access` is set to true. Other member type filters will be rejected. For example, the following queries are valid: ``` role = \"ROLE_MANAGER\" OR role = \"ROLE_MEMBER\" member.type = \"HUMAN\" AND role = \"ROLE_MANAGER\" member.type != \"BOT\" ``` The following queries are invalid: ``` member.type = \"HUMAN\" AND member.type = \"BOT\" role = \"ROLE_MANAGER\" AND role = \"ROLE_MEMBER\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error."
},
"pageSize": {
"type": "integer",
"description": "Optional. The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error."
},
"showInvited": {
"type": "boolean",
"description": "Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
},
"pageToken": {
"type": "string",
"description": "Optional. A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results."
},
"showGroups": {
"type": "boolean",
"description": "Optional. When `true`, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memberships that don't match the filter criteria aren't returned."
},
"useAdminAccess": {
"type": "boolean",
"description": "Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.memberships.readonly` or `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Listing app memberships in a space isn't supported when using admin access."
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
}
},
"required": [
"PCID",
"spacesId"
]
}
google-chat-api-management_list_space_events
Lists events from a Google Chat space. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
filter | string | Yes | — | Required. A query filter. You must specify at least one event type (event_type) using the has : operator. To filter by multiple event types, use the OR operator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions (google.workspace.chat.reaction.v1.created), the server also returns batch new reactions events (google.workspace.chat.reaction.v1.batchCreated). For a list of supported event types, see the SpaceEvents reference documentation. Optionally, you can also filter by start time (start_time) and end time (end_time): * start_time: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days. * end_time: Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request. To specify a start or end time, use the equals = operator and format in RFC-3339. To filter by both start_time and end_time, use the AND operator. For example, the following queries are valid: start_time="2023-08-23T19:20:33+00:00" AND end_time="2023-08-23T19:21:54+00:00" start_time="2023-08-23T19:20:33+00:00" AND (event_types:"google.workspace.chat.space.v1.updated" OR event_types:"google.workspace.chat.message.v1.created") The following queries are invalid: start_time="2023-08-23T19:20:33+00:00" OR end_time="2023-08-23T19:21:54+00:00" event_types:"google.workspace.chat.space.v1.updated" AND event_types:"google.workspace.chat.message.v1.created" Invalid queries are rejected by the server with an INVALID_ARGUMENT error. |
pageSize | integer | No | — | Optional. The maximum number of space events returned. The service might return fewer than this value. Negative values return an INVALID_ARGUMENT error. |
pageToken | string | No | — | Optional. A page token, received from a previous list space events call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to list space events must match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. |
spacesId | string | Yes | — | The ID of the spaces. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"filter": {
"type": "string",
"description": "Required. A query filter. You must specify at least one event type (`event_type`) using the has `:` operator. To filter by multiple event types, use the `OR` operator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions (`google.workspace.chat.reaction.v1.created`), the server also returns batch new reactions events (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported event types, see the [`SpaceEvents` reference documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). Optionally, you can also filter by start time (`start_time`) and end time (`end_time`): * `start_time`: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days. * `end_time`: Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request. To specify a start or end time, use the equals `=` operator and format in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both `start_time` and `end_time`, use the `AND` operator. For example, the following queries are valid: ``` start_time=\"2023-08-23T19:20:33+00:00\" AND end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` start_time=\"2023-08-23T19:20:33+00:00\" AND (event_types:\"google.workspace.chat.space.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\") ``` The following queries are invalid: ``` start_time=\"2023-08-23T19:20:33+00:00\" OR end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` event_types:\"google.workspace.chat.space.v1.updated\" AND event_types:\"google.workspace.chat.message.v1.created\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error."
},
"pageSize": {
"type": "integer",
"description": "Optional. The maximum number of space events returned. The service might return fewer than this value. Negative values return an `INVALID_ARGUMENT` error."
},
"pageToken": {
"type": "string",
"description": "Optional. A page token, received from a previous list space events call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to list space events must match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results."
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
}
},
"required": [
"PCID",
"filter",
"spacesId"
]
}
google-chat-api-management_list_spaces
Lists spaces the caller is a member of. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pageToken | string | No | — | Optional. A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results. |
filter | string | No | — | Optional. A query filter. You can filter spaces by the space type (space_type). To filter by space type, you must specify valid enum value, such as SPACE or GROUP_CHAT (the space_type can’t be SPACE_TYPE_UNSPECIFIED). To query for multiple space types, use the OR operator. For example, the following queries are valid: space_type = "SPACE" spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" Invalid queries are rejected by the server with an INVALID_ARGUMENT error. |
pageSize | integer | No | — | Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it’s automatically changed to 1000. Negative values return an INVALID_ARGUMENT error. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"pageToken": {
"type": "string",
"description": "Optional. A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results."
},
"filter": {
"type": "string",
"description": "Optional. A query filter. You can filter spaces by the space type ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). To filter by space type, you must specify valid enum value, such as `SPACE` or `GROUP_CHAT` (the `space_type` can't be `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` operator. For example, the following queries are valid: ``` space_type = \"SPACE\" spaceType = \"GROUP_CHAT\" OR spaceType = \"DIRECT_MESSAGE\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error."
},
"pageSize": {
"type": "integer",
"description": "Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error."
}
},
"required": [
"PCID"
]
}
google-chat-api-management_search_spaces
Returns a list of spaces in a Google Workspace organization. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
useAdminAccess | boolean | No | — | When true, the method runs using the user’s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires either the chat.admin.spaces.readonly or chat.admin.spaces OAuth 2.0 scope. Setting use_admin_access to false is available under Developer Preview. Developer Preview. |
pageToken | string | No | — | A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. |
query | string | Yes | — | Required. A search query. You can search by using the following parameters when useAdminAccess is set to true: - create_time - customer - display_name - external_user_allowed - last_active_time - space_history_state - space_type When useAdminAccess is set to false: - display_name - external_user_allowed - space_type create_time and last_active_time accept a timestamp in RFC-3339 format and the supported comparison operators are: =, <, >, <=, >=. customer is required when useAdminAccess is set to true, and is used to indicate which customer to fetch spaces from. customers/my_customer is the only supported value. display_name only accepts the HAS (:) operator. The text to match is first tokenized into tokens and each token is prefix-matched case-insensitively and independently as a substring anywhere in the space’s display_name. For example, Fun Eve matches Fun event or The evening was fun, but not notFun event or even. When useAdminAccess is set to false, display_name is required to retrieve meaningful results. Otherwise, the default behavior is to return an empty response. external_user_allowed accepts either true or false. space_history_state only accepts values from the [historyState] (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) field of a space resource. space_type is required and the only valid value is SPACE. Across different fields, only AND operators are supported. A valid example is space_type = "SPACE" AND display_name:"Hello" and an invalid example is space_type = "SPACE" OR display_name:"Hello". Among the same field, space_type doesn’t support AND or OR operators. display_name, ‘space_history_state’, and ‘external_user_allowed’ only support OR operators. last_active_time and create_time support both AND and OR operators. AND can only be used to represent an interval, such as last_active_time < "2022-01-01T00:00:00+00:00" AND last_active_time > "2023-01-01T00:00:00+00:00". The following example queries are valid when useAdminAccess is set to true: customer = "customers/my_customer" AND space_type = "SPACE" customer = "customers/my_customer" AND space_type = "SPACE" AND display_name:"Hello World" customer = "customers/my_customer" AND space_type = "SPACE" AND (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > "2022-01-01T00:00:00+00:00") customer = "customers/my_customer" AND space_type = "SPACE" AND (display_name:"Hello World" OR display_name:"Fun event") AND (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < "2022-01-01T00:00:00+00:00") customer = "customers/my_customer" AND space_type = "SPACE" AND (create_time > "2019-01-01T00:00:00+00:00" AND create_time < "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") The following example queries are valid when useAdminAccess is set to false: display_name:"Hello World" AND space_type = "SPACE" (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE" (external_user_allowed = "true" AND space_type = "SPACE") // Returns an empty response. (external_user_allowed = "true" AND display_name:"Hello" AND space_type = "SPACE") |
orderBy | string | No | — | Optional. How the list of spaces is ordered. Supported attributes to order by are: - membership_count.joined_direct_human_user_count — Denotes the count of human users that have directly joined a space. - last_active_time — Denotes the time when last eligible item is added to any topic of this space. - create_time — Denotes the time of the space creation. When useAdminAccess is false, only create_time and relevance are supported for ordering. Only DESC is supported for these fields in non-admin searches. Valid ordering operation values are: - ASC for ascending. Default value. - DESC for descending. The supported syntax are when useAdminAccess is set to true: - membership_count.joined_direct_human_user_count DESC - membership_count.joined_direct_human_user_count ASC - last_active_time DESC - last_active_time ASC - create_time DESC - create_time ASC When useAdminAccess is set to false: - create_time DESC - relevance DESC |
pageSize | integer | No | — | The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it’s automatically changed to 1000. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"useAdminAccess": {
"type": "boolean",
"description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Setting `use_admin_access` to `false` is available under Developer Preview. [Developer Preview](https://developers.google.com/workspace/preview)."
},
"pageToken": {
"type": "string",
"description": "A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results."
},
"query": {
"type": "string",
"description": "Required. A search query. You can search by using the following parameters when `useAdminAccess` is set to `true`: - `create_time` - `customer` - `display_name` - `external_user_allowed` - `last_active_time` - `space_history_state` - `space_type` When `useAdminAccess` is set to `false`: - `display_name` - `external_user_allowed` - `space_type` `create_time` and `last_active_time` accept a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported comparison operators are: `=`, `<`, `>`, `<=`, `>=`. `customer` is required when `useAdminAccess` is set to `true`, and is used to indicate which customer to fetch spaces from. `customers/my_customer` is the only supported value. `display_name` only accepts the `HAS` (`:`) operator. The text to match is first tokenized into tokens and each token is prefix-matched case-insensitively and independently as a substring anywhere in the space's `display_name`. For example, `Fun Eve` matches `Fun event` or `The evening was fun`, but not `notFun event` or `even`. When `useAdminAccess` is set to `false`, `display_name` is required to retrieve meaningful results. Otherwise, the default behavior is to return an empty response. `external_user_allowed` accepts either `true` or `false`. `space_history_state` only accepts values from the [`historyState`] (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) field of a `space` resource. `space_type` is required and the only valid value is `SPACE`. Across different fields, only `AND` operators are supported. A valid example is `space_type = \"SPACE\" AND display_name:\"Hello\"` and an invalid example is `space_type = \"SPACE\" OR display_name:\"Hello\"`. Among the same field, `space_type` doesn't support `AND` or `OR` operators. `display_name`, 'space_history_state', and 'external_user_allowed' only support `OR` operators. `last_active_time` and `create_time` support both `AND` and `OR` operators. `AND` can only be used to represent an interval, such as `last_active_time < \"2022-01-01T00:00:00+00:00\" AND last_active_time > \"2023-01-01T00:00:00+00:00\"`. The following example queries are valid when `useAdminAccess` is set to `true`: ``` customer = \"customers/my_customer\" AND space_type = \"SPACE\" customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND display_name:\"Hello World\" customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND (last_active_time < \"2020-01-01T00:00:00+00:00\" OR last_active_time > \"2022-01-01T00:00:00+00:00\") customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND (display_name:\"Hello World\" OR display_name:\"Fun event\") AND (last_active_time > \"2020-01-01T00:00:00+00:00\" AND last_active_time < \"2022-01-01T00:00:00+00:00\") customer = \"customers/my_customer\" AND space_type = \"SPACE\" AND (create_time > \"2019-01-01T00:00:00+00:00\" AND create_time < \"2020-01-01T00:00:00+00:00\") AND (external_user_allowed = \"true\") AND (space_history_state = \"HISTORY_ON\" OR space_history_state = \"HISTORY_OFF\") ``` The following example queries are valid when `useAdminAccess` is set to `false`: ``` display_name:\"Hello World\" AND space_type = \"SPACE\" (display_name:\"Hello\" OR display_name:\"Fun\") AND space_type = \"SPACE\" (external_user_allowed = \"true\" AND space_type = \"SPACE\") // Returns an empty response. (external_user_allowed = \"true\" AND display_name:\"Hello\" AND space_type = \"SPACE\") ```"
},
"orderBy": {
"type": "string",
"description": "Optional. How the list of spaces is ordered. Supported attributes to order by are: - `membership_count.joined_direct_human_user_count` — Denotes the count of human users that have directly joined a space. - `last_active_time` — Denotes the time when last eligible item is added to any topic of this space. - `create_time` — Denotes the time of the space creation. When `useAdminAccess` is `false`, only `create_time` and `relevance` are supported for ordering. Only `DESC` is supported for these fields in non-admin searches. Valid ordering operation values are: - `ASC` for ascending. Default value. - `DESC` for descending. The supported syntax are when `useAdminAccess` is set to `true`: - `membership_count.joined_direct_human_user_count DESC` - `membership_count.joined_direct_human_user_count ASC` - `last_active_time DESC` - `last_active_time ASC` - `create_time DESC` - `create_time ASC` When `useAdminAccess` is set to `false`: - `create_time DESC` - `relevance DESC`"
},
"pageSize": {
"type": "integer",
"description": "The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000."
}
},
"required": [
"PCID",
"query"
]
}
google-chat-api-management_setup_space
Creates a space and adds specified users to it. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
memberships | object[] | No | — | Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 49 memberships (in addition to the caller). For human membership, the Membership.member field must contain a user with name populated (format: users/{user}) and type set to User.Type.HUMAN. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user’s email as an alias for {user}. For example, the user.name can be users/example@gmail.com. To invite Gmail users or users from external Google Workspace domains, user’s email must be used for {user}. For Google group membership, the Membership.group_member field must contain a group with name populated (format groups/{group}). You can only add Google groups when setting Space.spaceType to SPACE. Optional when setting Space.spaceType to SPACE. Required when setting Space.spaceType to GROUP_CHAT, along with at least two memberships. Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true). |
requestId | string | No | — | Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error. |
space | object | Yes | — | A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"memberships": {
"type": "array",
"items": {
"type": "object",
"properties": {
"deleteTime": {
"type": "string",
"format": "date-time",
"description": "Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces."
},
"state": {
"type": "string",
"enum": [
"MEMBERSHIP_STATE_UNSPECIFIED",
"JOINED",
"INVITED",
"NOT_A_MEMBER"
],
"description": "Output only. State of the membership."
},
"createTime": {
"type": "string",
"format": "date-time",
"description": "Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces."
},
"role": {
"type": "string",
"enum": [
"MEMBERSHIP_ROLE_UNSPECIFIED",
"ROLE_MEMBER",
"ROLE_MANAGER",
"ROLE_ASSISTANT_MANAGER"
],
"description": "Optional. User's role within a Chat space, which determines their permitted actions in the space. This field can only be used as input in `UpdateMembership`."
},
"affiliation": {
"type": "string",
"enum": [
"AFFILIATION_UNSPECIFIED",
"INTERNAL",
"EXTERNAL",
"MANAGED_EXTERNAL"
],
"description": "Output only. A user's relationship to the Workspace organization that owns the space. In spaces owned by consumer accounts, the affiliation of all members is `EXTERNAL`."
},
"name": {
"type": "string",
"description": "Identifier. Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}`"
},
"member": {
"type": "object",
"description": "A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output for a `User` resource only populates the user's `name` and `type`."
},
"groupMember": {
"type": "object",
"description": "A Google Group in Google Chat."
}
}
},
"description": "Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 49 memberships (in addition to the caller). For human membership, the `Membership.member` field must contain a `user` with `name` populated (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the `user.name` can be `users/example@gmail.com`. To invite Gmail users or users from external Google Workspace domains, user's email must be used for `{user}`. For Google group membership, the `Membership.group_member` field must contain a `group` with `name` populated (format `groups/{group}`). You can only add Google groups when setting `Space.spaceType` to `SPACE`. Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`)."
},
"requestId": {
"type": "string",
"description": "Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error."
},
"space": {
"type": "object",
"description": "A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.",
"properties": {
"singleUserBotDm": {
"type": "boolean",
"description": "Optional. Whether the space is a DM between a Chat app and a single human."
},
"type": {
"type": "string",
"description": "Output only. Deprecated: Use `space_type` instead. The type of a space.",
"enum": [
"TYPE_UNSPECIFIED",
"ROOM",
"DM"
]
},
"accessSettings": {
"type": "object",
"description": "Represents the [access setting](https://support.google.com/chat/answer/11971020) of the space."
},
"predefinedPermissionSettings": {
"type": "string",
"description": "Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the `PermissionSettings` field. Setting predefined permission settings supports: - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` or `chat.app.spaces.create` scopes. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)",
"enum": [
"PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED",
"COLLABORATION_SPACE",
"ANNOUNCEMENT_SPACE"
]
},
"adminInstalled": {
"type": "boolean",
"description": "Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging."
},
"spaceThreadingState": {
"type": "string",
"description": "Output only. The threading state in the Chat space.",
"enum": [
"SPACE_THREADING_STATE_UNSPECIFIED",
"THREADED_MESSAGES",
"GROUPED_MESSAGES",
"UNTHREADED_MESSAGES"
]
},
"lastActiveTime": {
"type": "string",
"description": "Output only. Timestamp of the last message in the space."
},
"spaceUri": {
"type": "string",
"description": "Output only. The URI for a user to access the space."
},
"permissionSettings": {
"type": "object",
"description": "[Permission settings](https://support.google.com/chat/answer/13340792) that you can specify when updating an existing named space. To set permission settings when creating a space, specify the `PredefinedPermissionSettings` field in your request."
},
"importModeExpireTime": {
"type": "string",
"description": "Output only. The time when the space will be automatically deleted by the system if it remains in import mode. Each space created in import mode must exit this mode before this expire time using `spaces.completeImport`. This field is only populated for spaces that were created with import mode."
},
"displayName": {
"type": "string",
"description": "Optional. The space's display name. Required when [creating a space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) with a `spaceType` of `SPACE`. If you receive the error message `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters."
},
"createTime": {
"type": "string",
"description": "Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`."
},
"customer": {
"type": "string",
"description": "Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and `SpaceType` is `SPACE`, otherwise should not be set. In the format `customers/{customer}`, where `customer` is the `id` from the [Admin SDK customer resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). Private apps can also use the `customers/my_customer` alias to create the space in the same Google Workspace organization as the app. This field isn't populated for direct messages (DMs) or when the space is created by non-Google Workspace users."
},
"spaceType": {
"type": "string",
"description": "Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.",
"enum": [
"SPACE_TYPE_UNSPECIFIED",
"SPACE",
"GROUP_CHAT",
"DIRECT_MESSAGE"
]
},
"importMode": {
"type": "boolean",
"description": "Optional. Whether this space is created in `Import Mode` as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete. Creating a space in `Import Mode`requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
},
"name": {
"type": "string",
"description": "Identifier. Resource name of the space. Format: `spaces/{space}` Where `{space}` represents the system-assigned ID for the space. You can obtain the space ID by calling the [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) method or from the space URL. For example, if the space URL is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID is `AAAAAAAAA`."
},
"spaceDetails": {
"type": "object",
"description": "Details about the space including description and rules."
},
"externalUserAllowed": {
"type": "boolean",
"description": "Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. For existing spaces, this field is output only."
},
"membershipCount": {
"type": "object",
"description": "Represents the count of memberships of a space, grouped into categories."
},
"spaceHistoryState": {
"type": "string",
"description": "Optional. The message history state for messages and threads in this space.",
"enum": [
"HISTORY_STATE_UNSPECIFIED",
"HISTORY_OFF",
"HISTORY_ON"
]
},
"threaded": {
"type": "boolean",
"description": "Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space."
}
}
}
},
"required": [
"PCID",
"space"
]
}
google-chat-api-management_update_member
Updates a membership. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
useAdminAccess | boolean | No | — | Optional. When true, the method runs using the user’s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires the chat.admin.memberships OAuth 2.0 scope. |
updateMask | string | Yes | — | Required. The field paths to update. Separate multiple values with commas or use * to update all field paths. Currently supported field paths: - role |
membersId | string | Yes | — | The ID of the members. |
spacesId | string | Yes | — | The ID of the spaces. |
affiliation | string | No | — | Output only. A user’s relationship to the Workspace organization that owns the space. In spaces owned by consumer accounts, the affiliation of all members is EXTERNAL. |
createTime | string | No | — | Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces. |
deleteTime | string | No | — | Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces. |
groupMember | object | No | — | A Google Group in Google Chat. |
member | object | No | — | A user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user, the output for a User resource only populates the user’s name and type. |
name | string | No | — | Identifier. Resource name of the membership, assigned by the server. Format: spaces/{space}/members/{member} |
role | string | No | — | Optional. User’s role within a Chat space, which determines their permitted actions in the space. This field can only be used as input in UpdateMembership. |
state | string | No | — | Output only. State of the membership. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"useAdminAccess": {
"type": "boolean",
"description": "Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes)."
},
"updateMask": {
"type": "string",
"description": "Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `role`"
},
"membersId": {
"type": "string",
"description": "The ID of the members."
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
},
"affiliation": {
"type": "string",
"description": "Output only. A user's relationship to the Workspace organization that owns the space. In spaces owned by consumer accounts, the affiliation of all members is `EXTERNAL`.",
"enum": [
"AFFILIATION_UNSPECIFIED",
"INTERNAL",
"EXTERNAL",
"MANAGED_EXTERNAL"
]
},
"createTime": {
"type": "string",
"description": "Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces."
},
"deleteTime": {
"type": "string",
"description": "Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces."
},
"groupMember": {
"type": "object",
"description": "A Google Group in Google Chat.",
"properties": {
"name": {
"type": "string",
"description": "Resource name for a Google Group. Represents a [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in Cloud Identity Groups API. Format: groups/{group}"
}
}
},
"member": {
"type": "object",
"description": "A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output for a `User` resource only populates the user's `name` and `type`.",
"properties": {
"domainId": {
"type": "string",
"description": "Unique identifier of the user's Google Workspace domain."
},
"isAnonymous": {
"type": "boolean",
"description": "Output only. When `true`, the user is deleted or their profile is not visible."
},
"type": {
"type": "string",
"description": "User type.",
"enum": [
"TYPE_UNSPECIFIED",
"HUMAN",
"BOT"
]
},
"name": {
"type": "string",
"description": "Resource name for a Google Chat user. Format: `users/{user}`. `users/app` can be used as an alias for the calling app bot user. For human users, `{user}` is the same user identifier as: - the `id` for the [Person](https://developers.google.com/people/api/rest/v1/people) in the People API. For example, `users/123456789` in Chat API represents the same person as the `123456789` Person profile ID in People API. - the `id` for a [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. - the user's email address can be used as an alias for `{user}` in API requests. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can use `users/user@example.com` as an alias to reference `users/123456789`. Only the canonical resource name (for example `users/123456789`) will be returned from the API."
},
"displayName": {
"type": "string",
"description": "Output only. The user's display name."
}
}
},
"name": {
"type": "string",
"description": "Identifier. Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}`"
},
"role": {
"type": "string",
"description": "Optional. User's role within a Chat space, which determines their permitted actions in the space. This field can only be used as input in `UpdateMembership`.",
"enum": [
"MEMBERSHIP_ROLE_UNSPECIFIED",
"ROLE_MEMBER",
"ROLE_MANAGER",
"ROLE_ASSISTANT_MANAGER"
]
},
"state": {
"type": "string",
"description": "Output only. State of the membership.",
"enum": [
"MEMBERSHIP_STATE_UNSPECIFIED",
"JOINED",
"INVITED",
"NOT_A_MEMBER"
]
}
},
"required": [
"PCID",
"updateMask",
"membersId",
"spacesId"
]
}
google-chat-api-management_update_space
Updates a space. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
useAdminAccess | boolean | No | — | Optional. When true, the method runs using the user’s Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege. Requires the chat.admin.spaces OAuth 2.0 scope. Some FieldMask values are not supported using admin access. For details, see the description of update_mask. |
updateMask | string | Yes | — | Required. The updated field paths, comma separated if there are multiple. You can update the following fields for a space: space_details: Updates the space’s description and guidelines. You must pass both description and guidelines in the update request as SpaceDetails. If you only want to update one of the fields, pass the existing value for the other field. display_name: Only supports updating the display name for spaces where spaceType field is SPACE. If you receive the error message ALREADY_EXISTS, try a different value. An existing space within the Google Workspace organization might already use this display name. space_type: Only supports changing a GROUP_CHAT space type to SPACE. Include display_name together with space_type in the update mask and ensure that the specified space has a non-empty display name and the SPACE space type. Including the space_type mask and the SPACE type in the specified space when updating the display name is optional if the existing space already has the SPACE type. Trying to update the space type in other ways results in an invalid argument error. space_type is not supported with useAdminAccess. space_history_state: Updates space history settings by turning history on or off for the space. Only supported if history settings are enabled for the Google Workspace organization. To update the space history state, you must omit all other field masks in your request. space_history_state is not supported with useAdminAccess. access_settings.audience: Updates the access setting of who can discover the space, join the space, and preview the messages in named space where spaceType field is SPACE. If the existing space has a target audience, you can remove the audience and restrict space access by omitting a value for this field mask. To update access settings for a space, the authenticating user must be a space manager and omit all other field masks in your request. You can’t update this field if the space is in import mode. To learn more, see Make a space discoverable to specific users. access_settings.audience is not supported with useAdminAccess. access_settings.access_permission_settings: Updates the access permission settings of who can discover and join the space where spaceType field is SPACE. Principals allowed to join the space must also be allowed to discover it. To update access permission settings for a space, the authenticating user must be a space manager or assistant manager and omit all other field masks in the request. You can’t update this field if the space is in import mode. To learn more, see Make a space discoverable to specific users. access_settings.access_permission_settings is not supported with useAdminAccess. The supported field masks include: - access_settings.access_permission_settings.discoverSpaceSetting - access_settings.access_permission_settings.joinSpaceSetting permission_settings: Supports changing the permission settings of a space. When updating permission settings, you can only specify permissionSettings field masks; you cannot update other field masks at the same time. The supported field masks include: - permission_settings.manageMembersAndGroups - permission_settings.modifySpaceDetails - permission_settings.toggleHistory - permission_settings.useAtMentionAll - permission_settings.manageApps - permission_settings.manageWebhooks - permission_settings.replyMessages |
spacesId | string | Yes | — | The ID of the spaces. |
accessSettings | object | No | — | Represents the access setting of the space. |
adminInstalled | boolean | No | — | Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging. |
createTime | string | No | — | Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when spaceType is GROUP_CHAT or SPACE. |
customer | string | No | — | Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with app authentication and SpaceType is SPACE, otherwise should not be set. In the format customers/{customer}, where customer is the id from the Admin SDK customer resource. Private apps can also use the customers/my_customer alias to create the space in the same Google Workspace organization as the app. This field isn’t populated for direct messages (DMs) or when the space is created by non-Google Workspace users. |
displayName | string | No | — | Optional. The space’s display name. Required when creating a space with a spaceType of SPACE. If you receive the error message ALREADY_EXISTS when creating a space or updating the displayName, try a different displayName. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters. |
externalUserAllowed | boolean | No | — | Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. For existing spaces, this field is output only. |
importMode | boolean | No | — | Optional. Whether this space is created in Import Mode as part of a data migration into Google Workspace. While spaces are being imported, they aren’t visible to users until the import is complete. Creating a space in Import Moderequires user authentication. |
importModeExpireTime | string | No | — | Output only. The time when the space will be automatically deleted by the system if it remains in import mode. Each space created in import mode must exit this mode before this expire time using spaces.completeImport. This field is only populated for spaces that were created with import mode. |
lastActiveTime | string | No | — | Output only. Timestamp of the last message in the space. |
membershipCount | object | No | — | Represents the count of memberships of a space, grouped into categories. |
name | string | No | — | Identifier. Resource name of the space. Format: spaces/{space} Where {space} represents the system-assigned ID for the space. You can obtain the space ID by calling the spaces.list() method or from the space URL. For example, if the space URL is https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA, the space ID is AAAAAAAAA. |
permissionSettings | object | No | — | Permission settings that you can specify when updating an existing named space. To set permission settings when creating a space, specify the PredefinedPermissionSettings field in your request. |
predefinedPermissionSettings | string | No | — | Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the PermissionSettings field. Setting predefined permission settings supports: - App authentication with administrator approval with the chat.app.spaces or chat.app.spaces.create scopes. - User authentication |
singleUserBotDm | boolean | No | — | Optional. Whether the space is a DM between a Chat app and a single human. |
spaceDetails | object | No | — | Details about the space including description and rules. |
spaceHistoryState | string | No | — | Optional. The message history state for messages and threads in this space. |
spaceThreadingState | string | No | — | Output only. The threading state in the Chat space. |
spaceType | string | No | — | Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage. |
spaceUri | string | No | — | Output only. The URI for a user to access the space. |
threaded | boolean | No | — | Output only. Deprecated: Use spaceThreadingState instead. Whether messages are threaded in this space. |
type | string | No | — | Output only. Deprecated: Use space_type instead. The type of a space. |
Show inputSchema
Show inputSchema
{
"type": "object",
"properties": {
"PCID": {
"type": "string",
"description": "Pink Connect ID for the authenticated connection"
},
"useAdminAccess": {
"type": "boolean",
"description": "Optional. When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Some `FieldMask` values are not supported using admin access. For details, see the description of `update_mask`."
},
"updateMask": {
"type": "string",
"description": "Required. The updated field paths, comma separated if there are multiple. You can update the following fields for a space: `space_details`: Updates the space's description and guidelines. You must pass both description and guidelines in the update request as `SpaceDetails`. If you only want to update one of the fields, pass the existing value for the other field. `display_name`: Only supports updating the display name for spaces where `spaceType` field is `SPACE`. If you receive the error message `ALREADY_EXISTS`, try a different value. An existing space within the Google Workspace organization might already use this display name. `space_type`: Only supports changing a `GROUP_CHAT` space type to `SPACE`. Include `display_name` together with `space_type` in the update mask and ensure that the specified space has a non-empty display name and the `SPACE` space type. Including the `space_type` mask and the `SPACE` type in the specified space when updating the display name is optional if the existing space already has the `SPACE` type. Trying to update the space type in other ways results in an invalid argument error. `space_type` is not supported with `useAdminAccess`. `space_history_state`: Updates [space history settings](https://support.google.com/chat/answer/7664687) by turning history on or off for the space. Only supported if history settings are enabled for the Google Workspace organization. To update the space history state, you must omit all other field masks in your request. `space_history_state` is not supported with `useAdminAccess`. `access_settings.audience`: Updates the [access setting](https://support.google.com/chat/answer/11971020) of who can discover the space, join the space, and preview the messages in named space where `spaceType` field is `SPACE`. If the existing space has a target audience, you can remove the audience and restrict space access by omitting a value for this field mask. To update access settings for a space, the authenticating user must be a space manager and omit all other field masks in your request. You can't update this field if the space is in [import mode](https://developers.google.com/workspace/chat/import-data-overview). To learn more, see [Make a space discoverable to specific users](https://developers.google.com/workspace/chat/space-target-audience). `access_settings.audience` is not supported with `useAdminAccess`. `access_settings.access_permission_settings`: Updates the [access permission settings](https://support.google.com/chat/answer/11971020) of who can discover and join the space where `spaceType` field is `SPACE`. Principals allowed to join the space must also be allowed to discover it. To update access permission settings for a space, the authenticating user must be a space manager or assistant manager and omit all other field masks in the request. You can't update this field if the space is in [import mode](https://developers.google.com/workspace/chat/import-data-overview). To learn more, see [Make a space discoverable to specific users](https://developers.google.com/workspace/chat/space-target-audience). `access_settings.access_permission_settings` is not supported with `useAdminAccess`. The supported field masks include: - `access_settings.access_permission_settings.discoverSpaceSetting` - `access_settings.access_permission_settings.joinSpaceSetting` `permission_settings`: Supports changing the [permission settings](https://support.google.com/chat/answer/13340792) of a space. When updating permission settings, you can only specify `permissionSettings` field masks; you cannot update other field masks at the same time. The supported field masks include: - `permission_settings.manageMembersAndGroups` - `permission_settings.modifySpaceDetails` - `permission_settings.toggleHistory` - `permission_settings.useAtMentionAll` - `permission_settings.manageApps` - `permission_settings.manageWebhooks` - `permission_settings.replyMessages`"
},
"spacesId": {
"type": "string",
"description": "The ID of the spaces."
},
"accessSettings": {
"type": "object",
"description": "Represents the [access setting](https://support.google.com/chat/answer/11971020) of the space.",
"properties": {
"accessState": {
"type": "string",
"description": "Output only. Indicates the access state of the space.",
"enum": [
"ACCESS_STATE_UNSPECIFIED",
"PRIVATE",
"DISCOVERABLE"
]
},
"accessPermissionSettings": {
"type": "object",
"description": "Access permission settings for a space."
},
"audience": {
"type": "string",
"description": "Optional. The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience). Format: `audiences/{audience}` To use the default target audience for the Google Workspace organization, set to `audiences/default`. Reading the target audience supports: - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` scope. This field is not populated when using the `chat.bot` scope with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). Setting the target audience requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
}
}
},
"adminInstalled": {
"type": "boolean",
"description": "Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging."
},
"createTime": {
"type": "string",
"description": "Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`."
},
"customer": {
"type": "string",
"description": "Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and `SpaceType` is `SPACE`, otherwise should not be set. In the format `customers/{customer}`, where `customer` is the `id` from the [Admin SDK customer resource](https://developers.google.com/admin-sdk/directory/reference/rest/v1/customers). Private apps can also use the `customers/my_customer` alias to create the space in the same Google Workspace organization as the app. This field isn't populated for direct messages (DMs) or when the space is created by non-Google Workspace users."
},
"displayName": {
"type": "string",
"description": "Optional. The space's display name. Required when [creating a space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) with a `spaceType` of `SPACE`. If you receive the error message `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters."
},
"externalUserAllowed": {
"type": "boolean",
"description": "Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. For existing spaces, this field is output only."
},
"importMode": {
"type": "boolean",
"description": "Optional. Whether this space is created in `Import Mode` as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete. Creating a space in `Import Mode`requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)."
},
"importModeExpireTime": {
"type": "string",
"description": "Output only. The time when the space will be automatically deleted by the system if it remains in import mode. Each space created in import mode must exit this mode before this expire time using `spaces.completeImport`. This field is only populated for spaces that were created with import mode."
},
"lastActiveTime": {
"type": "string",
"description": "Output only. Timestamp of the last message in the space."
},
"membershipCount": {
"type": "object",
"description": "Represents the count of memberships of a space, grouped into categories.",
"properties": {
"joinedGroupCount": {
"type": "integer",
"description": "Output only. Count of all groups that have directly joined the space."
},
"joinedDirectHumanUserCount": {
"type": "integer",
"description": "Output only. Count of human users that have directly joined the space, not counting users joined by having membership in a joined group."
}
}
},
"name": {
"type": "string",
"description": "Identifier. Resource name of the space. Format: `spaces/{space}` Where `{space}` represents the system-assigned ID for the space. You can obtain the space ID by calling the [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) method or from the space URL. For example, if the space URL is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID is `AAAAAAAAA`."
},
"permissionSettings": {
"type": "object",
"description": "[Permission settings](https://support.google.com/chat/answer/13340792) that you can specify when updating an existing named space. To set permission settings when creating a space, specify the `PredefinedPermissionSettings` field in your request.",
"properties": {
"useAtMentionAll": {
"type": "object",
"description": "Represents a space permission setting."
},
"manageApps": {
"type": "object",
"description": "Represents a space permission setting."
},
"modifySpaceDetails": {
"type": "object",
"description": "Represents a space permission setting."
},
"toggleHistory": {
"type": "object",
"description": "Represents a space permission setting."
},
"replyMessages": {
"type": "object",
"description": "Represents a space permission setting."
},
"manageWebhooks": {
"type": "object",
"description": "Represents a space permission setting."
},
"manageMembersAndGroups": {
"type": "object",
"description": "Represents a space permission setting."
},
"postMessages": {
"type": "object",
"description": "Represents a space permission setting."
}
}
},
"predefinedPermissionSettings": {
"type": "string",
"description": "Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the `PermissionSettings` field. Setting predefined permission settings supports: - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) with the `chat.app.spaces` or `chat.app.spaces.create` scopes. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)",
"enum": [
"PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED",
"COLLABORATION_SPACE",
"ANNOUNCEMENT_SPACE"
]
},
"singleUserBotDm": {
"type": "boolean",
"description": "Optional. Whether the space is a DM between a Chat app and a single human."
},
"spaceDetails": {
"type": "object",
"description": "Details about the space including description and rules.",
"properties": {
"description": {
"type": "string",
"description": "Optional. A description of the space. For example, describe the space's discussion topic, functional purpose, or participants. Supports up to 150 characters."
},
"guidelines": {
"type": "string",
"description": "Optional. The space's rules, expectations, and etiquette. Supports up to 5,000 characters."
}
}
},
"spaceHistoryState": {
"type": "string",
"description": "Optional. The message history state for messages and threads in this space.",
"enum": [
"HISTORY_STATE_UNSPECIFIED",
"HISTORY_OFF",
"HISTORY_ON"
]
},
"spaceThreadingState": {
"type": "string",
"description": "Output only. The threading state in the Chat space.",
"enum": [
"SPACE_THREADING_STATE_UNSPECIFIED",
"THREADED_MESSAGES",
"GROUPED_MESSAGES",
"UNTHREADED_MESSAGES"
]
},
"spaceType": {
"type": "string",
"description": "Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.",
"enum": [
"SPACE_TYPE_UNSPECIFIED",
"SPACE",
"GROUP_CHAT",
"DIRECT_MESSAGE"
]
},
"spaceUri": {
"type": "string",
"description": "Output only. The URI for a user to access the space."
},
"threaded": {
"type": "boolean",
"description": "Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space."
},
"type": {
"type": "string",
"description": "Output only. Deprecated: Use `space_type` instead. The type of a space.",
"enum": [
"TYPE_UNSPECIFIED",
"ROOM",
"DM"
]
}
},
"required": [
"PCID",
"updateMask",
"spacesId"
]
}

