Get the user's current state.

GET {{baseUrl}}/initialSync?limit=25457792&archived=true

This returns the full state for this user, with an optional limit on the number of messages per room to return.

This endpoint was deprecated in r0 of this specification. Clients should instead call the /sync endpoint with no since parameter. See the migration guide.

Request Params

KeyDatatypeRequiredDescription
limitnumberThe maximum number of messages to return for each room.
archivedbooleanWhether to include rooms that the user has left. If false then
only rooms that the user has been invited to or has joined are
included. If set to true then rooms that the user has left are
included as well. By default this is false.

RESPONSES

status: OK

{"end":"s3456_9_0","presence":[{"$ref":"../../event-schemas/examples/m.presence.yaml"}],"account_data":[{"type":"org.example.custom.config","content":{"custom_config_key":"custom_config_value"}}],"rooms":[{"membership":"join","messages":{"chunk":[{"$ref":"../../event-schemas/examples/m.room.message$m.text.yaml"},{"$ref":"../../event-schemas/examples/m.room.message$m.video.yaml"}],"end":"s3456_9_0","start":"t44-3453_9_0"},"room_id":"!TmaZBKYIFrIPVGoUYp:localhost","state":[{"$ref":"../../event-schemas/examples/m.room.join_rules.yaml"},{"$ref":"../../event-schemas/examples/m.room.member.yaml"},{"$ref":"../../event-schemas/examples/m.room.create.yaml"},{"$ref":"../../event-schemas/examples/m.room.power_levels.yaml"}],"visibility":"private","account_data":[{"type":"m.tag","content":{"tags":{"work":{"order":1}}}},{"type":"org.example.custom.room.config","content":{"custom_config_key":"custom_config_value"}}]}]}