Room participation

Get all state events in the current state of a room.

Get the state events for the current state of a room.

get/_matrix/client/v3/rooms/{roomId}/state

Request

Path parameters

roomIdstring mx-room-id required

The room to look up the state for.

Response

The current state of the room

contentobject required

The body of this event, as created by the client which sent it.

event_idstring mx-event-id required

The globally unique identifier for this event.

origin_server_tsinteger required

Timestamp (in milliseconds since the unix epoch) on originating homeserver when this event was sent.

senderstring mx-user-id required

Contains the fully-qualified ID of the user who sent this event.

state_keystring

Present if, and only if, this event is a state event. The key making this piece of state unique in the room. Note that it is often an empty string.

State keys starting with an @ are reserved for referencing user IDs, such as room members. With the exception of a few events, state events set with a given user's ID as the state key MUST only be set by that user.

typestring required

The type of the event.

room_idstring mx-room-id required

The ID of the room associated with this event.

Example response

[
  {
    "content": {
      "membership": "join"
    },
    "event_id": "$26RqwJMLw-yds1GAH_QxjHRC1Da9oasK0e5VLnck_45",
    "origin_server_ts": 1632489532305,
    "sender": "@example:example.org",
    "state_key": "@user:example.org",
    "type": "m.room.member",
    "unsigned": {
      "age": 1567437,
      "membership": "join",
      "redacted_because": {
        "content": {
          "reason": "spam"
        },
        "event_id": "$Nhl3rsgHMjk-DjMJANawr9HHAhLg4GcoTYrSiYYGqEE",
        "origin_server_ts": 1632491098485,
        "redacts": "$26RqwJMLw-yds1GAH_QxjHRC1Da9oasK0e5VLnck_45",
        "room_id": "!jEsUZKDJdhlrceRyVU:example.org",
        "sender": "@moderator:example.org",
        "type": "m.room.redaction",
        "unsigned": {
          "age": 1257
        }
      }
    },
    "room_id": "!jEsUZKDJdhlrceRyVU:example.org"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.