#register user curl -X POST -d '{"username":"", "password":"", "auth": {"type":"m.login.dummy"}}' "https:///_matrix/client/r0/register" #set display name curl -X PUT -d '{"displayname": ""}' "https:///_matrix/client/r0/profile/@:/displayname?access_token=<>" #set profile picture curl -X PUT -d '{"avatar_url": "mxc:///"}' "https:///_matrix/client/unstable/profile/@:/avatar_url?access_token=<>" #get server login methods curl -X GET "https:///_matrix/client/r0/login" #get access token curl -X POST -d '{"type":"m.login.password", "user":"", "password":""}' "https:///_matrix/client/r0/login" #list joined rooms curl -X GET "https:///_matrix/client/r0/joined_rooms?access_token=<>" #create room curl -X POST -d '{"name": "", "room_alias_name":""}' "https:///_matrix/client/r0/createRoom?access_token=<>" #get room events curl -X GET "https:///_matrix/client/r0/rooms/"'!'":/state?access_token=<>" #upload file (image) curl -X POST -H "Content-Type: image/" --data-binary @ "https:///_matrix/media/r0/upload?access_token=<>&filename=" #send image to room #there is no way to caption an image at the moment, so you have to either send a separate message #or set the filename as the caption curl -X POST -d '{"body": "","info": {"mimetype": "image/"},"msgtype": "m.image","url": "mxc:///"}' "https:///_matrix/client/r0/rooms/"'!'":/send/m.room.message?access_token=<>" #send text to room curl -X POST -d '{"body": "text", "msgtype": "m.text"}' "https:///_matrix/client/r0/rooms"'!'":/send/m.room.message?access_token=<>" #use the sync api to get message updates #get room name if it exists curl -XGET 'https:///_matrix/client/r0/rooms//state/m.room.name?access_token=<>'