---
title: "Update this user's presence state."
method: PUT
path: "/_matrix/client/v3/presence/{userId}/status"
tags: ["Presence"]
---

# Update this user's presence state.

`PUT /_matrix/client/v3/presence/{userId}/status`

## Request

- Base URL: `https://matrix.org`
- URL: `https://matrix.org/_matrix/client/v3/presence/{userId}/status`
- Auth: one of:
  - API key in query parameter `access_token`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/matrix/apis/matrix-client-server-api/docs/_matrix/client/v3/presence/:userId/status/put.ts> (a function with typed inputs; its response is checked against the schema)

This API sets the given user's presence state. When setting the status,
the activity time is updated to reflect that activity; the client does
not need to specify the `last_active_ago` field. You cannot set the
presence state of another user.

## Path parameters

- `userId` string, required

## Request body

- object
  - `presence` 'online' | 'offline' | 'unavailable', required: The new presence state.
  - `status_msg` string: The status message to attach to this state.

## Response `200`

The new presence state was set.

- object

## Other responses

- `429`: This request was rate-limited.

---

[API](https://skmtc.dev/matrix/apis/matrix-client-server-api.md) - [All operations](https://skmtc.dev/matrix/apis/matrix-client-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/matrix/apis/matrix-client-server-api/revisions/c7fe4072c681?raw)
