# REST Resource: users.sections

- [Resource: Section](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections#Section)
  - [JSON representation](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections#Section.SCHEMA_REPRESENTATION)
- [SectionType](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections#SectionType)
- [Methods](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections#METHODS_SUMMARY)

## Resource: Section

Represents a [section](https://support.google.com/chat/answer/16059854) 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 (`https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections#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` Optional. 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 (`https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections#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](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype) between two human users or [GROUP_CHAT](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype) 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 ||
|---|---|
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections/create` | Creates a section in Google Chat. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections/delete` | Deletes a section of type `CUSTOM_SECTION`. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections/list` | Lists sections available to the Chat user. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections/patch` | Updates a section. |
| ### `https://developers.google.com/workspace/chat/api/reference/rest/v1/users.sections/position` | Changes the sort order of a section. |