Method: users.spaces.updateSpaceReadState | Google Chat | Google for Developers (original) (raw)
REST reference
- Overview
- REST Resources
- spaces
* Overview
* completeImport
* create
* delete
* findDirectMessage
* findGroupChats
* get
* list
* patch
* search
* setup - Types
- AppCommandType
- ChatAppLogEntry
- DialogEventType
- DriveDataRef
- Emoji
- Event
- EventType
- HostApp
- SectionItem
- User
Method: users.spaces.updateSpaceReadState
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
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.
Requires user authentication with the authorization scope:
https://www.googleapis.com/auth/chat.users.readstate
HTTP request
PATCH https://chat.googleapis.com/v1/{spaceReadState.name=users/*/spaces/*/spaceReadState}
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
| spaceReadState.name | string Resource name of the space read state.Format: users/{user}/spaces/{space}/spaceReadState |
Query parameters
| Parameters | |
|---|---|
| updateMask | string (FieldMask format) Required. The field paths to update. Currently supported field paths: lastReadTime When the lastReadTime is before the latest message create time, the space appears as unread in the UI.To mark the space as read, set lastReadTime to any value later (larger) than the latest message create time. The lastReadTime is coerced to match the latest message create time. Note that the space read state only affects the read state of messages that are visible in the space's top-level conversation. Replies in threads are unaffected by this timestamp, and instead rely on the thread read state. |
Request body
The request body contains an instance of [SpaceReadState](/workspace/chat/api/reference/rest/v1/users.spaces#SpaceReadState).
Response body
If successful, the response body contains an instance of [SpaceReadState](/workspace/chat/api/reference/rest/v1/users.spaces#SpaceReadState).
Requires the following OAuth scope:
https://www.googleapis.com/auth/chat.users.readstate
For more information, see the Authorization guide.
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-05-07 UTC.