Resource: Space
A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.
JSON representation |
---|
{ "name": string, "type": enum ( |
Fields | |
---|---|
name |
Identifier. Resource name of the space. Format: Where |
type |
Output only. Deprecated: Use |
space |
Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage. |
single |
Optional. Whether the space is a DM between a Chat app and a single human. |
threaded |
Output only. Deprecated: Use |
display |
Optional. The space's display name. Required when creating a space with a For direct messages, this field might be empty. Supports up to 128 characters. |
external |
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:
For existing spaces, this field is output only. |
space |
Output only. The threading state in the Chat space. |
space |
Optional. Details about the space including description and rules. |
space |
Optional. The message history state for messages and threads in this space. |
import |
Optional. Whether this space is created in Creating a space in |
create |
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 |
last |
Output only. Timestamp of the last message in the space. |
admin |
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. |
membership |
Output only. The count of joined memberships grouped by member type. Populated when the |
access |
Optional. Specifies the access setting of the space. Only populated when the |
space |
Output only. The URI for a user to access the space. |
import |
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 This field is only populated for spaces that were created with import mode. |
customer |
Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with app authentication and In the format For DMs, this field isn't populated. |
Union field Requires user authentication. |
|
predefined |
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 |
permission |
Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings. |
Type
Deprecated: Use SpaceType
instead.
Enums | |
---|---|
TYPE_UNSPECIFIED |
Reserved. |
ROOM |
Conversations between two or more humans. |
DM |
1:1 Direct Message between a human and a Chat app, where all messages are flat. Note that this doesn't include direct messages between two humans. |
SpaceType
The type of space. Required when creating or updating a space. Output only for other usage.
Enums | |
---|---|
SPACE_TYPE_UNSPECIFIED |
Reserved. |
SPACE |
A place where people send messages, share files, and collaborate. A SPACE can include Chat apps. |
GROUP_CHAT |
Group conversations between 3 or more people. A GROUP_CHAT can include Chat apps. |
DIRECT_MESSAGE |
1:1 messages between two humans or a human and a Chat app. |
SpaceThreadingState
Specifies the type of threading state in the Chat space.
Enums | |
---|---|
SPACE_THREADING_STATE_UNSPECIFIED |
Reserved. |
THREADED_MESSAGES |
Named spaces that support message threads. When users respond to a message, they can reply in-thread, which keeps their response in the context of the original message. |
GROUPED_MESSAGES |
Named spaces where the conversation is organized by topic. Topics and their replies are grouped together. |
UNTHREADED_MESSAGES |
Direct messages (DMs) between two people and group conversations between 3 or more people. |
SpaceDetails
Details about the space including description and rules.
JSON representation |
---|
{ "description": string, "guidelines": string } |
Fields | |
---|---|
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 |
Optional. The space's rules, expectations, and etiquette. Supports up to 5,000 characters. |
HistoryState
The history state for messages and spaces. Specifies how long messages and conversation threads are kept after creation.
Enums | |
---|---|
HISTORY_STATE_UNSPECIFIED |
Default value. Do not use. |
HISTORY_OFF |
History off. Messages and threads are kept for 24 hours. |
HISTORY_ON |
History on. The organization's Vault retention rules specify for how long messages and threads are kept. |
MembershipCount
Represents the count of memberships of a space, grouped into categories.
JSON representation |
---|
{ "joinedDirectHumanUserCount": integer, "joinedGroupCount": integer } |
Fields | |
---|---|
joined |
Output only. Count of human users that have directly joined the space, not counting users joined by having membership in a joined group. |
joined |
Output only. Count of all groups that have directly joined the space. |
AccessSettings
Represents the access setting of the space.
JSON representation |
---|
{
"accessState": enum ( |
Fields | |
---|---|
access |
Output only. Indicates the access state of the space. |
audience |
Optional. The resource name of the target audience 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. Format: To use the default target audience for the Google Workspace organization, set to Reading the target audience supports:
This field is not populated when using the Setting the target audience requires user authentication. |
AccessState
Represents the access state of the space.
Enums | |
---|---|
ACCESS_STATE_UNSPECIFIED |
Access state is unknown or not supported in this API. |
PRIVATE |
Only users or Google Groups that have been individually added or invited by other users or Google Workspace administrators can discover and access the space. |
DISCOVERABLE |
A space manager has granted a target audience access to the space. Users or Google Groups that have been individually added or invited to the space can also discover and access the space. To learn more, see Make a space discoverable to specific users. Creating discoverable spaces requires user authentication. |
PredefinedPermissionSettings
Predefined permission settings that you can only specify when creating a named space. More settings might be added in the future. For details about permission settings for named spaces, see Learn about spaces.
Enums | |
---|---|
PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED |
Unspecified. Don't use. |
COLLABORATION_SPACE |
Setting to make the space a collaboration space where all members can post messages. |
ANNOUNCEMENT_SPACE |
Setting to make the space an announcement space where only space managers can post messages. |
PermissionSettings
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.
JSON representation |
---|
{ "manageMembersAndGroups": { object ( |
Fields | |
---|---|
manage |
Optional. Setting for managing members and groups in a space. |
modify |
Optional. Setting for updating space name, avatar, description and guidelines. |
toggle |
Optional. Setting for toggling space history on and off. |
use |
Optional. Setting for using @all in a space. |
manage |
Optional. Setting for managing apps in a space. |
manage |
Optional. Setting for managing webhooks in a space. |
post |
Output only. Setting for posting messages in a space. |
reply |
Optional. Setting for replying to messages in a space. |
PermissionSetting
Represents a space permission setting.
JSON representation |
---|
{ "managersAllowed": boolean, "membersAllowed": boolean } |
Fields | |
---|---|
managers |
Optional. Whether spaces managers have this permission. |
members |
Optional. Whether non-manager members have this permission. |
Methods |
|
---|---|
|
Completes the import process for the specified space and makes it visible to users. |
|
Creates a space. |
|
Deletes a named space. |
|
Returns the existing direct message with the specified user. |
|
Returns details about a space. |
|
Lists spaces the caller is a member of. |
|
Updates a space. |
|
Returns a list of spaces in a Google Workspace organization based on an administrator's search. |
|
Creates a space and adds specified users to it. |