REST Resource: users.sections

Resource: Section

Represents a section in Google Chat. Sections help users organize their spaces. There are two types of sections:

  1. System Sections: These are predefined sections managed by Google Chat. Their resource names are fixed, and they cannot be created, deleted, or have their displayName modified. Examples include:

    • users/{user}/sections/default-direct-messages
    • users/{user}/sections/default-spaces
    • users/{user}/sections/default-apps
  2. Custom Sections: These are sections created and managed by the user. Creating a custom section using sections.create requires a displayName. Custom sections can be updated using sections.patch and deleted using sections.delete.

JSON representation
{
  "name": string,
  "displayName": string,
  "sortOrder": integer,
  "type": enum (SectionType)
}
Fields
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

create

Creates a section in Google Chat.

delete

Deletes a section of type CUSTOM_SECTION.

list

Lists sections available to the Chat user.

patch

Updates a section.

position

Changes the sort order of a section.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-12 UTC.