- [Resource: Space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SCHEMA_REPRESENTATION)
  - [Type](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Type)
  - [SpaceType](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceType)
  - [SpaceThreadingState](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceThreadingState)
  - [SpaceDetails](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceDetails)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceDetails.SCHEMA_REPRESENTATION)
  - [HistoryState](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState)
  - [MembershipCount](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.MembershipCount)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.MembershipCount.SCHEMA_REPRESENTATION)
  - [AccessSettings](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessSettings)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessSettings.SCHEMA_REPRESENTATION)
  - [AccessState](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessState)
  - [AccessPermissionSettings](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSettings)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSettings.SCHEMA_REPRESENTATION)
  - [AccessPermissionSetting](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSetting)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSetting.SCHEMA_REPRESENTATION)
  - [Principal](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Principal)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Principal.SCHEMA_REPRESENTATION)
  - [Audience](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Audience)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Audience.SCHEMA_REPRESENTATION)
  - [PredefinedPermissionSettings](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PredefinedPermissionSettings)
  - [PermissionSettings](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSettings)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSettings.SCHEMA_REPRESENTATION)
  - [PermissionSetting](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting)
    - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting.SCHEMA_REPRESENTATION)
  - [SpaceSessionState](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceSessionState)
- [Methods](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#METHODS_SUMMARY)

## 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 (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Type`), "spaceType": enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceType`), "singleUserBotDm": boolean, "threaded": boolean, "displayName": string, "externalUserAllowed": boolean, "spaceThreadingState": enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceThreadingState`), "spaceDetails": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceDetails`) }, "spaceHistoryState": enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState`), "importMode": boolean, "createTime": string, "lastActiveTime": string, "adminInstalled": boolean, "membershipCount": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.MembershipCount`) }, "accessSettings": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessSettings`) }, "spaceUri": string, "sessionState": enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceSessionState`), "sessionEnableTime": string, "importModeExpireTime": string, "customer": string, "predefinedPermissionSettings": enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PredefinedPermissionSettings`), "permissionSettings": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSettings`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` 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`. |
| `type (deprecated)` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Type`)`` > [!WARNING] > This item is deprecated! Output only. Deprecated: Use `spaceType` instead. The type of a space. |
| `spaceType` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceType`)`` Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage. |
| `singleUserBotDm` | `boolean` Optional. Whether the space is a DM between a Chat app and a single human. |
| `threaded (deprecated)` | `boolean` > [!WARNING] > This item is deprecated! Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space. |
| `displayName` | `string` 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` | `boolean` 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. |
| `spaceThreadingState` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceThreadingState`)`` Output only. The threading state in the Chat space. |
| `spaceDetails` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceDetails`)`` Optional. Details about the space including description and rules. |
| `spaceHistoryState` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState`)`` Optional. The message history state for messages and threads in this space. |
| `importMode` | `boolean` 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). |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` 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`. |
| `lastActiveTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Timestamp of the last message in the space. |
| `adminInstalled` | `boolean` 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. |
| `membershipCount` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.MembershipCount`)`` Output only. The count of joined memberships grouped by member type. Populated when the `spaceType` is `SPACE`, `DIRECT_MESSAGE` or `GROUP_CHAT`. |
| `accessSettings` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessSettings`)`` Optional. Specifies the [access setting](https://support.google.com/chat/answer/11971020) of the space. Only populated when the `spaceType` is `SPACE`. |
| `spaceUri` | `string` Output only. The URI for a user to access the space. |
| `sessionState` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.SpaceSessionState`)`` Output only. Session state of the space. <br /> > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. <br /> |
| `sessionEnableTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Timestamp at which the space's session support status becomes supported. Unset if the space does not have session support enabled. <br /> > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. <br /> |
| `importModeExpireTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` 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. |
| `customer` | `string` 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. |
| Represents the [permission settings](https://support.google.com/chat/answer/13340792) of a space. Only populated when the `space_type` is `SPACE`. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `predefinedPermissionSettings` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PredefinedPermissionSettings`)`` 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) |
| `permissionSettings` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSettings`)`` 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. Reading and updating 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` scope. Only populated and settable when the Chat app created the space. - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) |
| End of mutually exclusive fields. ||

### 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` | 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` | Spaces that don't support message threading. This space threading state is only used for special cases including: - Continuous meeting chat where threading is intentionally turned off. - Legacy group conversations that were created prior to 2022. |

### SpaceDetails

Details about the space including description and rules.

| JSON representation |
|---|
| ``` { "description": string, "guidelines": string } ``` |

