> Documentation index: https://developers.google.com/workspace/chat/llms.txt

- [HTTP request](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.spaces.threads/updateThreadReadState.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.spaces.threads/updateThreadReadState.md.txt#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.spaces.threads/updateThreadReadState.md.txt#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.spaces.threads/updateThreadReadState.md.txt#body.request_body)
- [Response body](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.spaces.threads/updateThreadReadState.md.txt#body.response_body)
- [Authorization scopes](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.spaces.threads/updateThreadReadState.md.txt#body.aspect)
- [Try it!](https://developers.google.com/workspace/chat/api/reference/rest/v1/users.spaces.threads/updateThreadReadState.md.txt#try-it)

Updates a user's read state within a thread, used to identify read and unread messages. For an example, see [Update a user's thread read state](https://developers.google.com/workspace/chat/update-thread-read-state).

Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user.md.txt) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize.md.txt#chat-api-scopes):

- `https://www.googleapis.com/auth/chat.users.readstate`

### HTTP request

`PATCH https://chat.googleapis.com/v1/{threadReadState.name=users/*/spaces/*/threads/*/threadReadState}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `threadReadState.name` | `string` Resource name of the thread read state. Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`FieldMask` format)`` Required. The field paths to update. Currently supported field paths: - `lastReadTime` When `lastReadTime` is before the latest message create time, the thread appears as unread in the UI. To mark the thread as read, set `lastReadTime` to a timestamp equal to or later than the latest message create time. Future timestamps are coerced to the current request time. Setting a negative timestamp (before `1970-01-01T00:00:00Z`) returns an `INVALID_ARGUMENT` error. |

### Request body

The request body contains an instance of `ThreadReadState`.

### Response body

If successful, the response body contains an instance of `ThreadReadState`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/chat.users.readstate`

For more information, see the [Authorization guide](https://developers.google.com/workspace/chat/authenticate-authorize.md.txt).