---
title: "POST /v1/users/{usersId}/sections/{sectionsId}:position"
method: POST
path: "/v1/users/{usersId}/sections/{sectionsId}:position"
tags: ["users"]
---

# POST /v1/users/{usersId}/sections/{sectionsId}:position

`POST /v1/users/{usersId}/sections/{sectionsId}:position`

## Request

- Base URL: `https://chat.googleapis.com`
- URL: `https://chat.googleapis.com/v1/users/{usersId}/sections/{sectionsId}:position`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/chat.users.sections`
  - Authorization code: `https://accounts.google.com/o/oauth2/auth`
  - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/chat.users.sections`

Changes the sort order of a section. For details, see [Create and organize sections in Google Chat](https://support.google.com/chat/answer/16059854). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.users.sections`

## Path parameters

- `usersId` string, required
- `sectionsId` string, required

## Request body

- PositionSectionRequest: Request message for positioning a section.
  - `relativePosition` 'POSITION_UNSPECIFIED' | 'START' | 'END': Optional. The relative position of the section in the list of sections.
  - `sortOrder` integer: Optional. The absolute position of the section in the list of sections. The position must be greater than 0. If the position is greater than the number of sections, the section will be appended to the end of the list. This operation inserts the section at the given position and shifts the original section at that position, and those below it, to the next position.

## Response `200`

Successful response

- PositionSectionResponse: Response message for positioning a section.
  - `section` GoogleChatV1Section: 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 `display_name` 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 `CreateSection` **requires** a `display_name`. Custom sections can be updated using `UpdateSection` and deleted using `DeleteSection`.
    - `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`.
    - `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}`
    - `sortOrder` integer: Output only. The order of the section in relation to other sections. Sections with a lower `sort_order` value appear before sections with a higher value.
    - `type` 'SECTION_TYPE_UNSPECIFIED' | 'CUSTOM_SECTION' | 'DEFAULT_DIRECT_MESSAGES' | 'DEFAULT_SPACES' | 'DEFAULT_APPS': Required. The type of the section.

---

[API](https://skmtc.dev/google/apis/chat.md) - [All operations](https://skmtc.dev/google/apis/chat/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/chat/revisions/ffee5784d4b1?raw)
