Clients can store custom config data for their account on their
homeserver. This account data will be synced between different devices
and can persist across installations on a particular device. Users may
only view the account data for their own account
The account_data may be either global or scoped to a particular rooms.
Events
The client receives the account data as events in the account_data
sections of a /sync.
These events can also be received in a /events response or in the
account_data section of a room in /sync. m.tag events appearing in
/events will have a room_id with the room the tags are for.
Set some account_data for the client. This config is only visible to the user
that set the account_data. The config will be synced to clients in the
top-level account_data.
Rate-limited:
No
Requires authentication:
Yes
Request
Request parameters
path parameters
Name
Type
Description
type
string
Required: The event type of the account_data to set. Custom types should be
namespaced to avoid clashes.
userId
string
Required: The ID of the user to set account_data for. The access token must be
authorized to make requests for this user ID.
Set some account_data for the client on a given room. This config is only
visible to the user that set the account_data. The config will be synced to
clients in the per-room account_data.
Rate-limited:
No
Requires authentication:
Yes
Request
Request parameters
path parameters
Name
Type
Description
roomId
string
Required: The ID of the room to set account_data on.
type
string
Required: The event type of the account_data to set. Custom types should be
namespaced to avoid clashes.
userId
string
Required: The ID of the user to set account_data for. The access token must be
authorized to make requests for this user ID.