Resource: Section
Represents a section in Google Chat. Sections help users organize their spaces. There are two types of sections:
-
System Sections:These are predefined sections managed by Google Chat. Their resource names are fixed, and they cannot be created, deleted, or have their
displayNamemodified. Examples include:-
users/{user}/sections/default-direct-messages -
users/{user}/sections/default-spaces -
users/{user}/sections/default-apps
-
-
Custom Sections:These are sections created and managed by the user. Creating a custom section using
sections.createrequiresadisplayName. Custom sections can be updated usingsections.patchand deleted usingsections.delete.
| JSON representation |
|---|
{
"name"
:
string
,
"displayName"
:
string
,
"sortOrder"
:
integer
,
"type"
:
enum (
|
name
string
Identifier. Resource name of the section.
For system sections, the section ID is a constant string:
- DEFAULT_DIRECT_MESSAGES:
users/{user}/sections/default-direct-messages - DEFAULT_SPACES:
users/{user}/sections/default-spaces - DEFAULT_APPS:
users/{user}/sections/default-apps
Format: users/{user}/sections/{section}
displayName
string
Required. The section's display name. Only populated for sections of type CUSTOM_SECTION
. Supports up to 80 characters. Required when creating a CUSTOM_SECTION
.
sortOrder
integer
Output only. The order of the section in relation to other sections. Sections with a lower sortOrder
value appear before sections with a higher value.
type
enum (
SectionType
)
Required. The type of the section.
SectionType
Section types.
| Enums | |
|---|---|
SECTION_TYPE_UNSPECIFIED
|
Unspecified section type. |
CUSTOM_SECTION
|
Custom section. |
DEFAULT_DIRECT_MESSAGES
|
Default section containing DIRECT_MESSAGE between two human users or GROUP_CHAT spaces that don't belong to any custom section. |
DEFAULT_SPACES
|
Default spaces that don't belong to any custom section. |
DEFAULT_APPS
|
Default section containing a user's installed apps. |
Methods |
|
|---|---|
|
Creates a section in Google Chat. |
|
Deletes a section of type CUSTOM_SECTION
. |
|
Lists sections available to the Chat user. |
|
Updates a section. |
|
Changes the sort order of a section. |