| Fields ||
|---|---|
| `description` | `string` Optional. A description of the space. For example, describe the space's discussion topic, functional purpose, or participants. Supports up to 4,096 characters. |
| `guidelines` | `string` 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](https://support.google.com/chat/answer/7664687). |
| `HISTORY_ON` | History on. The organization's [Vault retention rules](https://support.google.com/vault/answer/7657597) 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 ||
|---|---|
| `joinedDirectHumanUserCount` | `integer` Output only. Count of human users that have directly joined the space, not counting users joined by having membership in a joined group. |
| `joinedGroupCount` | `integer` Output only. Count of all groups that have directly joined the space. |

### AccessSettings

Represents the [access setting](https://support.google.com/chat/answer/11971020) of the space.

| JSON representation |
|---|
| ``` { "accessState": enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessState`), "audience": string, "accessPermissionSettings": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSettings`) } } ``` |

| Fields ||
|---|---|
| `accessState` | ``enum (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessState`)`` Output only. Indicates the access state of the space. |
| `audience` | `string` 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). |
| `accessPermissionSettings` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSettings`)`` Optional. Access permission settings for the space. To set the target audience when creating a space, specify the `accessSettings.audience` field in your request. |

### 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](https://developers.google.com/workspace/chat/space-target-audience). Creating discoverable spaces requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). |

### AccessPermissionSettings

Access permission settings for a space.

| JSON representation |
|---|
| ``` { "discoverSpaceSetting": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSetting`) }, "joinSpaceSetting": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSetting`) }, "viewSpaceMembershipSetting": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSetting`) } } ``` |

| Fields ||
|---|---|
| `discoverSpaceSetting` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSetting`)`` Optional. Access permission setting for discovering the space. |
| `joinSpaceSetting` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSetting`)`` Optional. Access permission setting for joining the space. |
| `viewSpaceMembershipSetting` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.AccessPermissionSetting`)`` Optional. Access permission setting for viewing space membership. Must be specified together with `PermissionSettings.view_space_membership` in the update mask and request body when updating who can view space membership. When granting view access to a target audience, you must also grant `PermissionSettings.view_space_membership` to all members in the same request. To remove an existing target audience (for example, to restrict view access to space managers or assistant managers only), specify an empty `AccessPermissionSetting` (with no `principals`). |

### AccessPermissionSetting

An access permission setting.

| JSON representation |
|---|
| ``` { "principals": [ { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Principal`) } ] } ``` |

| Fields ||
|---|---|
| `principals[]` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Principal`)`` Optional. Unordered list. Allowed principals for this permission. |

### Principal

A principal representing an entity granted access.

| JSON representation |
|---|
| ``` { "audience": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Audience`) } } ``` |

| Fields ||
|---|---|
| The type of principal. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `audience` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.Audience`)`` An audience. |
| End of mutually exclusive fields. ||

### Audience

A target audience in Google Chat. A target audience represents a group of users within a Google Workspace organization, defined by an administrator. Target audiences are used to configure access and visibility settings for resources, such as making a space discoverable to a specific group of users.

For more details, see [Target audiences](https://support.google.com/a/answer/9934697) and [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience).

| JSON representation |
|---|
| ``` { "name": string } ``` |

| Fields ||
|---|---|
| `name` | `string` The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can discover or join the space. 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`. |

### 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](https://support.google.com/chat/answer/7659784).

| 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](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.

| JSON representation |
|---|
| ``` { "manageMembersAndGroups": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`) }, "modifySpaceDetails": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`) }, "toggleHistory": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`) }, "useAtMentionAll": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`) }, "manageApps": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`) }, "manageWebhooks": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`) }, "postMessages": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`) }, "replyMessages": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`) }, "viewSpaceMembership": { object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`) } } ``` |

| Fields ||
|---|---|
| `manageMembersAndGroups` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`)`` Optional. Setting for managing members and groups in a space. |
| `modifySpaceDetails` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`)`` Optional. Setting for updating space name, avatar, description and guidelines. |
| `toggleHistory` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`)`` Optional. Setting for toggling space history on and off. |
| `useAtMentionAll` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`)`` Optional. Setting for using @all in a space. |
| `manageApps` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`)`` Optional. Setting for managing apps in a space. |
| `manageWebhooks` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`)`` Optional. Setting for managing webhooks in a space. |
| `postMessages` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`)`` Output only. Setting for posting messages in a space. |
| `replyMessages` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`)`` Optional. Setting for replying to messages in a space. |
| `viewSpaceMembership` | ``object (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.PermissionSetting`)`` Optional. Setting for viewing space membership. Must be specified together with `AccessPermissionSettings.view_space_membership_setting` in the update mask and request body when updating who can view space membership. When restricting view access to specific roles (for example, space managers or assistant managers only), specify the desired role permissions here and provide an empty `AccessPermissionSettings.view_space_membership_setting` in the same request. If a target audience is configured in `AccessPermissionSettings.view_space_membership_setting`, this setting must be granted to all members. |

### PermissionSetting

Represents a space permission setting.

| JSON representation |
|---|
| ``` { "managersAllowed": boolean, "membersAllowed": boolean, "assistantManagersAllowed": boolean } ``` |

| Fields ||
|---|---|
| `managersAllowed` | `boolean` Optional. Whether space owners (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#Membership.MembershipRole.ENUM_VALUES.ROLE_MANAGER`) have this permission. |
| `membersAllowed` | `boolean` Optional. Whether basic space members (`https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#Membership.MembershipRole.ENUM_VALUES.ROLE_MEMBER`) have this permission. |
| `assistantManagersAllowed` | `boolean` Optional. Whether space managers `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#Membership.MembershipRole.ENUM_VALUES.ROLE_ASSISTANT_MANAGER`) have this permission. |

### SpaceSessionState

Session state of the space.

<br />

> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.

<br />

| Enums ||
|---|---|
| `SPACE_SESSION_STATE_UNSPECIFIED` | Unspecified. Don't use. |
| `NOT_SUPPORTED` | Space does not have session support. |
| `THREAD` | Space supports session based on threads. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/completeImport` | Completes the [import process](https://developers.google.com/workspace/chat/import-data) for the specified space and makes it visible to users. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create` | Creates a space. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/delete` | Deletes a named space. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/findDirectMessage` | Returns the existing direct message with the specified user. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/findGroupChats` | Returns all spaces with `spaceType == GROUP_CHAT`, whose human memberships contain exactly the calling user, and the users specified in `FindGroupChatsRequest.users`. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/get` | Returns details about a space. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list` | Lists spaces the caller is a member of. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/patch` | Updates a space. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search` | Returns a list of spaces in a Google Workspace organization. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/setup` | Creates a space and adds specified users to it. |