---
title: "PATCH /v1/users/{usersId}/spaces/{spacesId}/spaceReadState"
method: PATCH
path: "/v1/users/{usersId}/spaces/{spacesId}/spaceReadState"
tags: ["users"]
---

# PATCH /v1/users/{usersId}/spaces/{spacesId}/spaceReadState

`PATCH /v1/users/{usersId}/spaces/{spacesId}/spaceReadState`

## Request

- Base URL: `https://chat.googleapis.com`
- URL: `https://chat.googleapis.com/v1/users/{usersId}/spaces/{spacesId}/spaceReadState`
- Auth: OAuth 2 and OAuth 2
  - Implicit: `https://accounts.google.com/o/oauth2/auth`
  - Scopes: `https://www.googleapis.com/auth/chat.users.readstate`
  - 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.readstate`

Updates a user's read state within a space, used to identify read and unread messages. For an example, see [Update a user's space read state](https://developers.google.com/workspace/chat/update-space-read-state). 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.readstate`

## Path parameters

- `usersId` string, required
- `spacesId` string, required

## Query parameters

- `updateMask` string, google-fieldmask

## Request body

- SpaceReadState: A user's read state within a space, used to identify read and unread messages.
  - `lastReadTime` string, google-datetime: Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.
  - `name` string: Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`

## Response `200`

Successful response

- SpaceReadState: A user's read state within a space, used to identify read and unread messages.
  - `lastReadTime` string, google-datetime: Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.
  - `name` string: Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`

---

[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)
