Skip to content

Instantly share code, notes, and snippets.

@qalqi
Created June 12, 2020 14:54
Show Gist options
  • Save qalqi/b6d494a0d3301f06c249efe526f0fcbd to your computer and use it in GitHub Desktop.
Save qalqi/b6d494a0d3301f06c249efe526f0fcbd to your computer and use it in GitHub Desktop.
{
"openapi" : "3.0.0",
"info" : {
"title" : "Matrix Client-Server API",
"version" : "r0.6.1-oas3"
},
"servers" : [ {
"url" : "https://matrix.org/"
} ],
"paths" : {
"/.well-known/matrix/client" : {
"get" : {
"tags" : [ "Server administration" ],
"summary" : "Gets Matrix server discovery information about the domain.",
"description" : "Gets discovery information about the domain. The file may include\nadditional keys, which MUST follow the Java package naming convention,\ne.g. ``com.example.myapp.property``. This ensures property names are\nsuitably namespaced for each application and reduces the risk of\nclashes.\n\nNote that this endpoint is not necessarily handled by the homeserver,\nbut by another webserver, to be used for discovering the homeserver URL.",
"operationId" : "getWellknown",
"responses" : {
"200" : {
"description" : "Server discovery information.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Discovery Information"
}
}
}
},
"404" : {
"description" : "No server discovery information available."
}
}
}
},
"/_matrix/client/r0/account/3pid" : {
"get" : {
"tags" : [ "User data" ],
"summary" : "Gets a list of a user's third party identifiers.",
"description" : "Gets a list of the third party identifiers that the homeserver has\nassociated with the user's account.\n\nThis is *not* the same as the list of third party identifiers bound to\nthe user's Matrix ID in identity servers.\n\nIdentifiers in this list may be used by the homeserver as, for example,\nidentifiers that it will accept to reset the user's account password.",
"operationId" : "getAccount3PIDs",
"responses" : {
"200" : {
"description" : "The lookup was successful.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200"
},
"examples" : {
"response" : {
"value" : {
"threepids" : [ {
"added_at" : 1535336848756,
"address" : "monkey@banana.island",
"medium" : "email",
"validated_at" : 1535176800000
} ]
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"post" : {
"tags" : [ "User data" ],
"summary" : "Adds contact information to the user's account.",
"description" : "Adds contact information to the user's account.\n\nThis endpoint is deprecated in favour of the more specific ``/3pid/add``\nand ``/3pid/bind`` endpoints.\n\n.. Note::\n Previously this endpoint supported a ``bind`` parameter. This parameter\n has been removed, making this endpoint behave as though it was ``false``.\n This results in this endpoint being an equivalent to ``/3pid/bind`` rather\n than dual-purpose.",
"operationId" : "post3PIDs",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body"
}
}
}
},
"responses" : {
"200" : {
"description" : "The addition was successful.",
"content" : {
"application/json" : {
"examples" : {
"response" : {
"value" : {
"submit_url" : "https://example.org/path/to/submitToken"
}
}
}
},
"schema" : {
"examples" : {
"response" : {
"value" : {
"properties" : {
"submit_url" : {
"description" : "An optional field containing a URL where the client must\nsubmit the validation token to, with identical parameters\nto the Identity Service API's ``POST\n/validate/email/submitToken`` endpoint (without the requirement\nfor an access token). The homeserver must send this token to the\nuser (if applicable), who should then be prompted to provide it\nto the client.\n\nIf this field is not present, the client can assume that\nverification will happen without the client's involvement\nprovided the homeserver advertises this specification version\nin the ``/versions`` response (ie: r0.5.0).",
"example" : "https://example.org/path/to/submitToken",
"type" : "string"
}
},
"type" : "object"
}
}
}
}
}
},
"403" : {
"description" : "The credentials could not be verified with the identity server.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_THREEPID_AUTH_FAILED",
"error" : "The third party credentials could not be verified by the identity server."
}
}
}
}
}
}
},
"deprecated" : true,
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/account/3pid/bind" : {
"post" : {
"tags" : [ "User data" ],
"summary" : "Binds a 3PID to the user's account through an Identity Service.",
"description" : "Binds a 3PID to the user's account through the specified identity server.\n\nHomeservers should not prevent this request from succeeding if another user\nhas bound the 3PID. Homeservers should simply proxy any errors received by\nthe identity server to the caller.\n\nHomeservers should track successful binds so they can be unbound later.",
"operationId" : "bind3PID",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_1"
}
}
}
},
"responses" : {
"200" : {
"description" : "The addition was successful.",
"content" : {
"application/json" : {
"examples" : {
"response" : {
"value" : { }
}
}
},
"schema" : {
"examples" : {
"response" : {
"value" : {
"type" : "object"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/account/3pid/delete" : {
"post" : {
"tags" : [ "User data" ],
"summary" : "Deletes a third party identifier from the user's account",
"description" : "Removes a third party identifier from the user's account. This might not\ncause an unbind of the identifier from the identity server.\n\nUnlike other endpoints, this endpoint does not take an ``id_access_token``\nparameter because the homeserver is expected to sign the request to the\nidentity server instead.",
"operationId" : "delete3pidFromAccount",
"requestBody" : {
"$ref" : "#/components/requestBodies/delete3pidFromAccountBody"
},
"responses" : {
"200" : {
"description" : "The homeserver has disassociated the third party identifier from the\nuser.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_1"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/account/3pid/unbind" : {
"post" : {
"tags" : [ "User data" ],
"summary" : "Removes a user's third party identifier from an identity server.",
"description" : "Removes a user's third party identifier from the provided identity server\nwithout removing it from the homeserver.\n\nUnlike other endpoints, this endpoint does not take an ``id_access_token``\nparameter because the homeserver is expected to sign the request to the\nidentity server instead.",
"operationId" : "unbind3pidFromAccount",
"requestBody" : {
"$ref" : "#/components/requestBodies/delete3pidFromAccountBody"
},
"responses" : {
"200" : {
"description" : "The identity server has disassociated the third party identifier from the\nuser.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_2"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/account/deactivate" : {
"post" : {
"tags" : [ "User data" ],
"summary" : "Deactivate a user's account.",
"description" : "Deactivate the user's account, removing all ability for the user to\nlogin again.\n\nThis API endpoint uses the `User-Interactive Authentication API`_.\n\nAn access token should be submitted to this endpoint if the client has\nan active session.\n\nThe homeserver may change the flows available depending on whether a\nvalid access token is provided.\n\nUnlike other endpoints, this endpoint does not take an ``id_access_token``\nparameter because the homeserver is expected to sign the request to the\nidentity server instead.",
"operationId" : "deactivateAccount",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_2"
}
}
}
},
"responses" : {
"200" : {
"description" : "The account has been deactivated.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_3"
}
}
}
},
"401" : {
"description" : "The homeserver requires additional authentication information.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Authentication response"
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/account/password" : {
"post" : {
"tags" : [ "User data" ],
"summary" : "Changes a user's password.",
"description" : "Changes the password for an account on this homeserver.\n\nThis API endpoint uses the `User-Interactive Authentication API`_ to\nensure the user changing the password is actually the owner of the\naccount.\n\nAn access token should be submitted to this endpoint if the client has\nan active session.\n\nThe homeserver may change the flows available depending on whether a\nvalid access token is provided. The homeserver SHOULD NOT revoke the\naccess token provided in the request. Whether other access tokens for\nthe user are revoked depends on the request parameters.",
"operationId" : "changePassword",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_3"
}
}
}
},
"responses" : {
"200" : {
"description" : "The password has been changed.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"401" : {
"description" : "The homeserver requires additional authentication information.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Authentication response"
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/account/whoami" : {
"get" : {
"tags" : [ "User data" ],
"summary" : "Gets information about the owner of an access token.",
"description" : "Gets information about the owner of a given access token. \n\nNote that, as with the rest of the Client-Server API, \nApplication Services may masquerade as users within their \nnamespace by giving a ``user_id`` query parameter. In this \nsituation, the server should verify that the given ``user_id``\nis registered by the appservice, and return it in the response \nbody.",
"operationId" : "getTokenOwner",
"responses" : {
"200" : {
"description" : "The token belongs to a known user.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_4"
},
"examples" : {
"response" : {
"value" : {
"user_id" : "@joe:example.org"
}
}
}
}
}
},
"401" : {
"description" : "The token is not recognised",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_UNKNOWN_TOKEN",
"error" : "Unrecognised access token."
}
}
}
}
}
},
"403" : {
"description" : "The appservice cannot masquerade as the user or has not registered them.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "Application service has not registered this user."
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/admin/whois/{userId}" : {
"get" : {
"tags" : [ "Server administration" ],
"summary" : "Gets information about a particular user.",
"description" : "Gets information about a particular user.\n\nThis API may be restricted to only be called by the user being looked\nup, or by a server admin. Server-local administrator privileges are not\nspecified in this document.",
"operationId" : "getWhoIs",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user to look up.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@peter:rabbit.rocks"
} ],
"responses" : {
"200" : {
"description" : "The lookup was successful.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_5"
},
"examples" : {
"response" : {
"value" : {
"devices" : {
"teapot" : {
"sessions" : [ {
"connections" : [ {
"ip" : "127.0.0.1",
"last_seen" : 1411996332123,
"user_agent" : "curl/7.31.0-DEV"
}, {
"ip" : "10.0.0.2",
"last_seen" : 1411996332123,
"user_agent" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
} ]
} ]
}
},
"user_id" : "@peter:rabbit.rocks"
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/capabilities" : {
"get" : {
"tags" : [ "Capabilities" ],
"summary" : "Gets information about the server's capabilities.",
"description" : "Gets information about the server's supported feature set\nand other relevant capabilities.",
"operationId" : "getCapabilities",
"responses" : {
"200" : {
"description" : "The capabilities of the server.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_6"
},
"examples" : {
"response" : {
"value" : {
"capabilities" : {
"com.example.custom.ratelimit" : {
"max_requests_per_hour" : 600
},
"m.change_password" : {
"enabled" : false
},
"m.room_versions" : {
"available" : {
"1" : "stable",
"2" : "stable",
"3" : "unstable",
"test-version" : "unstable"
},
"default" : "1"
}
}
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/createRoom" : {
"post" : {
"tags" : [ "Room creation" ],
"summary" : "Create a new room",
"description" : "Create a new room with various configuration options.\n\nThe server MUST apply the normal state resolution rules when creating\nthe new room, including checking power levels for each event. It MUST\napply the events implied by the request in the following order:\n\n1. The ``m.room.create`` event itself. Must be the first event in the\n room.\n\n2. An ``m.room.member`` event for the creator to join the room. This is\n needed so the remaining events can be sent.\n\n3. A default ``m.room.power_levels`` event, giving the room creator\n (and not other members) permission to send state events. Overridden\n by the ``power_level_content_override`` parameter.\n\n4. Events set by the ``preset``. Currently these are the ``m.room.join_rules``,\n ``m.room.history_visibility``, and ``m.room.guest_access`` state events.\n\n5. Events listed in ``initial_state``, in the order that they are\n listed.\n\n6. Events implied by ``name`` and ``topic`` (``m.room.name`` and ``m.room.topic``\n state events).\n\n7. Invite events implied by ``invite`` and ``invite_3pid`` (``m.room.member`` with\n ``membership: invite`` and ``m.room.third_party_invite``).\n\nThe available presets do the following with respect to room state:\n\n======================== ============== ====================== ================ =========\n Preset ``join_rules`` ``history_visibility`` ``guest_access`` Other\n======================== ============== ====================== ================ =========\n``private_chat`` ``invite`` ``shared`` ``can_join``\n``trusted_private_chat`` ``invite`` ``shared`` ``can_join`` All invitees are given the same power level as the room creator.\n``public_chat`` ``public`` ``shared`` ``forbidden``\n======================== ============== ====================== ================ =========\n\nThe server will create a ``m.room.create`` event in the room with the\nrequesting user as the creator, alongside other keys provided in the\n``creation_content``.",
"operationId" : "createRoom",
"requestBody" : {
"description" : "The desired room configuration.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_4"
}
}
}
},
"responses" : {
"200" : {
"description" : "Information about the newly created room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_7"
},
"examples" : {
"response" : {
"value" : {
"room_id" : "!sefiuhWgwghwWgh:example.com"
}
}
}
}
}
},
"400" : {
"description" : "\nThe request is invalid. A meaningful ``errcode`` and description\nerror text will be returned. Example reasons for rejection include:\n\n- The request body is malformed (``errcode`` set to ``M_BAD_JSON``\n or ``M_NOT_JSON``).\n\n- The room alias specified is already taken (``errcode`` set to\n ``M_ROOM_IN_USE``).\n\n- The initial state implied by the parameters to the request is\n invalid: for example, the user's ``power_level`` is set below\n that necessary to set the room name (``errcode`` set to\n ``M_INVALID_ROOM_STATE``).\n\n- The homeserver doesn't support the requested room version, or\n one or more users being invited to the new room are residents\n of a homeserver which does not support the requested room version.\n The ``errcode`` will be ``M_UNSUPPORTED_ROOM_VERSION`` in these\n cases.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/delete_devices" : {
"post" : {
"tags" : [ "Device management" ],
"summary" : "Bulk deletion of devices",
"description" : "This API endpoint uses the `User-Interactive Authentication API`_.\n\nDeletes the given devices, and invalidates any access token associated with them.",
"operationId" : "deleteDevices",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_5"
}
}
}
},
"responses" : {
"200" : {
"description" : "The devices were successfully removed, or had been removed\npreviously.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"401" : {
"description" : "The homeserver requires additional authentication information.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Authentication response"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/devices" : {
"get" : {
"tags" : [ "Device management" ],
"summary" : "List registered devices for the current user",
"description" : "Gets information about all devices for the current user.",
"operationId" : "getDevices",
"responses" : {
"200" : {
"description" : "Device information",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_8"
},
"examples" : {
"response" : {
"value" : {
"devices" : [ {
"device_id" : "QBUAZIFURK",
"display_name" : "android",
"last_seen_ip" : "1.2.3.4",
"last_seen_ts" : 1474491775024
} ]
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/devices/{deviceId}" : {
"get" : {
"tags" : [ "Device management" ],
"summary" : "Get a single device",
"description" : "Gets information on a single device, by device id.",
"operationId" : "getDevice",
"parameters" : [ {
"name" : "deviceId",
"in" : "path",
"description" : "The device to retrieve.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "QBUAZIFURK"
} ],
"responses" : {
"200" : {
"description" : "Device information",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"allOf" : [ {
"title" : "Device",
"required" : [ "device_id" ],
"type" : "object",
"properties" : {
"device_id" : {
"type" : "string",
"description" : "Identifier of this device.",
"example" : "QBUAZIFURK"
},
"display_name" : {
"type" : "string",
"description" : "Display name set by the user for this device. Absent if no name has been\nset.",
"example" : "android"
},
"last_seen_ip" : {
"type" : "string",
"description" : "The IP address where this device was last seen. (May be a few minutes out\nof date, for efficiency reasons).",
"example" : "1.2.3.4"
},
"last_seen_ts" : {
"type" : "integer",
"description" : "The timestamp (in milliseconds since the unix epoch) when this devices\nwas last seen. (May be a few minutes out of date, for efficiency\nreasons).",
"format" : "int64",
"example" : 1474491775024
}
},
"description" : "A client device"
} ]
},
"examples" : {
"response" : {
"value" : {
"device_id" : "QBUAZIFURK",
"display_name" : "android",
"last_seen_ip" : "1.2.3.4",
"last_seen_ts" : 1474491775024
}
}
}
}
}
},
"404" : {
"description" : "The current user has no device with the given ID."
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"put" : {
"tags" : [ "Device management" ],
"summary" : "Update a device",
"description" : "Updates the metadata on the given device.",
"operationId" : "updateDevice",
"parameters" : [ {
"name" : "deviceId",
"in" : "path",
"description" : "The device to update.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "QBUAZIFURK"
} ],
"requestBody" : {
"description" : "New information for the device.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_6"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The device was successfully updated.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"404" : {
"description" : "The current user has no device with the given ID."
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"delete" : {
"tags" : [ "Device management" ],
"summary" : "Delete a device",
"description" : "This API endpoint uses the `User-Interactive Authentication API`_.\n\nDeletes the given device, and invalidates any access token associated with it.",
"operationId" : "deleteDevice",
"parameters" : [ {
"name" : "deviceId",
"in" : "path",
"description" : "The device to delete.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "QBUAZIFURK"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_7"
}
}
}
},
"responses" : {
"200" : {
"description" : "The device was successfully removed, or had been removed\npreviously.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"401" : {
"description" : "The homeserver requires additional authentication information.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Authentication response"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/directory/list/appservice/{networkId}/{roomId}" : {
"put" : {
"tags" : [ "Application service room directory management" ],
"summary" : "Updates a room's visibility in the application service's room directory.",
"description" : "Updates the visibility of a given room on the application service's room\ndirectory.\n\nThis API is similar to the room directory visibility API used by clients\nto update the homeserver's more general room directory.\n\nThis API requires the use of an application service access token (``as_token``)\ninstead of a typical client's access_token. This API cannot be invoked by\nusers who are not identified as application services.",
"operationId" : "updateAppserviceRoomDirectoryVsibility",
"parameters" : [ {
"name" : "networkId",
"in" : "path",
"description" : "The protocol (network) ID to update the room list for. This would\nhave been provided by the application service as being listed as\na supported protocol.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "irc"
}, {
"name" : "roomId",
"in" : "path",
"description" : "The room ID to add to the directory.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!somewhere:example.org"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_8"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The room's directory visibility has been updated.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/directory/room/{roomAlias}" : {
"get" : {
"tags" : [ "Room directory" ],
"summary" : "Get the room ID corresponding to this room alias.",
"description" : "Requests that the server resolve a room alias to a room ID.\n\nThe server will use the federation API to resolve the alias if the\ndomain part of the alias does not correspond to the server's own\ndomain.",
"operationId" : "getRoomIdByAlias",
"parameters" : [ {
"name" : "roomAlias",
"in" : "path",
"description" : "The room alias.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "#monkeys:matrix.org"
} ],
"responses" : {
"200" : {
"description" : "The room ID and other information for this alias.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_9"
},
"examples" : {
"response" : {
"value" : {
"room_id" : "!abnjk1jdasj98:capuchins.com",
"servers" : [ "capuchins.com", "matrix.org", "another.com" ]
}
}
}
}
}
},
"404" : {
"description" : "There is no mapped room ID for this room alias.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_NOT_FOUND",
"error" : "Room alias #monkeys:matrix.org not found."
}
}
}
}
}
}
}
},
"put" : {
"tags" : [ "Room directory" ],
"summary" : "Create a new mapping from room alias to room ID.",
"operationId" : "setRoomAlias",
"parameters" : [ {
"name" : "roomAlias",
"in" : "path",
"description" : "The room alias to set.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "#monkeys:matrix.org"
} ],
"requestBody" : {
"description" : "Information about this room alias.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_9"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The mapping was created.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"409" : {
"description" : "A room alias with that name already exists.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_UNKNOWN",
"error" : "Room alias #monkeys:matrix.org already exists."
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"delete" : {
"tags" : [ "Room directory" ],
"summary" : "Remove a mapping of room alias to room ID.",
"description" : "Remove a mapping of room alias to room ID.\n\nServers may choose to implement additional access control checks here, for instance that\nroom aliases can only be deleted by their creator or a server administrator.\n\n.. Note::\n Servers may choose to update the ``alt_aliases`` for the ``m.room.canonical_alias``\n state event in the room when an alias is removed. Servers which choose to update the\n canonical alias event are recommended to, in addition to their other relevant permission\n checks, delete the alias and return a successful response even if the user does not\n have permission to update the ``m.room.canonical_alias`` event.",
"operationId" : "deleteRoomAlias",
"parameters" : [ {
"name" : "roomAlias",
"in" : "path",
"description" : "The room alias to remove.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "#monkeys:matrix.org"
} ],
"responses" : {
"200" : {
"description" : "The mapping was deleted.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"404" : {
"description" : "There is no mapped room ID for this room alias.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_NOT_FOUND",
"error" : "Room alias #monkeys:example.org not found."
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/events" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Listen on the event stream.",
"description" : "This will listen for new events and return them to the caller. This will\nblock until an event is received, or until the ``timeout`` is reached.\n\nThis endpoint was deprecated in r0 of this specification. Clients\nshould instead call the |/sync|_ API with a ``since`` parameter. See\nthe `migration guide\n<https://matrix.org/docs/guides/client-server-migrating-from-v1.html#deprecated-endpoints>`_.",
"operationId" : "getEvents",
"parameters" : [ {
"name" : "from",
"in" : "query",
"description" : "The token to stream from. This token is either from a previous\nrequest to this API or from the initial sync API.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "s3456_9_0"
}, {
"name" : "timeout",
"in" : "query",
"description" : "The maximum time in milliseconds to wait for an event.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer"
},
"example" : "35000"
} ],
"responses" : {
"200" : {
"description" : "The events received, which may be none.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_10"
},
"examples" : {
"response" : {
"value" : {
"chunk" : [ {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!jEsUZKDJdhlrceRyVU:example.org",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
} ],
"end" : "s3457_9_0",
"start" : "s3456_9_0"
}
}
}
}
}
},
"400" : {
"description" : "Bad pagination ``from`` parameter."
}
},
"deprecated" : true,
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/events/{eventId}" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Get a single event by event ID.",
"description" : "Get a single event based on ``event_id``. You must have permission to\nretrieve this event e.g. by being a member in the room for this event.\n\nThis endpoint was deprecated in r0 of this specification. Clients\nshould instead call the |/rooms/{roomId}/event/{eventId}|_ API\nor the |/rooms/{roomId}/context/{eventId}|_ API.",
"operationId" : "getOneEvent",
"parameters" : [ {
"name" : "eventId",
"in" : "path",
"description" : "The event ID to get.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "$asfDuShaf7Gafaw:matrix.org"
} ],
"responses" : {
"200" : {
"description" : "The full event.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_11"
},
"examples" : {
"response" : {
"value" : {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!jEsUZKDJdhlrceRyVU:example.org",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
}
}
}
}
}
},
"404" : {
"description" : "The event was not found or you do not have permission to read this event."
}
},
"deprecated" : true,
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/initialSync" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Get the user's current state.",
"description" : "This returns the full state for this user, with an optional limit on the\nnumber of messages per room to return.\n\nThis endpoint was deprecated in r0 of this specification. Clients\nshould instead call the |/sync|_ API with no ``since`` parameter. See\nthe `migration guide\n<https://matrix.org/docs/guides/client-server-migrating-from-v1.html#deprecated-endpoints>`_.",
"operationId" : "initialSync",
"parameters" : [ {
"name" : "limit",
"in" : "query",
"description" : "The maximum number of messages to return for each room.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer"
},
"example" : "2"
}, {
"name" : "archived",
"in" : "query",
"description" : "Whether to include rooms that the user has left. If ``false`` then\nonly rooms that the user has been invited to or has joined are\nincluded. If set to ``true`` then rooms that the user has left are\nincluded as well. By default this is ``false``.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "boolean"
},
"example" : "true"
} ],
"responses" : {
"200" : {
"description" : "The user's current state.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_12"
},
"examples" : {
"response" : {
"value" : {
"account_data" : [ {
"content" : {
"custom_config_key" : "custom_config_value"
},
"type" : "org.example.custom.config"
} ],
"end" : "s3456_9_0",
"presence" : [ {
"content" : {
"avatar_url" : "mxc://localhost:wefuiwegh8742w",
"currently_active" : false,
"last_active_ago" : 2478593,
"presence" : "online",
"status_msg" : "Making cupcakes"
},
"sender" : "@example:localhost",
"type" : "m.presence"
} ],
"rooms" : [ {
"account_data" : [ {
"content" : {
"tags" : {
"work" : {
"order" : 1
}
}
},
"type" : "m.tag"
}, {
"content" : {
"custom_config_key" : "custom_config_value"
},
"type" : "org.example.custom.room.config"
} ],
"membership" : "join",
"messages" : {
"chunk" : [ {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!TmaZBKYIFrIPVGoUYp:localhost",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"body" : "Gangnam Style",
"info" : {
"duration" : 2140786,
"h" : 320,
"mimetype" : "video/mp4",
"size" : 1563685,
"thumbnail_info" : {
"h" : 300,
"mimetype" : "image/jpeg",
"size" : 46144,
"w" : 300
},
"thumbnail_url" : "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe",
"w" : 480
},
"msgtype" : "m.video",
"url" : "mxc://example.org/a526eYUSFFxlgbQYZmo442"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!TmaZBKYIFrIPVGoUYp:localhost",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
} ],
"end" : "s3456_9_0",
"start" : "t44-3453_9_0"
},
"room_id" : "!TmaZBKYIFrIPVGoUYp:localhost",
"state" : [ {
"content" : {
"join_rule" : "public"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!TmaZBKYIFrIPVGoUYp:localhost",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.join_rules",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"avatar_url" : "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname" : "Alice Margatroid",
"membership" : "join"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!TmaZBKYIFrIPVGoUYp:localhost",
"sender" : "@example:example.org",
"state_key" : "@alice:example.org",
"type" : "m.room.member",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"creator" : "@example:example.org",
"m.federate" : true,
"predecessor" : {
"event_id" : "$something:example.org",
"room_id" : "!oldroom:example.org"
},
"room_version" : "1"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!TmaZBKYIFrIPVGoUYp:localhost",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.create",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"ban" : 50,
"events" : {
"m.room.name" : 100,
"m.room.power_levels" : 100
},
"events_default" : 0,
"invite" : 50,
"kick" : 50,
"notifications" : {
"room" : 20
},
"redact" : 50,
"state_default" : 50,
"users" : {
"@example:localhost" : 100
},
"users_default" : 0
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!TmaZBKYIFrIPVGoUYp:localhost",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.power_levels",
"unsigned" : {
"age" : 1234
}
} ],
"visibility" : "private"
} ]
}
}
}
}
}
},
"404" : {
"description" : "There is no avatar URL for this user or this user does not exist."
}
},
"deprecated" : true,
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/join/{roomIdOrAlias}" : {
"post" : {
"tags" : [ "Room membership" ],
"summary" : "Start the requesting user participating in a particular room.",
"description" : "*Note that this API takes either a room ID or alias, unlike* ``/room/{roomId}/join``.\n\nThis API starts a user participating in a particular room, if that user\nis allowed to participate in that room. After this call, the client is\nallowed to see all current state events in the room, and all subsequent\nevents associated with the room until the user leaves the room.\n\nAfter a user has joined a room, the room will appear as an entry in the\nresponse of the |/initialSync|_ and |/sync|_ APIs.\n\nIf a ``third_party_signed`` was supplied, the homeserver must verify\nthat it matches a pending ``m.room.third_party_invite`` event in the\nroom, and perform key validity checking if required by the event.",
"operationId" : "joinRoom",
"parameters" : [ {
"name" : "roomIdOrAlias",
"in" : "path",
"description" : "The room identifier or alias to join.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "#monkeys:matrix.org"
}, {
"name" : "server_name",
"in" : "query",
"description" : "The servers to attempt to join the room through. One of the servers\nmust be participating in the room.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
"example" : [ "matrix.org", "elsewhere.ca" ]
} ],
"requestBody" : {
"$ref" : "#/components/requestBodies/joinRoomThirdPartySigned"
},
"responses" : {
"200" : {
"description" : "The room has been joined.\n\nThe joined room ID must be returned in the ``room_id`` field.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_13"
},
"examples" : {
"response" : {
"value" : {
"room_id" : "!d41d8cd:matrix.org"
}
}
}
}
}
},
"403" : {
"description" : "You do not have permission to join the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejection are:\n\n- The room is invite-only and the user was not invited.\n- The user has been banned from the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "You are not invited to this room."
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/joined_rooms" : {
"get" : {
"tags" : [ "Room membership" ],
"summary" : "Lists the user's current rooms.",
"description" : "This API returns a list of the user's current rooms.",
"operationId" : "getJoinedRooms",
"responses" : {
"200" : {
"description" : "A list of the rooms the user is in.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_14"
},
"examples" : {
"response" : {
"value" : {
"joined_rooms" : [ "!foo:example.com" ]
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/keys/changes" : {
"get" : {
"tags" : [ "End-to-end encryption" ],
"summary" : "Query users with recent device key updates.",
"description" : "Gets a list of users who have updated their device identity keys since a\nprevious sync token.\n\nThe server should include in the results any users who:\n\n* currently share a room with the calling user (ie, both users have\n membership state ``join``); *and*\n* added new device identity keys or removed an existing device with\n identity keys, between ``from`` and ``to``.",
"operationId" : "getKeysChanges",
"parameters" : [ {
"name" : "from",
"in" : "query",
"description" : "The desired start point of the list. Should be the ``next_batch`` field\nfrom a response to an earlier call to |/sync|. Users who have not\nuploaded new device identity keys since this point, nor deleted\nexisting devices with identity keys since then, will be excluded\nfrom the results.",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "s72594_4483_1934"
}, {
"name" : "to",
"in" : "query",
"description" : "The desired end point of the list. Should be the ``next_batch``\nfield from a recent call to |/sync| - typically the most recent\nsuch call. This may be used by the server as a hint to check its\ncaches are up to date.",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "s75689_5632_2435"
} ],
"responses" : {
"200" : {
"description" : "The list of users who updated their devices.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_15"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/keys/claim" : {
"post" : {
"tags" : [ "End-to-end encryption" ],
"summary" : "Claim one-time encryption keys.",
"description" : "Claims one-time keys for use in pre-key messages.",
"operationId" : "claimKeys",
"requestBody" : {
"description" : "Query defining the keys to be claimed",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_10"
}
}
}
},
"responses" : {
"200" : {
"description" : "The claimed keys.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_16"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/keys/query" : {
"post" : {
"tags" : [ "End-to-end encryption" ],
"summary" : "Download device identity keys.",
"description" : "Returns the current devices and identity keys for the given users.",
"operationId" : "queryKeys",
"requestBody" : {
"description" : "Query defining the keys to be downloaded",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_11"
}
}
}
},
"responses" : {
"200" : {
"description" : "The device information",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_17"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/keys/upload" : {
"post" : {
"tags" : [ "End-to-end encryption" ],
"summary" : "Upload end-to-end encryption keys.",
"description" : "Publishes end-to-end encryption keys for the device.",
"operationId" : "uploadKeys",
"requestBody" : {
"description" : "The keys to be published",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_12"
}
}
}
},
"responses" : {
"200" : {
"description" : "The provided keys were successfully uploaded.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_18"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/login" : {
"get" : {
"tags" : [ "Session management" ],
"summary" : "Get the supported login types to authenticate users",
"description" : "Gets the homeserver's supported login types to authenticate users. Clients\nshould pick one of these and supply it as the ``type`` when logging in.",
"operationId" : "getLoginFlows",
"responses" : {
"200" : {
"description" : "The login types the homeserver supports",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_19"
},
"examples" : {
"response" : {
"value" : {
"flows" : [ {
"type" : "m.login.password"
} ]
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
}
},
"post" : {
"tags" : [ "Session management" ],
"summary" : "Authenticates the user.",
"description" : "Authenticates the user, and issues an access token they can\nuse to authorize themself in subsequent requests.\n\nIf the client does not supply a ``device_id``, the server must\nauto-generate one.\n\nThe returned access token must be associated with the ``device_id``\nsupplied by the client or generated by the server. The server may\ninvalidate any access token previously associated with that device. See\n`Relationship between access tokens and devices`_.",
"operationId" : "login",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_13"
}
}
}
},
"responses" : {
"200" : {
"description" : "The user has been authenticated.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_20"
},
"examples" : {
"response" : {
"value" : {
"access_token" : "abc123",
"device_id" : "GHTYAJCE",
"user_id" : "@cheeky_monkey:matrix.org",
"well_known" : {
"m.homeserver" : {
"base_url" : "https://example.org"
},
"m.identity_server" : {
"base_url" : "https://id.example.org"
}
}
}
}
}
}
}
},
"400" : {
"description" : "Part of the request was invalid. For example, the login type may not be recognised.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_UNKNOWN",
"error" : "Bad login type."
}
}
}
}
}
},
"403" : {
"description" : "The login attempt failed. This can include one of the following error codes:\n * ``M_FORBIDDEN``: The provided authentication data was incorrect.\n * ``M_USER_DEACTIVATED``: The user has been deactivated.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
}
}
},
"/_matrix/client/r0/logout" : {
"post" : {
"tags" : [ "Session management" ],
"summary" : "Invalidates a user access token",
"description" : "Invalidates an existing access token, so that it can no longer be used for\nauthorization. The device associated with the access token is also deleted.\n`Device keys <#device-keys>`_ for the device are deleted alongside the device.",
"operationId" : "logout",
"responses" : {
"200" : {
"description" : "The access token used in the request was succesfully invalidated.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"properties" : { }
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/logout/all" : {
"post" : {
"tags" : [ "Session management" ],
"summary" : "Invalidates all access tokens for a user",
"description" : "Invalidates all access tokens for a user, so that they can no longer be used for\nauthorization. This includes the access token that made this request. All devices\nfor the user are also deleted. `Device keys <#device-keys>`_ for the device are\ndeleted alongside the device.\n\nThis endpoint does not require UI authorization because UI authorization is\ndesigned to protect against attacks where the someone gets hold of a single access\ntoken then takes over the account. This endpoint invalidates all access tokens for\nthe user, including the token used in the request, and therefore the attacker is\nunable to take over the account in this way.",
"operationId" : "logout_all",
"responses" : {
"200" : {
"description" : "The user's access tokens were succesfully invalidated.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"properties" : { }
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/notifications" : {
"get" : {
"tags" : [ "Push notifications" ],
"summary" : "Gets a list of events that the user has been notified about",
"description" : "This API is used to paginate through the list of events that the\nuser has been, or would have been notified about.",
"operationId" : "getNotifications",
"parameters" : [ {
"name" : "from",
"in" : "query",
"description" : "Pagination token given to retrieve the next set of events.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "xxxxx"
}, {
"name" : "limit",
"in" : "query",
"description" : "Limit on the number of events to return in this request.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer"
},
"example" : "20"
}, {
"name" : "only",
"in" : "query",
"description" : "Allows basic filtering of events returned. Supply ``highlight``\nto return only events where the notification had the highlight\ntweak set.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "highlight"
} ],
"responses" : {
"200" : {
"description" : "A batch of events is being returned",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_21"
},
"examples" : {
"response" : {
"value" : {
"next_token" : "abcdef",
"notifications" : [ {
"actions" : [ "notify" ],
"event" : {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!jEsUZKDJdhlrceRyVU:example.org",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
},
"profile_tag" : "hcbvkzxhcvb",
"read" : true,
"room_id" : "!abcdefg:example.com",
"ts" : 1475508881945
} ]
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/presence/{userId}/status" : {
"get" : {
"tags" : [ "Presence" ],
"summary" : "Get this user's presence state.",
"description" : "Get the given user's presence state.",
"operationId" : "getPresence",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user whose presence state to get.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"responses" : {
"200" : {
"description" : "The presence state for this user.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_22"
},
"examples" : {
"response" : {
"value" : {
"last_active_ago" : 420845,
"presence" : "unavailable"
}
}
}
}
}
},
"403" : {
"description" : "You are not allowed to see this user's presence status.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "You are not allowed to see their presence"
}
}
}
}
}
},
"404" : {
"description" : "There is no presence state for this user. This user may not exist or\nisn't exposing presence information to you.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"put" : {
"tags" : [ "Presence" ],
"summary" : "Update this user's presence state.",
"description" : "This API sets the given user's presence state. When setting the status,\nthe activity time is updated to reflect that activity; the client does\nnot need to specify the ``last_active_ago`` field. You cannot set the\npresence state of another user.",
"operationId" : "setPresence",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user whose presence state to update.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"requestBody" : {
"description" : "The updated presence state.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_14"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The new presence state was set.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/profile/{userId}" : {
"get" : {
"tags" : [ "User data" ],
"summary" : "Get this user's profile information.",
"description" : "Get the combined profile information for this user. This API may be used\nto fetch the user's own profile information or other users; either\nlocally or on remote homeservers. This API may return keys which are not\nlimited to ``displayname`` or ``avatar_url``.",
"operationId" : "getUserProfile",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user whose profile information to get.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"responses" : {
"200" : {
"description" : "The avatar URL for this user.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_23"
},
"examples" : {
"response" : {
"value" : {
"avatar_url" : "mxc://matrix.org/SDGdghriugerRg",
"displayname" : "Alice Margatroid"
}
}
}
}
}
},
"404" : {
"description" : "There is no profile information for this user or this user does not exist."
}
}
}
},
"/_matrix/client/r0/profile/{userId}/avatar_url" : {
"get" : {
"tags" : [ "User data" ],
"summary" : "Get the user's avatar URL.",
"description" : "Get the user's avatar URL. This API may be used to fetch the user's\nown avatar URL or to query the URL of other users; either locally or\non remote homeservers.",
"operationId" : "getAvatarUrl",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user whose avatar URL to get.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"responses" : {
"200" : {
"description" : "The avatar URL for this user.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_24"
},
"examples" : {
"response" : {
"value" : {
"avatar_url" : "mxc://matrix.org/SDGdghriugerRg"
}
}
}
}
}
},
"404" : {
"description" : "There is no avatar URL for this user or this user does not exist."
}
}
},
"put" : {
"tags" : [ "User data" ],
"summary" : "Set the user's avatar URL.",
"description" : "This API sets the given user's avatar URL. You must have permission to\nset this user's avatar URL, e.g. you need to have their ``access_token``.",
"operationId" : "setAvatarUrl",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user whose avatar URL to set.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"requestBody" : {
"description" : "The avatar url info.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_15"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The avatar URL was set.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/profile/{userId}/displayname" : {
"get" : {
"tags" : [ "User data" ],
"summary" : "Get the user's display name.",
"description" : "Get the user's display name. This API may be used to fetch the user's\nown displayname or to query the name of other users; either locally or\non remote homeservers.",
"operationId" : "getDisplayName",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user whose display name to get.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"responses" : {
"200" : {
"description" : "The display name for this user.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_25"
},
"examples" : {
"response" : {
"value" : {
"displayname" : "Alice Margatroid"
}
}
}
}
}
},
"404" : {
"description" : "There is no display name for this user or this user does not exist."
}
}
},
"put" : {
"tags" : [ "User data" ],
"summary" : "Set the user's display name.",
"description" : "This API sets the given user's display name. You must have permission to\nset this user's display name, e.g. you need to have their ``access_token``.",
"operationId" : "setDisplayName",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user whose display name to set.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"requestBody" : {
"description" : "The display name info.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_16"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The display name was set.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/publicRooms" : {
"get" : {
"tags" : [ "Room discovery" ],
"summary" : "Lists the public rooms on the server.",
"description" : "Lists the public rooms on the server.\n\nThis API returns paginated responses. The rooms are ordered by the number\nof joined members, with the largest rooms first.",
"operationId" : "getPublicRooms",
"parameters" : [ {
"name" : "limit",
"in" : "query",
"description" : "Limit the number of results returned.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer"
}
}, {
"name" : "since",
"in" : "query",
"description" : "A pagination token from a previous request, allowing clients to\nget the next (or previous) batch of rooms.\nThe direction of pagination is specified solely by which token\nis supplied, rather than via an explicit flag.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
}, {
"name" : "server",
"in" : "query",
"description" : "The server to fetch the public room lists from. Defaults to the\nlocal server.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "A list of the rooms on the server.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_26"
}
}
}
}
}
},
"post" : {
"tags" : [ "Room discovery" ],
"summary" : "Lists the public rooms on the server with optional filter.",
"description" : "Lists the public rooms on the server, with optional filter.\n\nThis API returns paginated responses. The rooms are ordered by the number\nof joined members, with the largest rooms first.",
"operationId" : "queryPublicRooms",
"parameters" : [ {
"name" : "server",
"in" : "query",
"description" : "The server to fetch the public room lists from. Defaults to the\nlocal server.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
} ],
"requestBody" : {
"description" : "Options for which rooms to return.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_17"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "A list of the rooms on the server.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_27"
},
"examples" : {
"response" : {
"value" : {
"chunk" : [ {
"aliases" : [ "#murrays:cheese.bar" ],
"avatar_url" : "mxc://bleeker.street/CHEDDARandBRIE",
"guest_can_join" : false,
"name" : "CHEESE",
"num_joined_members" : 37,
"room_id" : "!ol19s:bleecker.street",
"topic" : "Tasty tasty cheese",
"world_readable" : true
} ],
"next_batch" : "p190q",
"prev_batch" : "p1902",
"total_room_count_estimate" : 115
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/pushers" : {
"get" : {
"tags" : [ "Push notifications" ],
"summary" : "Gets the current pushers for the authenticated user",
"description" : "Gets all currently active pushers for the authenticated user.",
"operationId" : "getPushers",
"responses" : {
"200" : {
"description" : "The pushers for this user.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_28"
},
"examples" : {
"response" : {
"value" : {
"pushers" : [ {
"app_display_name" : "Appy McAppface",
"app_id" : "face.mcapp.appy.prod",
"data" : {
"url" : "https://example.com/_matrix/push/v1/notify"
},
"device_display_name" : "Alice's Phone",
"kind" : "http",
"lang" : "en-US",
"profile_tag" : "xyz",
"pushkey" : "Xp/MzCt8/9DcSNE9cuiaoT5Ac55job3TdLSSmtmYl4A="
} ]
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/pushers/set" : {
"post" : {
"tags" : [ "Push notifications" ],
"summary" : "Modify a pusher for this user on the homeserver.",
"description" : "This endpoint allows the creation, modification and deletion of `pushers`_\nfor this user ID. The behaviour of this endpoint varies depending on the\nvalues in the JSON body.",
"operationId" : "postPusher",
"requestBody" : {
"description" : "The pusher information.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_18"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The pusher was set.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"description" : "An empty object."
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"400" : {
"description" : "One or more of the pusher values were invalid.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_MISSING_PARAM",
"error" : "Missing parameters: lang, data"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/pushrules/" : {
"get" : {
"tags" : [ "Push notifications" ],
"summary" : "Retrieve all push rulesets.",
"description" : "Retrieve all push rulesets for this user. Clients can \"drill-down\" on\nthe rulesets by suffixing a ``scope`` to this path e.g.\n``/pushrules/global/``. This will return a subset of this data under the\nspecified key e.g. the ``global`` key.",
"operationId" : "getPushRules",
"responses" : {
"200" : {
"description" : "All the push rulesets for this user.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_29"
},
"examples" : {
"response" : {
"value" : {
"global" : {
"content" : [ {
"actions" : [ "notify", {
"set_tweak" : "sound",
"value" : "default"
}, {
"set_tweak" : "highlight"
} ],
"default" : true,
"enabled" : true,
"pattern" : "alice",
"rule_id" : ".m.rule.contains_user_name"
} ],
"override" : [ {
"actions" : [ "dont_notify" ],
"conditions" : [ ],
"default" : true,
"enabled" : false,
"rule_id" : ".m.rule.master"
}, {
"actions" : [ "dont_notify" ],
"conditions" : [ {
"key" : "content.msgtype",
"kind" : "event_match",
"pattern" : "m.notice"
} ],
"default" : true,
"enabled" : true,
"rule_id" : ".m.rule.suppress_notices"
} ],
"room" : [ ],
"sender" : [ ],
"underride" : [ {
"actions" : [ "notify", {
"set_tweak" : "sound",
"value" : "ring"
}, {
"set_tweak" : "highlight",
"value" : false
} ],
"conditions" : [ {
"key" : "type",
"kind" : "event_match",
"pattern" : "m.call.invite"
} ],
"default" : true,
"enabled" : true,
"rule_id" : ".m.rule.call"
}, {
"actions" : [ "notify", {
"set_tweak" : "sound",
"value" : "default"
}, {
"set_tweak" : "highlight"
} ],
"conditions" : [ {
"kind" : "contains_display_name"
} ],
"default" : true,
"enabled" : true,
"rule_id" : ".m.rule.contains_display_name"
}, {
"actions" : [ "notify", {
"set_tweak" : "sound",
"value" : "default"
}, {
"set_tweak" : "highlight",
"value" : false
} ],
"conditions" : [ {
"is" : "2",
"kind" : "room_member_count"
}, {
"key" : "type",
"kind" : "event_match",
"pattern" : "m.room.message"
} ],
"default" : true,
"enabled" : true,
"rule_id" : ".m.rule.room_one_to_one"
}, {
"actions" : [ "notify", {
"set_tweak" : "sound",
"value" : "default"
}, {
"set_tweak" : "highlight",
"value" : false
} ],
"conditions" : [ {
"key" : "type",
"kind" : "event_match",
"pattern" : "m.room.member"
}, {
"key" : "content.membership",
"kind" : "event_match",
"pattern" : "invite"
}, {
"key" : "state_key",
"kind" : "event_match",
"pattern" : "@alice:example.com"
} ],
"default" : true,
"enabled" : true,
"rule_id" : ".m.rule.invite_for_me"
}, {
"actions" : [ "notify", {
"set_tweak" : "highlight",
"value" : false
} ],
"conditions" : [ {
"key" : "type",
"kind" : "event_match",
"pattern" : "m.room.member"
} ],
"default" : true,
"enabled" : true,
"rule_id" : ".m.rule.member_event"
}, {
"actions" : [ "notify", {
"set_tweak" : "highlight",
"value" : false
} ],
"conditions" : [ {
"key" : "type",
"kind" : "event_match",
"pattern" : "m.room.message"
} ],
"default" : true,
"enabled" : true,
"rule_id" : ".m.rule.message"
} ]
}
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}" : {
"get" : {
"tags" : [ "Push notifications" ],
"summary" : "Retrieve a push rule.",
"description" : "Retrieve a single specified push rule.",
"operationId" : "getPushRule",
"parameters" : [ {
"name" : "scope",
"in" : "path",
"description" : "``global`` to specify global rules.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "global"
}, {
"name" : "kind",
"in" : "path",
"description" : "The kind of rule\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"enum" : [ "override", "underride", "sender", "room", "content" ]
},
"example" : "content"
}, {
"name" : "ruleId",
"in" : "path",
"description" : "The identifier for the rule.\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "nocake"
} ],
"responses" : {
"200" : {
"description" : "The specific push rule. This will also include keys specific to the\nrule itself such as the rule's ``actions`` and ``conditions`` if set.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"description" : "The push rule.",
"allOf" : [ {
"title" : "PushRule",
"required" : [ "actions", "default", "enabled", "rule_id" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The actions to perform when this rule is matched.",
"items" : {
"type" : "object"
}
},
"conditions" : {
"type" : "array",
"description" : "The conditions that must hold true for an event in order for a rule to be\napplied to an event. A rule with no conditions always matches. Only\napplicable to ``underride`` and ``override`` rules.",
"items" : {
"allOf" : [ {
"title" : "PushCondition",
"required" : [ "kind" ],
"type" : "object",
"properties" : {
"is" : {
"type" : "string",
"description" : "Required for ``room_member_count`` conditions. A decimal integer\noptionally prefixed by one of, ==, <, >, >= or <=. A prefix of < matches\nrooms where the member count is strictly less than the given number and\nso forth. If no prefix is present, this parameter defaults to ==."
},
"key" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The dot-separated field of the\nevent to match.\n\nRequired for ``sender_notification_permission`` conditions. The field in\nthe power level event the user needs a minimum power level for. Fields\nmust be specified under the ``notifications`` property in the power level\nevent's ``content``.",
"x-example" : "content.body"
},
"kind" : {
"type" : "string",
"description" : "The kind of condition to apply. See `conditions <#conditions>`_ for\nmore information on the allowed kinds and how they work."
},
"pattern" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The glob-style pattern to\nmatch against. Patterns with no special glob characters should be\ntreated as having asterisks prepended and appended when testing the\ncondition."
}
}
} ]
}
},
"default" : {
"type" : "boolean",
"description" : "Whether this is a default rule, or has been set explicitly."
},
"enabled" : {
"type" : "boolean",
"description" : "Whether the push rule is enabled or not."
},
"pattern" : {
"type" : "string",
"description" : "The glob-style pattern to match against. Only applicable to ``content``\nrules."
},
"rule_id" : {
"type" : "string",
"description" : "The ID of this rule."
}
}
} ]
},
"examples" : {
"response" : {
"value" : {
"actions" : [ "dont_notify" ],
"default" : false,
"enabled" : true,
"pattern" : "cake*lie",
"rule_id" : "nocake"
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"put" : {
"tags" : [ "Push notifications" ],
"summary" : "Add or change a push rule.",
"description" : "This endpoint allows the creation, modification and deletion of pushers\nfor this user ID. The behaviour of this endpoint varies depending on the\nvalues in the JSON body.\n\nWhen creating push rules, they MUST be enabled by default.",
"operationId" : "setPushRule",
"parameters" : [ {
"name" : "scope",
"in" : "path",
"description" : "``global`` to specify global rules.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "global"
}, {
"name" : "kind",
"in" : "path",
"description" : "The kind of rule\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"enum" : [ "override", "underride", "sender", "room", "content" ]
},
"example" : "content"
}, {
"name" : "ruleId",
"in" : "path",
"description" : "The identifier for the rule.\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "nocake"
}, {
"name" : "before",
"in" : "query",
"description" : "Use 'before' with a ``rule_id`` as its value to make the new rule the\nnext-most important rule with respect to the given user defined rule.\nIt is not possible to add a rule relative to a predefined server rule.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "someRuleId"
}, {
"name" : "after",
"in" : "query",
"description" : "This makes the new rule the next-less important rule relative to the\ngiven user defined rule. It is not possible to add a rule relative\nto a predefined server rule.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "anotherRuleId"
} ],
"requestBody" : {
"description" : "The push rule data. Additional top-level keys may be present depending\non the parameters for the rule ``kind``.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_19"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The push rule was created/updated.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"400" : {
"description" : "There was a problem configuring this push rule.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_UNKNOWN",
"error" : "before/after rule not found: someRuleId"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"delete" : {
"tags" : [ "Push notifications" ],
"summary" : "Delete a push rule.",
"description" : "This endpoint removes the push rule defined in the path.",
"operationId" : "deletePushRule",
"parameters" : [ {
"name" : "scope",
"in" : "path",
"description" : "``global`` to specify global rules.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "global"
}, {
"name" : "kind",
"in" : "path",
"description" : "The kind of rule\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"enum" : [ "override", "underride", "sender", "room", "content" ]
},
"example" : "content"
}, {
"name" : "ruleId",
"in" : "path",
"description" : "The identifier for the rule.\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "nocake"
} ],
"responses" : {
"200" : {
"description" : "The push rule was deleted.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/actions" : {
"get" : {
"tags" : [ "Push notifications" ],
"summary" : "The actions for a push rule",
"description" : "This endpoint get the actions for the specified push rule.",
"operationId" : "getPushRuleActions",
"parameters" : [ {
"name" : "scope",
"in" : "path",
"description" : "Either ``global`` or ``device/<profile_tag>`` to specify global\nrules or device rules for the given ``profile_tag``.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "global"
}, {
"name" : "kind",
"in" : "path",
"description" : "The kind of rule\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"enum" : [ "override", "underride", "sender", "room", "content" ]
},
"example" : "content"
}, {
"name" : "ruleId",
"in" : "path",
"description" : "The identifier for the rule.\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "nocake"
} ],
"responses" : {
"200" : {
"description" : "The actions for this push rule.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_30"
},
"examples" : {
"response" : {
"value" : {
"actions" : [ "notify" ]
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"put" : {
"tags" : [ "Push notifications" ],
"summary" : "Set the actions for a push rule.",
"description" : "This endpoint allows clients to change the actions of a push rule.\nThis can be used to change the actions of builtin rules.",
"operationId" : "setPushRuleActions",
"parameters" : [ {
"name" : "scope",
"in" : "path",
"description" : "``global`` to specify global rules.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "global"
}, {
"name" : "kind",
"in" : "path",
"description" : "The kind of rule\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"enum" : [ "override", "underride", "sender", "room", "content" ]
},
"example" : "room"
}, {
"name" : "ruleId",
"in" : "path",
"description" : "The identifier for the rule.\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "#spam:example.com"
} ],
"requestBody" : {
"description" : "The action(s) to perform when the conditions for this rule are met.\n",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_20"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The actions for the push rule were set.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/pushrules/{scope}/{kind}/{ruleId}/enabled" : {
"get" : {
"tags" : [ "Push notifications" ],
"summary" : "Get whether a push rule is enabled",
"description" : "This endpoint gets whether the specified push rule is enabled.",
"operationId" : "isPushRuleEnabled",
"parameters" : [ {
"name" : "scope",
"in" : "path",
"description" : "Either ``global`` or ``device/<profile_tag>`` to specify global\nrules or device rules for the given ``profile_tag``.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "global"
}, {
"name" : "kind",
"in" : "path",
"description" : "The kind of rule\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"enum" : [ "override", "underride", "sender", "room", "content" ]
},
"example" : "cake"
}, {
"name" : "ruleId",
"in" : "path",
"description" : "The identifier for the rule.\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "nocake"
} ],
"responses" : {
"200" : {
"description" : "Whether the push rule is enabled.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_31"
},
"examples" : {
"response" : {
"value" : {
"enabled" : true
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"put" : {
"tags" : [ "Push notifications" ],
"summary" : "Enable or disable a push rule.",
"description" : "This endpoint allows clients to enable or disable the specified push rule.",
"operationId" : "setPushRuleEnabled",
"parameters" : [ {
"name" : "scope",
"in" : "path",
"description" : "``global`` to specify global rules.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "global"
}, {
"name" : "kind",
"in" : "path",
"description" : "The kind of rule\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"enum" : [ "override", "underride", "sender", "room", "content" ]
},
"example" : "content"
}, {
"name" : "ruleId",
"in" : "path",
"description" : "The identifier for the rule.\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "nocake"
} ],
"requestBody" : {
"description" : "Whether the push rule is enabled or not.\n",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_21"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The push rule was enabled or disabled.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/register" : {
"post" : {
"tags" : [ "User data" ],
"summary" : "Register for an account on this homeserver.",
"description" : "This API endpoint uses the `User-Interactive Authentication API`_, except in\nthe cases where a guest account is being registered.\n\nRegister for an account on this homeserver.\n\nThere are two kinds of user account:\n\n- `user` accounts. These accounts may use the full API described in this specification.\n\n- `guest` accounts. These accounts may have limited permissions and may not be supported by all servers.\n\nIf registration is successful, this endpoint will issue an access token\nthe client can use to authorize itself in subsequent requests.\n\nIf the client does not supply a ``device_id``, the server must\nauto-generate one.\n\nThe server SHOULD register an account with a User ID based on the\n``username`` provided, if any. Note that the grammar of Matrix User ID\nlocalparts is restricted, so the server MUST either map the provided\n``username`` onto a ``user_id`` in a logical manner, or reject\n``username``\\s which do not comply to the grammar, with\n``M_INVALID_USERNAME``.\n\nMatrix clients MUST NOT assume that localpart of the registered\n``user_id`` matches the provided ``username``.\n\nThe returned access token must be associated with the ``device_id``\nsupplied by the client or generated by the server. The server may\ninvalidate any access token previously associated with that device. See\n`Relationship between access tokens and devices`_.\n\nWhen registering a guest account, all parameters in the request body\nwith the exception of ``initial_device_display_name`` MUST BE ignored\nby the server. The server MUST pick a ``device_id`` for the account\nregardless of input.\n\nAny user ID returned by this API must conform to the grammar given in the\n`Matrix specification <../appendices.html#user-identifiers>`_.",
"operationId" : "register",
"parameters" : [ {
"name" : "kind",
"in" : "query",
"description" : "The kind of account to register. Defaults to ``user``.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"default" : "user",
"enum" : [ "guest", "user" ]
},
"example" : "user"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_22"
}
}
}
},
"responses" : {
"200" : {
"description" : "The account has been registered.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_32"
},
"examples" : {
"response" : {
"value" : {
"access_token" : "abc123",
"device_id" : "GHTYAJCE",
"user_id" : "@cheeky_monkey:matrix.org"
}
}
}
}
}
},
"400" : {
"description" : "Part of the request was invalid. This may include one of the following error codes:\n\n* ``M_USER_IN_USE`` : The desired user ID is already taken.\n* ``M_INVALID_USERNAME`` : The desired user ID is not a valid user name.\n* ``M_EXCLUSIVE`` : The desired user ID is in the exclusive namespace\n claimed by an application service.\n\nThese errors may be returned at any stage of the registration process,\nincluding after authentication if the requested user ID was registered\nwhilst the client was performing authentication.\n\nHomeservers MUST perform the relevant checks and return these codes before\nperforming User-Interactive Authentication, although they may also return\nthem after authentication is completed if, for example, the requested user ID\nwas registered whilst the client was performing authentication.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_USER_IN_USE",
"error" : "Desired user ID is already taken."
}
}
}
}
}
},
"401" : {
"description" : "The homeserver requires additional authentication information.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Authentication response"
}
}
}
},
"403" : {
"description" : "The homeserver does not permit registering the account. This response\ncan be used to identify that a particular ``kind`` of account is not\nallowed, or that registration is generally not supported by the homeserver.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "Registration is disabled"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
}
}
},
"/_matrix/client/r0/register/available" : {
"get" : {
"tags" : [ "User data" ],
"summary" : "Checks to see if a username is available on the server.",
"description" : "Checks to see if a username is available, and valid, for the server.\n\nThe server should check to ensure that, at the time of the request, the\nusername requested is available for use. This includes verifying that an\napplication service has not claimed the username and that the username\nfits the server's desired requirements (for example, a server could dictate\nthat it does not permit usernames with underscores).\n\nMatrix clients may wish to use this API prior to attempting registration,\nhowever the clients must also be aware that using this API does not normally\nreserve the username. This can mean that the username becomes unavailable\nbetween checking its availability and attempting to register it.",
"operationId" : "checkUsernameAvailability",
"parameters" : [ {
"name" : "username",
"in" : "query",
"description" : "The username to check the availability of.",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"default" : "my_cool_localpart"
},
"example" : "my_cool_localpart"
} ],
"responses" : {
"200" : {
"description" : "The username is available",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_33"
},
"examples" : {
"response" : {
"value" : {
"available" : true
}
}
}
}
}
},
"400" : {
"description" : "Part of the request was invalid or the username is not available. This may\ninclude one of the following error codes:\n\n* ``M_USER_IN_USE`` : The desired username is already taken.\n* ``M_INVALID_USERNAME`` : The desired username is not a valid user name.\n* ``M_EXCLUSIVE`` : The desired username is in the exclusive namespace\n claimed by an application service.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_USER_IN_USE",
"error" : "Desired user ID is already taken."
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
}
}
},
"/_matrix/client/r0/rooms/{roomId}/aliases" : {
"get" : {
"tags" : [ "Room directory" ],
"summary" : "Get a list of local aliases on a given room.",
"description" : "Get a list of aliases maintained by the local server for the\ngiven room.\n\nThis endpoint can be called by users who are in the room (external\nusers receive an ``M_FORBIDDEN`` error response). If the room's\n``m.room.history_visibility`` maps to ``world_readable``, any\nuser can call this endpoint.\n\nServers may choose to implement additional access control checks here,\nsuch as allowing server administrators to view aliases regardless of\nmembership.\n\n.. Note::\n Clients are recommended not to display this list of aliases prominently\n as they are not curated, unlike those listed in the ``m.room.canonical_alias``\n state event.",
"operationId" : "getLocalAliases",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room ID to find local aliases of.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!abc123:example.org"
} ],
"responses" : {
"200" : {
"description" : "The list of local aliases for the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_34"
},
"examples" : {
"response" : {
"value" : {
"aliases" : [ "#somewhere:example.com", "#another:example.com", "#hat_trick:example.com" ]
}
}
}
}
}
},
"403" : {
"description" : "The user is not permitted to retrieve the list of local aliases for the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "You are not a member of the room."
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/ban" : {
"post" : {
"tags" : [ "Room membership" ],
"summary" : "Ban a user in the room.",
"description" : "Ban a user in the room. If the user is currently in the room, also kick them.\n\nWhen a user is banned from a room, they may not join it or be invited to it until they are unbanned.\n\nThe caller must have the required power level in order to perform this operation.",
"operationId" : "ban",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room identifier (not alias) from which the user should be banned.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!e42d8c:matrix.org"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_23"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The user has been kicked and banned from the room.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"403" : {
"description" : "You do not have permission to ban the user from the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejections are:\n\n- The banner is not currently in the room.\n- The banner's power level is insufficient to ban users from the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "You do not have a high enough power level to ban from this room."
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/context/{eventId}" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Get events and state around the specified event.",
"description" : "This API returns a number of events that happened just before and\nafter the specified event. This allows clients to get the context\nsurrounding an event.\n\n*Note*: This endpoint supports lazy-loading of room member events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_ for more information.",
"operationId" : "getEventContext",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room to get events from.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:example.com"
}, {
"name" : "eventId",
"in" : "path",
"description" : "The event to get context around.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "$f3h4d129462ha:example.com"
}, {
"name" : "limit",
"in" : "query",
"description" : "The maximum number of events to return. Default: 10.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer"
},
"example" : 3
}, {
"name" : "filter",
"in" : "query",
"description" : "A JSON ``RoomEventFilter`` to filter the returned events with. The\nfilter is only applied to ``events_before``, ``events_after``, and\n``state``. It is not applied to the ``event`` itself. The filter may \nbe applied before or/and after the ``limit`` parameter - whichever the \nhomeserver prefers.\n\nSee `Filtering <#filtering>`_ for more information.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "66696p746572"
} ],
"responses" : {
"200" : {
"description" : "The events and state surrounding the requested event.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_35"
},
"examples" : {
"response" : {
"value" : {
"end" : "t29-57_2_0_2",
"event" : {
"content" : {
"body" : "filename.jpg",
"info" : {
"h" : 398,
"mimetype" : "image/jpeg",
"size" : 31037,
"w" : 394
},
"msgtype" : "m.image",
"url" : "mxc://example.org/JWEIFJgwEIhweiWJE"
},
"event_id" : "$f3h4d129462ha:example.com",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
},
"events_after" : [ {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
} ],
"events_before" : [ {
"content" : {
"body" : "something-important.doc",
"filename" : "something-important.doc",
"info" : {
"mimetype" : "application/msword",
"size" : 46144
},
"msgtype" : "m.file",
"url" : "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
} ],
"start" : "t27-54_2_0_2",
"state" : [ {
"content" : {
"creator" : "@example:example.org",
"m.federate" : true,
"predecessor" : {
"event_id" : "$something:example.org",
"room_id" : "!oldroom:example.org"
},
"room_version" : "1"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.create",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"avatar_url" : "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname" : "Alice Margatroid",
"membership" : "join"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "@alice:example.org",
"type" : "m.room.member",
"unsigned" : {
"age" : 1234
}
} ]
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/event/{eventId}" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Get a single event by event ID.",
"description" : "Get a single event based on ``roomId/eventId``. You must have permission to\nretrieve this event e.g. by being a member in the room for this event.",
"operationId" : "getOneRoomEvent",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The ID of the room the event is in.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:matrix.org"
}, {
"name" : "eventId",
"in" : "path",
"description" : "The event ID to get.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "$asfDuShaf7Gafaw:matrix.org"
} ],
"responses" : {
"200" : {
"description" : "The full event.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_11"
},
"examples" : {
"response" : {
"value" : {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:matrix.org",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
}
}
}
}
}
},
"404" : {
"description" : "The event was not found or you do not have permission to read this event.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_NOT_FOUND",
"error" : "Event not found."
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/forget" : {
"post" : {
"tags" : [ "Room membership" ],
"summary" : "Stop the requesting user remembering about a particular room.",
"description" : "This API stops a user remembering about a particular room.\n\nIn general, history is a first class citizen in Matrix. After this API\nis called, however, a user will no longer be able to retrieve history\nfor this room. If all users on a homeserver forget a room, the room is\neligible for deletion from that homeserver.\n\nIf the user is currently joined to the room, they must leave the room\nbefore calling this API.",
"operationId" : "forgetRoom",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room identifier to forget.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!au1ba7o:matrix.org"
} ],
"responses" : {
"200" : {
"description" : "The room has been forgotten.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"400" : {
"description" : "The user has not left the room",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_UNKNOWN",
"error" : "User @example:matrix.org is in room !au1ba7o:matrix.org"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/initialSync" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Snapshot the current state of a room and its most recent messages.",
"description" : "Get a copy of the current state and the most recent messages in a room.\n\nThis endpoint was deprecated in r0 of this specification. There is no\ndirect replacement; the relevant information is returned by the\n|/sync|_ API. See the `migration guide\n<https://matrix.org/docs/guides/client-server-migrating-from-v1.html#deprecated-endpoints>`_.",
"operationId" : "roomInitialSync",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room to get the data.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:example.com"
} ],
"responses" : {
"200" : {
"description" : "The current state of the room",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/RoomInfo"
},
"examples" : {
"response" : {
"value" : {
"account_data" : [ {
"content" : {
"tags" : {
"work" : {
"order" : "1"
}
}
},
"type" : "m.tag"
} ],
"membership" : "join",
"messages" : {
"chunk" : [ {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"body" : "something-important.doc",
"filename" : "something-important.doc",
"info" : {
"mimetype" : "application/msword",
"size" : 46144
},
"msgtype" : "m.file",
"url" : "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
} ],
"end" : "s3456_9_0",
"start" : "t44-3453_9_0"
},
"room_id" : "!636q39766251:example.com",
"state" : [ {
"content" : {
"join_rule" : "public"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.join_rules",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"avatar_url" : "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname" : "Alice Margatroid",
"membership" : "join"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "@alice:example.org",
"type" : "m.room.member",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"creator" : "@example:example.org",
"m.federate" : true,
"predecessor" : {
"event_id" : "$something:example.org",
"room_id" : "!oldroom:example.org"
},
"room_version" : "1"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.create",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"ban" : 50,
"events" : {
"m.room.name" : 100,
"m.room.power_levels" : 100
},
"events_default" : 0,
"invite" : 50,
"kick" : 50,
"notifications" : {
"room" : 20
},
"redact" : 50,
"state_default" : 50,
"users" : {
"@example:localhost" : 100
},
"users_default" : 0
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.power_levels",
"unsigned" : {
"age" : 1234
}
} ],
"visibility" : "private"
}
}
}
}
}
},
"403" : {
"description" : "You aren't a member of the room and weren't previously a member of the room.\n"
}
},
"deprecated" : true,
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/invite" : {
"post" : {
"tags" : [ "Room membership" ],
"summary" : "Invite a user to participate in a particular room.",
"description" : ".. _invite-by-third-party-id-endpoint:\n\n*Note that there are two forms of this API, which are documented separately.\nThis version of the API does not require that the inviter know the Matrix\nidentifier of the invitee, and instead relies on third party identifiers.\nThe homeserver uses an identity server to perform the mapping from\nthird party identifier to a Matrix identifier. The other is documented in the*\n`joining rooms section`_.\n\nThis API invites a user to participate in a particular room.\nThey do not start participating in the room until they actually join the\nroom.\n\nOnly users currently in a particular room can invite other users to\njoin that room.\n\nIf the identity server did know the Matrix user identifier for the\nthird party identifier, the homeserver will append a ``m.room.member``\nevent to the room.\n\nIf the identity server does not know a Matrix user identifier for the\npassed third party identifier, the homeserver will issue an invitation\nwhich can be accepted upon providing proof of ownership of the third\nparty identifier. This is achieved by the identity server generating a\ntoken, which it gives to the inviting homeserver. The homeserver will\nadd an ``m.room.third_party_invite`` event into the graph for the room,\ncontaining that token.\n\nWhen the invitee binds the invited third party identifier to a Matrix\nuser ID, the identity server will give the user a list of pending\ninvitations, each containing:\n\n- The room ID to which they were invited\n\n- The token given to the homeserver\n\n- A signature of the token, signed with the identity server's private key\n\n- The matrix user ID who invited them to the room\n\nIf a token is requested from the identity server, the homeserver will\nappend a ``m.room.third_party_invite`` event to the room.\n\n.. _joining rooms section: `invite-by-user-id-endpoint`_",
"operationId" : "inviteBy3PID",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room identifier (not alias) to which to invite the user.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!d41d8cd:matrix.org"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_24"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The user has been invited to join the room.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"403" : {
"description" : "You do not have permission to invite the user to the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejections are:\n\n- The invitee has been banned from the room.\n- The invitee is already a member of the room.\n- The inviter is not currently in the room.\n- The inviter's power level is insufficient to invite users to the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "@cheeky_monkey:matrix.org is banned from the room"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/invite " : {
"post" : {
"tags" : [ "Room membership" ],
"summary" : "Invite a user to participate in a particular room.",
"description" : ".. _invite-by-user-id-endpoint:\n\n*Note that there are two forms of this API, which are documented separately.\nThis version of the API requires that the inviter knows the Matrix\nidentifier of the invitee. The other is documented in the*\n`third party invites section`_.\n\nThis API invites a user to participate in a particular room.\nThey do not start participating in the room until they actually join the\nroom.\n\nOnly users currently in a particular room can invite other users to\njoin that room.\n\nIf the user was invited to the room, the homeserver will append a\n``m.room.member`` event to the room.\n\n.. _third party invites section: `invite-by-third-party-id-endpoint`_",
"operationId" : "inviteUser",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room identifier (not alias) to which to invite the user.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!d41d8cd:matrix.org"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_25"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The user has been invited to join the room.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"400" : {
"description" : "\nThe request is invalid. A meaningful ``errcode`` and description\nerror text will be returned. Example reasons for rejection include:\n\n- The request body is malformed (``errcode`` set to ``M_BAD_JSON``\n or ``M_NOT_JSON``).\n\n- One or more users being invited to the room are residents of a\n homeserver which does not support the requested room version. The\n ``errcode`` will be ``M_UNSUPPORTED_ROOM_VERSION`` in these cases.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
}
}
},
"403" : {
"description" : "You do not have permission to invite the user to the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejections are:\n\n- The invitee has been banned from the room.\n- The invitee is already a member of the room.\n- The inviter is not currently in the room.\n- The inviter's power level is insufficient to invite users to the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "@cheeky_monkey:matrix.org is banned from the room"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/join" : {
"post" : {
"tags" : [ "Room membership" ],
"summary" : "Start the requesting user participating in a particular room.",
"description" : "*Note that this API requires a room ID, not alias.* ``/join/{roomIdOrAlias}`` *exists if you have a room alias.*\n\nThis API starts a user participating in a particular room, if that user\nis allowed to participate in that room. After this call, the client is\nallowed to see all current state events in the room, and all subsequent\nevents associated with the room until the user leaves the room.\n\nAfter a user has joined a room, the room will appear as an entry in the\nresponse of the |/initialSync|_ and |/sync|_ APIs.\n\nIf a ``third_party_signed`` was supplied, the homeserver must verify\nthat it matches a pending ``m.room.third_party_invite`` event in the\nroom, and perform key validity checking if required by the event.",
"operationId" : "joinRoomById",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room identifier (not alias) to join.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!d41d8cd:matrix.org"
} ],
"requestBody" : {
"$ref" : "#/components/requestBodies/joinRoomThirdPartySigned"
},
"responses" : {
"200" : {
"description" : "The room has been joined.\n\nThe joined room ID must be returned in the ``room_id`` field.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_13"
},
"examples" : {
"response" : {
"value" : {
"room_id" : "!d41d8cd:matrix.org"
}
}
}
}
}
},
"403" : {
"description" : "You do not have permission to join the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejection are:\n\n- The room is invite-only and the user was not invited.\n- The user has been banned from the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "You are not invited to this room."
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/joined_members" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Gets the list of currently joined users and their profile data.",
"description" : "This API returns a map of MXIDs to member info objects for members of the room. The current user must be in the room for it to work, unless it is an Application Service in which case any of the AS's users must be in the room. This API is primarily for Application Services and should be faster to respond than ``/members`` as it can be implemented more efficiently on the server.",
"operationId" : "getJoinedMembersByRoom",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room to get the members of.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:example.com"
} ],
"responses" : {
"200" : {
"description" : "A map of MXID to room member objects.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_36"
},
"examples" : {
"response" : {
"value" : {
"joined" : {
"@bar:example.com" : {
"avatar_url" : "mxc://riot.ovh/printErCATzZijQsSDWorRaK",
"display_name" : "Bar"
}
}
}
}
}
}
}
},
"403" : {
"description" : "You aren't a member of the room.\n"
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/kick" : {
"post" : {
"tags" : [ "Room membership" ],
"summary" : "Kick a user from the room.",
"description" : "Kick a user from the room.\n\nThe caller must have the required power level in order to perform this operation.\n\nKicking a user adjusts the target member's membership state to be ``leave`` with an\noptional ``reason``. Like with other membership changes, a user can directly adjust\nthe target member's state by making a request to ``/rooms/<room id>/state/m.room.member/<user id>``.",
"operationId" : "kick",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room identifier (not alias) from which the user should be kicked.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!e42d8c:matrix.org"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_26"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The user has been kicked from the room.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"403" : {
"description" : "You do not have permission to kick the user from the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejections are:\n\n- The kicker is not currently in the room.\n- The kickee is not currently in the room.\n- The kicker's power level is insufficient to kick users from the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "You do not have a high enough power level to kick from this room."
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/leave" : {
"post" : {
"tags" : [ "Room membership" ],
"summary" : "Stop the requesting user participating in a particular room.",
"description" : "This API stops a user participating in a particular room.\n\nIf the user was already in the room, they will no longer be able to see\nnew events in the room. If the room requires an invite to join, they\nwill need to be re-invited before they can re-join.\n\nIf the user was invited to the room, but had not joined, this call\nserves to reject the invite.\n\nThe user will still be allowed to retrieve history from the room which\nthey were previously allowed to see.",
"operationId" : "leaveRoom",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room identifier to leave.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!nkl290a:matrix.org"
} ],
"responses" : {
"200" : {
"description" : "The room has been left.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/members" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Get the m.room.member events for the room.",
"description" : "Get the list of members for this room.",
"operationId" : "getMembersByRoom",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room to get the member events for.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:example.com"
}, {
"name" : "at",
"in" : "query",
"description" : "The point in time (pagination token) to return members for in the room.\nThis token can be obtained from a ``prev_batch`` token returned for\neach room by the sync API. Defaults to the current state of the room,\nas determined by the server.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "YWxsCgpOb25lLDM1ODcwOA"
}, {
"name" : "membership",
"in" : "query",
"description" : "The kind of membership to filter for. Defaults to no filtering if\nunspecified. When specified alongside ``not_membership``, the two\nparameters create an 'or' condition: either the membership *is*\nthe same as ``membership`` **or** *is not* the same as ``not_membership``.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "join", "invite", "leave", "ban" ]
},
"example" : "join"
}, {
"name" : "not_membership",
"in" : "query",
"description" : "The kind of membership to exclude from the results. Defaults to no\nfiltering if unspecified.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "join", "invite", "leave", "ban" ]
},
"example" : "leave"
} ],
"responses" : {
"200" : {
"description" : "A list of members of the room. If you are joined to the room then\nthis will be the current members of the room. If you have left the\nroom then this will be the members of the room when you left.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_37"
},
"examples" : {
"response" : {
"value" : {
"chunk" : [ {
"content" : {
"avatar_url" : "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname" : "Alice Margatroid",
"membership" : "join"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "@alice:example.org",
"type" : "m.room.member",
"unsigned" : {
"age" : 1234
}
} ]
}
}
}
}
}
},
"403" : {
"description" : "You aren't a member of the room and weren't previously a member of the room.\n"
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/messages" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Get a list of events for this room",
"description" : "This API returns a list of message and state events for a room. It uses\npagination query parameters to paginate history in the room.\n\n*Note*: This endpoint supports lazy-loading of room member events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_ for more information.",
"operationId" : "getRoomEvents",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room to get events from.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:example.com"
}, {
"name" : "from",
"in" : "query",
"description" : "The token to start returning events from. This token can be obtained\nfrom a ``prev_batch`` token returned for each room by the sync API,\nor from a ``start`` or ``end`` token returned by a previous request\nto this endpoint.",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "s345_678_333"
}, {
"name" : "to",
"in" : "query",
"description" : "The token to stop returning events at. This token can be obtained from\na ``prev_batch`` token returned for each room by the sync endpoint,\nor from a ``start`` or ``end`` token returned by a previous request to\nthis endpoint.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
}, {
"name" : "dir",
"in" : "query",
"description" : "The direction to return events from.",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "b", "f" ]
},
"example" : "b"
}, {
"name" : "limit",
"in" : "query",
"description" : "The maximum number of events to return. Default: 10.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer"
},
"example" : "3"
}, {
"name" : "filter",
"in" : "query",
"description" : "A JSON RoomEventFilter to filter returned events with.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "{\"contains_url\":true}"
} ],
"responses" : {
"200" : {
"description" : "A list of messages with a new token to request more.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_38"
},
"examples" : {
"response" : {
"value" : {
"chunk" : [ {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"name" : "The room name"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.name",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"body" : "Gangnam Style",
"info" : {
"duration" : 2140786,
"h" : 320,
"mimetype" : "video/mp4",
"size" : 1563685,
"thumbnail_info" : {
"h" : 300,
"mimetype" : "image/jpeg",
"size" : 46144,
"w" : 300
},
"thumbnail_url" : "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe",
"w" : 480
},
"msgtype" : "m.video",
"url" : "mxc://example.org/a526eYUSFFxlgbQYZmo442"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
} ],
"end" : "t47409-4357353_219380_26003_2265",
"start" : "t47429-4392820_219380_26003_2265"
}
}
}
}
}
},
"403" : {
"description" : "You aren't a member of the room.\n"
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/read_markers" : {
"post" : {
"tags" : [ "Read Markers" ],
"summary" : "Set the position of the read marker for a room.",
"description" : "Sets the position of the read marker for a given room, and optionally\nthe read receipt's location.",
"operationId" : "setReadMarker",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room ID to set the read marker in for the user.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!somewhere:example.org"
} ],
"requestBody" : {
"description" : "The read marker and optional read receipt locations.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_27"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The read marker, and read receipt if provided, have been updated.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"properties" : { }
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/receipt/{receiptType}/{eventId}" : {
"post" : {
"tags" : [ "Room participation" ],
"summary" : "Send a receipt for the given event ID.",
"description" : "This API updates the marker for the given receipt type to the event ID\nspecified.",
"operationId" : "postReceipt",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room in which to send the event.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!wefuh21ffskfuh345:example.com"
}, {
"name" : "receiptType",
"in" : "path",
"description" : "The type of receipt to send.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"enum" : [ "m.read" ]
},
"example" : "m.read"
}, {
"name" : "eventId",
"in" : "path",
"description" : "The event ID to acknowledge up to.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "$1924376522eioj:example.com"
} ],
"requestBody" : {
"description" : "Extra receipt information to attach to ``content`` if any. The\nserver will automatically set the ``ts`` field.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"example" : { }
}
}
}
},
"responses" : {
"200" : {
"description" : "The receipt was sent.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/redact/{eventId}/{txnId}" : {
"put" : {
"tags" : [ "Room participation" ],
"summary" : "Strips all non-integrity-critical information out of an event.",
"description" : "Strips all information out of an event which isn't critical to the\nintegrity of the server-side representation of the room.\n\nThis cannot be undone.\n\nUsers may redact their own events, and any user with a power level\ngreater than or equal to the ``redact`` power level of the room may\nredact events there.",
"operationId" : "redactEvent",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room from which to redact the event.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!637q39766251:example.com"
}, {
"name" : "eventId",
"in" : "path",
"description" : "The ID of the event to redact",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "bai2b1i9:matrix.org"
}, {
"name" : "txnId",
"in" : "path",
"description" : "The transaction ID for this event. Clients should generate a\nunique ID; it will be used by the server to ensure idempotency of requests.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "37"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_28"
}
}
}
},
"responses" : {
"200" : {
"description" : "An ID for the redaction event.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_39"
},
"examples" : {
"response" : {
"value" : {
"event_id" : "$YUwQidLecu:example.com"
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/report/{eventId}" : {
"post" : {
"tags" : [ "Reporting content" ],
"summary" : "Reports an event as inappropriate.",
"description" : "Reports an event as inappropriate to the server, which may then notify\nthe appropriate people.",
"operationId" : "reportContent",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room in which the event being reported is located.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!637q39766251:example.com"
}, {
"name" : "eventId",
"in" : "path",
"description" : "The event to report.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "$something:example.org"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_29"
}
}
}
},
"responses" : {
"200" : {
"description" : "The event has been reported successfully.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/send/{eventType}/{txnId}" : {
"put" : {
"tags" : [ "Room participation" ],
"summary" : "Send a message event to the given room.",
"description" : "This endpoint is used to send a message event to a room. Message events\nallow access to historical events and pagination, making them suited\nfor \"once-off\" activity in a room.\n\nThe body of the request should be the content object of the event; the\nfields in this object will vary depending on the type of event. See\n`Room Events`_ for the m. event specification.",
"operationId" : "sendMessage",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room to send the event to.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:example.com"
}, {
"name" : "eventType",
"in" : "path",
"description" : "The type of event to send.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "m.room.message"
}, {
"name" : "txnId",
"in" : "path",
"description" : "The transaction ID for this event. Clients should generate an\nID unique across requests with the same access token; it will be\nused by the server to ensure idempotency of requests.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "35"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"example" : {
"body" : "hello",
"msgtype" : "m.text"
}
}
}
}
},
"responses" : {
"200" : {
"description" : "An ID for the sent event.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_40"
},
"examples" : {
"response" : {
"value" : {
"event_id" : "$YUwRidLecu:example.com"
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/state" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Get all state events in the current state of a room.",
"description" : "Get the state events for the current state of a room.",
"operationId" : "getRoomState",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room to look up the state for.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:example.com"
} ],
"responses" : {
"200" : {
"description" : "The current state of the room",
"content" : {
"application/json" : {
"schema" : {
"title" : "RoomState",
"type" : "array",
"description" : "If the user is a member of the room this will be the\ncurrent state of the room as a list of events. If the user\nhas left the room then this will be the state of the room\nwhen they left as a list of events.",
"items" : {
"title" : "StateEvent",
"type" : "object",
"allOf" : [ {
"title" : "State Event",
"type" : "object",
"description" : "State Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}, {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
} ]
}
},
"examples" : {
"response" : {
"value" : [ {
"content" : {
"join_rule" : "public"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.join_rules",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"avatar_url" : "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname" : "Alice Margatroid",
"membership" : "join"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "@alice:example.org",
"type" : "m.room.member",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"creator" : "@example:example.org",
"m.federate" : true,
"predecessor" : {
"event_id" : "$something:example.org",
"room_id" : "!oldroom:example.org"
},
"room_version" : "1"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.create",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"ban" : 50,
"events" : {
"m.room.name" : 100,
"m.room.power_levels" : 100
},
"events_default" : 0,
"invite" : 50,
"kick" : 50,
"notifications" : {
"room" : 20
},
"redact" : 50,
"state_default" : 50,
"users" : {
"@example:localhost" : 100
},
"users_default" : 0
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!636q39766251:example.com",
"sender" : "@example:example.org",
"state_key" : "",
"type" : "m.room.power_levels",
"unsigned" : {
"age" : 1234
}
} ]
}
}
}
}
},
"403" : {
"description" : "You aren't a member of the room and weren't previously a member of the room.\n"
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/state/{eventType}/{stateKey}" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Get the state identified by the type and key.",
"description" : ".. For backwards compatibility with older links...\n.. _`get-matrix-client-unstable-rooms-roomid-state-eventtype`:\n\nLooks up the contents of a state event in a room. If the user is\njoined to the room then the state is taken from the current\nstate of the room. If the user has left the room then the state is\ntaken from the state of the room when they left.",
"operationId" : "getRoomStateWithKey",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room to look up the state in.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:example.com"
}, {
"name" : "eventType",
"in" : "path",
"description" : "The type of state to look up.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "m.room.name"
}, {
"name" : "stateKey",
"in" : "path",
"description" : "The key of the state to look up. Defaults to an empty string. When\nan empty string, the trailing slash on this endpoint is optional.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "The content of the state event.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : {
"name" : "Example room name"
}
}
}
}
}
},
"403" : {
"description" : "You aren't a member of the room and weren't previously a member of the room.\n"
},
"404" : {
"description" : "The room has no state with the given type or key."
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"put" : {
"tags" : [ "Room participation" ],
"summary" : "Send a state event to the given room.",
"description" : ".. For backwards compatibility with older links...\n.. _`put-matrix-client-unstable-rooms-roomid-state-eventtype`:\n\nState events can be sent using this endpoint. These events will be\noverwritten if ``<room id>``, ``<event type>`` and ``<state key>`` all\nmatch.\n\nRequests to this endpoint **cannot use transaction IDs**\nlike other ``PUT`` paths because they cannot be differentiated from the\n``state_key``. Furthermore, ``POST`` is unsupported on state paths.\n\nThe body of the request should be the content object of the event; the\nfields in this object will vary depending on the type of event. See\n`Room Events`_ for the ``m.`` event specification.\n\nIf the event type being sent is ``m.room.canonical_alias`` servers\nSHOULD ensure that any new aliases being listed in the event are valid\nper their grammar/syntax and that they point to the room ID where the\nstate event is to be sent. Servers do not validate aliases which are\nbeing removed or are already present in the state event.\n",
"operationId" : "setRoomStateWithKey",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room to set the state in",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!636q39766251:example.com"
}, {
"name" : "eventType",
"in" : "path",
"description" : "The type of event to send.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "m.room.member"
}, {
"name" : "stateKey",
"in" : "path",
"description" : "The state_key for the state to send. Defaults to the empty string. When\nan empty string, the trailing slash on this endpoint is optional.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"example" : {
"avatar_url" : "mxc://localhost/SEsfnsuifSDFSSEF",
"displayname" : "Alice Margatroid",
"membership" : "join"
}
}
}
}
},
"responses" : {
"200" : {
"description" : "An ID for the sent event.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_40"
},
"examples" : {
"response" : {
"value" : {
"event_id" : "$YUwRidLecu:example.com"
}
}
}
}
}
},
"400" : {
"description" : "The sender's request is malformed.\n\nSome example error codes include:\n\n* ``M_INVALID_PARAMETER``: One or more aliases within the ``m.room.canonical_alias``\n event have invalid syntax.\n\n* ``M_BAD_ALIAS``: One or more aliases within the ``m.room.canonical_alias`` event\n do not point to the room ID for which the state event is to be sent to.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_BAD_ALIAS",
"error" : "The alias '#hello:example.org' does not point to this room."
}
}
}
}
}
},
"403" : {
"description" : "The sender doesn't have permission to send the event into the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "You do not have permission to send the event."
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/typing/{userId}" : {
"put" : {
"tags" : [ "Room participation" ],
"summary" : "Informs the server that the user has started or stopped typing.",
"description" : "This tells the server that the user is typing for the next N\nmilliseconds where N is the value specified in the ``timeout`` key.\nAlternatively, if ``typing`` is ``false``, it tells the server that the\nuser has stopped typing.",
"operationId" : "setTyping",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user who has started to type.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
}, {
"name" : "roomId",
"in" : "path",
"description" : "The room in which the user is typing.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!wefh3sfukhs:example.com"
} ],
"requestBody" : {
"description" : "The current typing state.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_30"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The new typing state was set.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/unban" : {
"post" : {
"tags" : [ "Room membership" ],
"summary" : "Unban a user from the room.",
"description" : "Unban a user from the room. This allows them to be invited to the room,\nand join if they would otherwise be allowed to join according to its join rules.\n\nThe caller must have the required power level in order to perform this operation.",
"operationId" : "unban",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The room identifier (not alias) from which the user should be unbanned.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!e42d8c:matrix.org"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_31"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The user has been unbanned from the room.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
},
"403" : {
"description" : "You do not have permission to unban the user from the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejections are:\n\n- The unbanner's power level is insufficient to unban users from the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "You do not have a high enough power level to unban from this room."
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/rooms/{roomId}/upgrade" : {
"post" : {
"tags" : [ "Room upgrades" ],
"summary" : "Upgrades a room to a new room version.",
"description" : "Upgrades the given room to a particular room version.",
"operationId" : "upgradeRoom",
"parameters" : [ {
"name" : "roomId",
"in" : "path",
"description" : "The ID of the room to upgrade.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!oldroom:example.org"
} ],
"requestBody" : {
"description" : "The request body",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_32"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The room was successfully upgraded.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_41"
},
"examples" : {
"response" : {
"value" : {
"replacement_room" : "!newroom:example.org"
}
}
}
}
}
},
"400" : {
"description" : "The request was invalid. One way this can happen is if the room version\nrequested is not supported by the homeserver.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_UNSUPPORTED_ROOM_VERSION",
"error" : "This server does not support that room version"
}
}
}
}
}
},
"403" : {
"description" : "The user is not permitted to upgrade the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "You cannot upgrade this room"
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/search" : {
"post" : {
"tags" : [ "Search" ],
"summary" : "Perform a server-side search.",
"description" : "Performs a full text search across different categories.",
"operationId" : "search",
"parameters" : [ {
"name" : "next_batch",
"in" : "query",
"description" : "The point to return events from. If given, this should be a\n``next_batch`` result from a previous call to this endpoint.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "YWxsCgpOb25lLDM1ODcwOA"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_33"
}
}
}
},
"responses" : {
"200" : {
"description" : "Results of the search.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Results"
},
"examples" : {
"response" : {
"value" : {
"search_categories" : {
"room_events" : {
"count" : 1224,
"groups" : {
"room_id" : {
"!qPewotXpIctQySfjSy:localhost" : {
"next_batch" : "BdgFsdfHSf-dsFD",
"order" : 1,
"results" : [ "$144429830826TWwbB:localhost" ]
}
}
},
"highlights" : [ "martians", "men" ],
"next_batch" : "5FdgFsd234dfgsdfFD",
"results" : [ {
"rank" : 0.00424866,
"result" : {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$144429830826TWwbB:localhost",
"origin_server_ts" : 1432735824653,
"room_id" : "!qPewotXpIctQySfjSy:localhost",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
}
} ]
}
}
}
}
}
}
}
},
"400" : {
"description" : "Part of the request was invalid."
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/sendToDevice/{eventType}/{txnId}" : {
"put" : {
"tags" : [ "Send-to-Device messaging" ],
"summary" : "Send an event to a given set of devices.",
"description" : "This endpoint is used to send send-to-device events to a set of\nclient devices.",
"operationId" : "sendToDevice",
"parameters" : [ {
"name" : "eventType",
"in" : "path",
"description" : "The type of event to send.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "m.new_device"
}, {
"name" : "txnId",
"in" : "path",
"description" : "The transaction ID for this event. Clients should generate an\nID unique across requests with the same access token; it will be\nused by the server to ensure idempotency of requests.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "35"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_34"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The message was successfully sent.",
"content" : {
"application/json" : {
"examples" : {
"response" : {
"value" : { }
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/sync" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Synchronise the client's state and receive new messages.",
"description" : "Synchronise the client's state with the latest state on the server.\nClients use this API when they first log in to get an initial snapshot\nof the state on the server, and then continue to call this API to get\nincremental deltas to the state, and to receive new messages.\n\n*Note*: This endpoint supports lazy-loading. See `Filtering <#filtering>`_\nfor more information. Lazy-loading members is only supported on a ``StateFilter``\nfor this endpoint. When lazy-loading is enabled, servers MUST include the\nsyncing user's own membership event when they join a room, or when the\nfull state of rooms is requested, to aid discovering the user's avatar &\ndisplayname.\n\nLike other members, the user's own membership event is eligible\nfor being considered redundant by the server. When a sync is ``limited``,\nthe server MUST return membership events for events in the gap\n(between ``since`` and the start of the returned timeline), regardless\nas to whether or not they are redundant. This ensures that joins/leaves\nand profile changes which occur during the gap are not lost.",
"operationId" : "sync",
"parameters" : [ {
"name" : "filter",
"in" : "query",
"description" : "The ID of a filter created using the filter API or a filter JSON\nobject encoded as a string. The server will detect whether it is\nan ID or a JSON object by whether the first character is a ``\"{\"``\nopen brace. Passing the JSON inline is best suited to one off\nrequests. Creating a filter using the filter API is recommended for\nclients that reuse the same filter multiple times, for example in\nlong poll requests.\n\nSee `Filtering <#filtering>`_ for more information.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "66696p746572"
}, {
"name" : "since",
"in" : "query",
"description" : "A point in time to continue a sync from.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "s72594_4483_1934"
}, {
"name" : "full_state",
"in" : "query",
"description" : "Controls whether to include the full state for all rooms the user\nis a member of.\n\nIf this is set to ``true``, then all state events will be returned,\neven if ``since`` is non-empty. The timeline will still be limited\nby the ``since`` parameter. In this case, the ``timeout`` parameter\nwill be ignored and the query will return immediately, possibly with\nan empty timeline.\n\nIf ``false``, and ``since`` is non-empty, only state which has\nchanged since the point indicated by ``since`` will be returned.\n\nBy default, this is ``false``.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "boolean"
},
"example" : "false"
}, {
"name" : "set_presence",
"in" : "query",
"description" : "Controls whether the client is automatically marked as online by\npolling this API. If this parameter is omitted then the client is\nautomatically marked as online when it uses this API. Otherwise if\nthe parameter is set to \"offline\" then the client is not marked as\nbeing online when it uses this API. When set to \"unavailable\", the\nclient is marked as being idle.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "offline", "online", "unavailable" ]
},
"example" : "offline"
}, {
"name" : "timeout",
"in" : "query",
"description" : "The maximum time to wait, in milliseconds, before returning this\nrequest. If no events (or other data) become available before this\ntime elapses, the server will return a response with empty fields.\n\nBy default, this is ``0``, so the server will return immediately\neven if the response is empty.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer"
},
"example" : 30000
} ],
"responses" : {
"200" : {
"description" : "The initial snapshot or delta for the client to use to update their state.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_42"
},
"examples" : {
"response" : {
"value" : {
"account_data" : {
"events" : [ {
"content" : {
"custom_config_key" : "custom_config_value"
},
"type" : "org.example.custom.config"
} ]
},
"next_batch" : "s72595_4483_1934",
"presence" : {
"events" : [ {
"content" : {
"avatar_url" : "mxc://localhost:wefuiwegh8742w",
"currently_active" : false,
"last_active_ago" : 2478593,
"presence" : "online",
"status_msg" : "Making cupcakes"
},
"sender" : "@example:localhost",
"type" : "m.presence"
} ]
},
"rooms" : {
"invite" : {
"!696r7674:example.com" : {
"invite_state" : {
"events" : [ {
"content" : {
"name" : "My Room Name"
},
"sender" : "@alice:example.com",
"state_key" : "",
"type" : "m.room.name"
}, {
"content" : {
"membership" : "invite"
},
"sender" : "@alice:example.com",
"state_key" : "@bob:example.com",
"type" : "m.room.member"
} ]
}
}
},
"join" : {
"!726s6s6q:example.com" : {
"account_data" : {
"events" : [ {
"content" : {
"tags" : {
"u.work" : {
"order" : 0.9
}
}
},
"type" : "m.tag"
}, {
"content" : {
"custom_config_key" : "custom_config_value"
},
"type" : "org.example.custom.room.config"
} ]
},
"ephemeral" : {
"events" : [ {
"content" : {
"user_ids" : [ "@alice:matrix.org", "@bob:example.com" ]
},
"room_id" : "!jEsUZKDJdhlrceRyVU:example.org",
"type" : "m.typing"
} ]
},
"state" : {
"events" : [ {
"content" : {
"avatar_url" : "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname" : "Alice Margatroid",
"membership" : "join"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!726s6s6q:example.com",
"sender" : "@example:example.org",
"state_key" : "@alice:example.org",
"type" : "m.room.member",
"unsigned" : {
"age" : 1234
}
} ]
},
"summary" : {
"m.heroes" : [ "@alice:example.com", "@bob:example.com" ],
"m.invited_member_count" : 0,
"m.joined_member_count" : 2
},
"timeline" : {
"events" : [ {
"content" : {
"avatar_url" : "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname" : "Alice Margatroid",
"membership" : "join"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!726s6s6q:example.com",
"sender" : "@example:example.org",
"state_key" : "@alice:example.org",
"type" : "m.room.member",
"unsigned" : {
"age" : 1234
}
}, {
"content" : {
"body" : "This is an example text message",
"format" : "org.matrix.custom.html",
"formatted_body" : "<b>This is an example text message</b>",
"msgtype" : "m.text"
},
"event_id" : "$143273582443PhrSn:example.org",
"origin_server_ts" : 1432735824653,
"room_id" : "!726s6s6q:example.com",
"sender" : "@example:example.org",
"type" : "m.room.message",
"unsigned" : {
"age" : 1234
}
} ],
"limited" : true,
"prev_batch" : "t34-23535_0_0"
}
}
},
"leave" : { }
}
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/user/{userId}/account_data/{type}" : {
"get" : {
"tags" : [ "User data" ],
"summary" : "Get some account_data for the user.",
"description" : "Get some account_data for the client. This config is only visible to the user\nthat set the account_data.",
"operationId" : "getAccountData",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The ID of the user to get account_data for. The access token must be\nauthorized to make requests for this user ID.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
}, {
"name" : "type",
"in" : "path",
"description" : "The event type of the account_data to get. Custom types should be\nnamespaced to avoid clashes.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "org.example.custom.config"
} ],
"responses" : {
"200" : {
"description" : "The account data content for the given type.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"example" : {
"custom_account_data_key" : "custom_config_value"
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"put" : {
"tags" : [ "User data" ],
"summary" : "Set some account_data for the user.",
"description" : "Set some account_data for the client. This config is only visible to the user\nthat set the account_data. The config will be synced to clients in the\ntop-level ``account_data``.",
"operationId" : "setAccountData",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The ID of the user to set account_data for. The access token must be\nauthorized to make requests for this user ID.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
}, {
"name" : "type",
"in" : "path",
"description" : "The event type of the account_data to set. Custom types should be\nnamespaced to avoid clashes.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "org.example.custom.config"
} ],
"requestBody" : {
"description" : "The content of the account_data",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"example" : {
"custom_account_data_key" : "custom_config_value"
}
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The account_data was successfully added."
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/user/{userId}/filter" : {
"post" : {
"tags" : [ "Room participation" ],
"summary" : "Upload a new filter.",
"description" : "Uploads a new filter definition to the homeserver.\nReturns a filter ID that may be used in future requests to\nrestrict which events are returned to the client.",
"operationId" : "defineFilter",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The id of the user uploading the filter. The access token must be authorized to make requests for this user id.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"requestBody" : {
"description" : "The filter to upload.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_35"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The filter was created.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_43"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/user/{userId}/filter/{filterId}" : {
"get" : {
"tags" : [ "Room participation" ],
"summary" : "Download a filter",
"operationId" : "getFilter",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user ID to download a filter for.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
}, {
"name" : "filterId",
"in" : "path",
"description" : "The filter ID to download.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "66696p746572"
} ],
"responses" : {
"200" : {
"description" : "\"The filter defintion\"",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"allOf" : [ {
"title" : "Filter",
"type" : "object",
"properties" : {
"account_data" : {
"description" : "The user account data that isn't associated with rooms to include.",
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
} ]
},
"event_fields" : {
"type" : "array",
"description" : "List of event fields to include. If this list is absent then all fields are included. The entries may include '.' characters to indicate sub-fields. So ['content.body'] will include the 'body' field of the 'content' object. A literal '.' character in a field name may be escaped using a '\\\\'. A server may include more fields than were requested.",
"items" : {
"type" : "string"
}
},
"event_format" : {
"type" : "string",
"description" : "The format to use for events. 'client' will return the events in a format suitable for clients. 'federation' will return the raw event as received over federation. The default is 'client'.",
"enum" : [ "client", "federation" ]
},
"presence" : {
"description" : "The presence updates to include.",
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
} ]
},
"room" : {
"title" : "RoomFilter",
"type" : "object",
"properties" : {
"account_data" : {
"description" : "The per user account data to include for rooms.",
"allOf" : [ {
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
}, {
"title" : "RoomEventFilter",
"type" : "object",
"properties" : {
"contains_url" : {
"type" : "boolean",
"description" : "If ``true``, includes only events with a ``url`` key in their content. If ``false``, excludes those events. If omitted, ``url`` key is not considered for filtering."
},
"include_redundant_members" : {
"type" : "boolean",
"description" : "If ``true``, sends all membership events for all events, even if they have already\nbeen sent to the client. Does not\napply unless ``lazy_load_members`` is ``true``. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"lazy_load_members" : {
"type" : "boolean",
"description" : "If ``true``, enables lazy-loading of membership events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter.",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included.",
"items" : {
"type" : "string"
}
}
}
} ]
} ]
},
"ephemeral" : {
"description" : "The events that aren't recorded in the room history, e.g. typing and receipts, to include for rooms.",
"allOf" : [ {
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
}, {
"title" : "RoomEventFilter",
"type" : "object",
"properties" : {
"contains_url" : {
"type" : "boolean",
"description" : "If ``true``, includes only events with a ``url`` key in their content. If ``false``, excludes those events. If omitted, ``url`` key is not considered for filtering."
},
"include_redundant_members" : {
"type" : "boolean",
"description" : "If ``true``, sends all membership events for all events, even if they have already\nbeen sent to the client. Does not\napply unless ``lazy_load_members`` is ``true``. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"lazy_load_members" : {
"type" : "boolean",
"description" : "If ``true``, enables lazy-loading of membership events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter.",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included.",
"items" : {
"type" : "string"
}
}
}
} ]
} ]
},
"include_leave" : {
"type" : "boolean",
"description" : "Include rooms that the user has left in the sync, default false"
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter. This filter is applied before the filters in ``ephemeral``, ``state``, ``timeline`` or ``account_data``",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included. This filter is applied before the filters in ``ephemeral``, ``state``, ``timeline`` or ``account_data``",
"items" : {
"type" : "string"
}
},
"state" : {
"title" : "StateFilter",
"type" : "object",
"description" : "The state events to include for rooms.",
"allOf" : [ {
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
}, {
"title" : "RoomEventFilter",
"type" : "object",
"properties" : {
"contains_url" : {
"type" : "boolean",
"description" : "If ``true``, includes only events with a ``url`` key in their content. If ``false``, excludes those events. If omitted, ``url`` key is not considered for filtering."
},
"include_redundant_members" : {
"type" : "boolean",
"description" : "If ``true``, sends all membership events for all events, even if they have already\nbeen sent to the client. Does not\napply unless ``lazy_load_members`` is ``true``. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"lazy_load_members" : {
"type" : "boolean",
"description" : "If ``true``, enables lazy-loading of membership events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter.",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included.",
"items" : {
"type" : "string"
}
}
}
} ]
} ]
},
"timeline" : {
"description" : "The message and state update events to include for rooms.",
"allOf" : [ {
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
}, {
"title" : "RoomEventFilter",
"type" : "object",
"properties" : {
"contains_url" : {
"type" : "boolean",
"description" : "If ``true``, includes only events with a ``url`` key in their content. If ``false``, excludes those events. If omitted, ``url`` key is not considered for filtering."
},
"include_redundant_members" : {
"type" : "boolean",
"description" : "If ``true``, sends all membership events for all events, even if they have already\nbeen sent to the client. Does not\napply unless ``lazy_load_members`` is ``true``. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"lazy_load_members" : {
"type" : "boolean",
"description" : "If ``true``, enables lazy-loading of membership events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter.",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included.",
"items" : {
"type" : "string"
}
}
}
} ]
} ]
}
},
"description" : "Filters to be applied to room data."
}
}
} ]
},
"examples" : {
"response" : {
"value" : {
"event_fields" : [ "type", "content", "sender" ],
"event_format" : "client",
"presence" : {
"not_senders" : [ "@alice:example.com" ],
"types" : [ "m.presence" ]
},
"room" : {
"ephemeral" : {
"not_rooms" : [ "!726s6s6q:example.com" ],
"not_senders" : [ "@spam:example.com" ],
"types" : [ "m.receipt", "m.typing" ]
},
"state" : {
"not_rooms" : [ "!726s6s6q:example.com" ],
"types" : [ "m.room.*" ]
},
"timeline" : {
"limit" : 10,
"not_rooms" : [ "!726s6s6q:example.com" ],
"not_senders" : [ "@spam:example.com" ],
"types" : [ "m.room.message" ]
}
}
}
}
}
}
}
},
"404" : {
"description" : "Unknown filter."
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/user/{userId}/openid/request_token" : {
"post" : {
"tags" : [ "OpenID" ],
"summary" : "Get an OpenID token object to verify the requester's identity.",
"description" : "Gets an OpenID token object that the requester may supply to another\nservice to verify their identity in Matrix. The generated token is only\nvalid for exchanging for user information from the federation API for\nOpenID.\n\nThe access token generated is only valid for the OpenID API. It cannot\nbe used to request another OpenID access token or call ``/sync``, for\nexample.",
"operationId" : "requestOpenIdToken",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The user to request and OpenID token for. Should be the user who\nis authenticated for the request.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
} ],
"requestBody" : {
"description" : "An empty object. Reserved for future expansion.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"example" : { }
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "OpenID token information. This response is nearly compatible with the\nresponse documented in the `OpenID 1.0 Specification <http://openid.net/specs/openid-connect-core-1_0.html#TokenResponse>`_\nwith the only difference being the lack of an ``id_token``. Instead,\nthe Matrix homeserver's name is provided.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_44"
},
"examples" : {
"response" : {
"value" : {
"access_token" : "SomeT0kenHere",
"expires_in" : 3600,
"matrix_server_name" : "example.com",
"token_type" : "Bearer"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/user/{userId}/rooms/{roomId}/account_data/{type}" : {
"get" : {
"tags" : [ "User data" ],
"summary" : "Get some account_data for the user.",
"description" : "Get some account_data for the client on a given room. This config is only\nvisible to the user that set the account_data.",
"operationId" : "getAccountDataPerRoom",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The ID of the user to set account_data for. The access token must be\nauthorized to make requests for this user ID.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
}, {
"name" : "roomId",
"in" : "path",
"description" : "The ID of the room to get account_data for.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!726s6s6q:example.com"
}, {
"name" : "type",
"in" : "path",
"description" : "The event type of the account_data to get. Custom types should be\nnamespaced to avoid clashes.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "org.example.custom.room.config"
} ],
"responses" : {
"200" : {
"description" : "The account data content for the given type.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"example" : {
"custom_account_data_key" : "custom_config_value"
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"put" : {
"tags" : [ "User data" ],
"summary" : "Set some account_data for the user.",
"description" : "Set some account_data for the client on a given room. This config is only\nvisible to the user that set the account_data. The config will be synced to\nclients in the per-room ``account_data``.",
"operationId" : "setAccountDataPerRoom",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The ID of the user to set account_data for. The access token must be\nauthorized to make requests for this user ID.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
}, {
"name" : "roomId",
"in" : "path",
"description" : "The ID of the room to set account_data on.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!726s6s6q:example.com"
}, {
"name" : "type",
"in" : "path",
"description" : "The event type of the account_data to set. Custom types should be\nnamespaced to avoid clashes.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "org.example.custom.room.config"
} ],
"requestBody" : {
"description" : "The content of the account_data",
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"example" : {
"custom_account_data_key" : "custom_account_data_value"
}
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The account_data was successfully added."
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/user/{userId}/rooms/{roomId}/tags" : {
"get" : {
"tags" : [ "User data" ],
"summary" : "List the tags for a room.",
"description" : "List the tags set by a user on a room.",
"operationId" : "getRoomTags",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The id of the user to get tags for. The access token must be\nauthorized to make requests for this user ID.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
}, {
"name" : "roomId",
"in" : "path",
"description" : "The ID of the room to get tags for.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!726s6s6q:example.com"
} ],
"responses" : {
"200" : {
"description" : "The list of tags for the user for the room.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_45"
},
"examples" : {
"response" : {
"value" : {
"tags" : {
"m.favourite" : {
"order" : 0.1
},
"u.Customers" : { },
"u.Work" : {
"order" : 0.7
}
}
}
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/user/{userId}/rooms/{roomId}/tags/{tag}" : {
"put" : {
"tags" : [ "User data" ],
"summary" : "Add a tag to a room.",
"description" : "Add a tag to the room.",
"operationId" : "setRoomTag",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The id of the user to add a tag for. The access token must be\nauthorized to make requests for this user ID.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
}, {
"name" : "roomId",
"in" : "path",
"description" : "The ID of the room to add a tag to.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!726s6s6q:example.com"
}, {
"name" : "tag",
"in" : "path",
"description" : "The tag to add.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "u.work"
} ],
"requestBody" : {
"description" : "Extra data for the tag, e.g. ordering.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_36"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The tag was successfully added.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
},
"delete" : {
"tags" : [ "User data" ],
"summary" : "Remove a tag from the room.",
"description" : "Remove a tag from the room.",
"operationId" : "deleteRoomTag",
"parameters" : [ {
"name" : "userId",
"in" : "path",
"description" : "The id of the user to remove a tag for. The access token must be\nauthorized to make requests for this user ID.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "@alice:example.com"
}, {
"name" : "roomId",
"in" : "path",
"description" : "The ID of the room to remove a tag from.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "!726s6s6q:example.com"
}, {
"name" : "tag",
"in" : "path",
"description" : "The tag to remove.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "u.work"
} ],
"responses" : {
"200" : {
"description" : "The tag was successfully removed.",
"content" : {
"application/json" : {
"schema" : {
"type" : "object"
},
"examples" : {
"response" : {
"value" : { }
}
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/user_directory/search" : {
"post" : {
"tags" : [ "User data" ],
"summary" : "Searches the user directory.",
"description" : "Performs a search for users. The homeserver may\ndetermine which subset of users are searched, however the homeserver\nMUST at a minimum consider the users the requesting user shares a\nroom with and those who reside in public rooms (known to the homeserver).\nThe search MUST consider local users to the homeserver, and SHOULD\nquery remote users as part of the search.\n\nThe search is performed case-insensitively on user IDs and display\nnames preferably using a collation determined based upon the \n``Accept-Language`` header provided in the request, if present.",
"operationId" : "searchUserDirectory",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/body_37"
}
}
}
},
"responses" : {
"200" : {
"description" : "The results of the search.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_46"
},
"examples" : {
"response" : {
"value" : {
"limited" : false,
"results" : [ {
"avatar_url" : "mxc://bar.com/foo",
"display_name" : "Foo",
"user_id" : "@foo:bar.com"
} ]
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/r0/voip/turnServer" : {
"get" : {
"tags" : [ "VOIP" ],
"summary" : "Obtain TURN server credentials.",
"description" : "This API provides credentials for the client to use when initiating\ncalls.",
"operationId" : "getTurnServer",
"responses" : {
"200" : {
"description" : "The TURN server credentials.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_47"
},
"examples" : {
"response" : {
"value" : {
"password" : "JlKfBy1QwLrO20385QyAtEyIv0=",
"ttl" : 86400,
"uris" : [ "turn:turn.example.com:3478?transport=udp", "turn:10.20.30.40:3478?transport=tcp", "turns:10.20.30.40:443?transport=tcp" ],
"username" : "1443779631:@user:example.com"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/client/versions" : {
"get" : {
"tags" : [ "Server administration" ],
"summary" : "Gets the versions of the specification supported by the server.",
"description" : "Gets the versions of the specification supported by the server.\n\nValues will take the form ``rX.Y.Z``.\n\nOnly the latest ``Z`` value will be reported for each supported ``X.Y`` value.\ni.e. if the server implements ``r0.0.0``, ``r0.0.1``, and ``r1.2.0``, it will report ``r0.0.1`` and ``r1.2.0``.\n\nThe server may additionally advertise experimental features it supports\nthrough ``unstable_features``. These features should be namespaced and\nmay optionally include version information within their name if desired.\nFeatures listed here are not for optionally toggling parts of the Matrix\nspecification and should only be used to advertise support for a feature\nwhich has not yet landed in the spec. For example, a feature currently\nundergoing the proposal process may appear here and eventually be taken\noff this list once the feature lands in the spec and the server deems it\nreasonable to do so. Servers may wish to keep advertising features here\nafter they've been released into the spec to give clients a chance to\nupgrade appropriately. Additionally, clients should avoid using unstable\nfeatures in their stable releases.",
"operationId" : "getVersions",
"responses" : {
"200" : {
"description" : "The versions supported by the server.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_48"
},
"examples" : {
"response" : {
"value" : {
"unstable_features" : {
"org.example.my_feature" : true
},
"versions" : [ "r0.0.1" ]
}
}
}
}
}
}
}
}
},
"/_matrix/media/r0/config" : {
"get" : {
"tags" : [ "Media" ],
"summary" : "Get the configuration for the content repository.",
"description" : "This endpoint allows clients to retrieve the configuration of the content\nrepository, such as upload limitations.\nClients SHOULD use this as a guide when using content repository endpoints.\nAll values are intentionally left optional. Clients SHOULD follow\nthe advice given in the field description when the field is not available.\n\n**NOTE:** Both clients and server administrators should be aware that proxies\nbetween the client and the server may affect the apparent behaviour of content\nrepository APIs, for example, proxies may enforce a lower upload size limit\nthan is advertised by the server on this endpoint.",
"operationId" : "getConfig",
"responses" : {
"200" : {
"description" : "The public content repository configuration for the matrix server.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_49"
},
"examples" : {
"response" : {
"value" : {
"m.upload.size" : 50000000
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/media/r0/download/{serverName}/{mediaId}" : {
"get" : {
"tags" : [ "Media" ],
"summary" : "Download content from the content repository.",
"operationId" : "getContent",
"parameters" : [ {
"name" : "serverName",
"in" : "path",
"description" : "The server name from the ``mxc://`` URI (the authoritory component)\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "matrix.org"
}, {
"name" : "mediaId",
"in" : "path",
"description" : "The media ID from the ``mxc://`` URI (the path component)\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "ascERGshawAWawugaAcauga"
}, {
"name" : "allow_remote",
"in" : "query",
"description" : "Indicates to the server that it should not attempt to fetch the media if it is deemed\nremote. This is to prevent routing loops where the server contacts itself. Defaults to\ntrue if not provided.\n",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "boolean",
"default" : true
},
"example" : false
} ],
"responses" : {
"200" : {
"description" : "The content that was previously uploaded.",
"headers" : {
"Content-Disposition" : {
"description" : "The name of the file that was previously uploaded, if set.",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
}
},
"Content-Type" : {
"description" : "The content type of the file that was previously uploaded.",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
}
}
},
"content" : {
"*/*" : {
"schema" : {
"type" : "string",
"format" : "binary"
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
},
"502" : {
"description" : "The content is too large for the server to serve.",
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
},
"application/json" : {
"examples" : {
"response" : {
"value" : {
"errcode" : "M_TOO_LARGE",
"error" : "Content is too large to serve"
}
}
}
}
}
}
}
}
},
"/_matrix/media/r0/download/{serverName}/{mediaId}/{fileName}" : {
"get" : {
"tags" : [ "Media" ],
"summary" : "Download content from the content repository. This is the same as\nthe download endpoint above, except permitting a desired file name.",
"operationId" : "getContentOverrideName",
"parameters" : [ {
"name" : "serverName",
"in" : "path",
"description" : "The server name from the ``mxc://`` URI (the authoritory component)\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "matrix.org"
}, {
"name" : "mediaId",
"in" : "path",
"description" : "The media ID from the ``mxc://`` URI (the path component)\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "ascERGshawAWawugaAcauga"
}, {
"name" : "fileName",
"in" : "path",
"description" : "A filename to give in the ``Content-Disposition`` header.",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "filename.jpg"
}, {
"name" : "allow_remote",
"in" : "query",
"description" : "Indicates to the server that it should not attempt to fetch the media if it is deemed\nremote. This is to prevent routing loops where the server contacts itself. Defaults to\ntrue if not provided.\n",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "boolean",
"default" : true
},
"example" : false
} ],
"responses" : {
"200" : {
"description" : "The content that was previously uploaded.",
"headers" : {
"Content-Disposition" : {
"description" : "The ``fileName`` requested or the name of the file that was previously\nuploaded, if set.",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
}
},
"Content-Type" : {
"description" : "The content type of the file that was previously uploaded.",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
}
}
},
"content" : {
"*/*" : {
"schema" : {
"type" : "string",
"format" : "binary"
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
},
"502" : {
"description" : "The content is too large for the server to serve.",
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
},
"application/json" : {
"examples" : {
"response" : {
"value" : {
"errcode" : "M_TOO_LARGE",
"error" : "Content is too large to serve"
}
}
}
}
}
}
}
}
},
"/_matrix/media/r0/preview_url" : {
"get" : {
"tags" : [ "Media" ],
"summary" : "Get information about a URL for a client",
"description" : "Get information about a URL for the client. Typically this is called when a\nclient sees a URL in a message and wants to render a preview for the user.\n\n.. Note::\n Clients should consider avoiding this endpoint for URLs posted in encrypted\n rooms. Encrypted rooms often contain more sensitive information the users\n do not want to share with the homeserver, and this can mean that the URLs\n being shared should also not be shared with the homeserver.",
"operationId" : "getUrlPreview",
"parameters" : [ {
"name" : "url",
"in" : "query",
"description" : "The URL to get a preview of.",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "https://matrix.org"
}, {
"name" : "ts",
"in" : "query",
"description" : "The preferred point in time to return a preview for. The server may\nreturn a newer version if it does not have the requested version\navailable.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer",
"format" : "int64"
},
"example" : 1510610716656
} ],
"responses" : {
"200" : {
"description" : "The OpenGraph data for the URL, which may be empty. Some values are\nreplaced with matrix equivalents if they are provided in the response.\nThe differences from the OpenGraph protocol are described here.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_50"
},
"examples" : {
"response" : {
"value" : {
"matrix:image:size" : 102400,
"og:description" : "This is a really cool blog post from matrix.org",
"og:image" : "mxc://example.com/ascERGshawAWawugaAcauga",
"og:image:height" : 48,
"og:image:type" : "image/png",
"og:image:width" : 48,
"og:title" : "Matrix Blog Post"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
},
"/_matrix/media/r0/thumbnail/{serverName}/{mediaId}" : {
"get" : {
"tags" : [ "Media" ],
"summary" : "Download a thumbnail of content from the content repository. See the `thumbnailing <#thumbnails>`_\nsection for more information.",
"operationId" : "getContentThumbnail",
"parameters" : [ {
"name" : "serverName",
"in" : "path",
"description" : "The server name from the ``mxc://`` URI (the authoritory component)\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "example.org"
}, {
"name" : "mediaId",
"in" : "path",
"description" : "The media ID from the ``mxc://`` URI (the path component)\n",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "ascERGshawAWawugaAcauga"
}, {
"name" : "width",
"in" : "query",
"description" : "The *desired* width of the thumbnail. The actual thumbnail may be\nlarger than the size specified.",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer"
},
"example" : 64
}, {
"name" : "height",
"in" : "query",
"description" : "The *desired* height of the thumbnail. The actual thumbnail may be\nlarger than the size specified.",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "integer"
},
"example" : 64
}, {
"name" : "method",
"in" : "query",
"description" : "The desired resizing method. See the `thumbnailing <#thumbnails>`_\nsection for more information.",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string",
"enum" : [ "crop", "scale" ]
},
"example" : "scale"
}, {
"name" : "allow_remote",
"in" : "query",
"description" : "Indicates to the server that it should not attempt to fetch the media if it is deemed\nremote. This is to prevent routing loops where the server contacts itself. Defaults to\ntrue if not provided.\n",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "boolean",
"default" : true
},
"example" : false
} ],
"responses" : {
"200" : {
"description" : "A thumbnail of the requested content.",
"headers" : {
"Content-Type" : {
"description" : "The content type of the thumbnail.",
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string",
"enum" : [ "image/jpeg", "image/png" ]
}
}
},
"content" : {
"image/jpeg" : {
"schema" : {
"type" : "string",
"format" : "binary"
}
},
"image/png" : {
"schema" : {
"type" : "string",
"format" : "binary"
}
}
}
},
"400" : {
"description" : "The request does not make sense to the server, or the server cannot thumbnail\nthe content. For example, the client requested non-integer dimensions or asked\nfor negatively-sized images.",
"content" : {
"image/jpeg" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
},
"image/png" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
},
"application/json" : {
"examples" : {
"response" : {
"value" : {
"errcode" : "M_UNKNOWN",
"error" : "Cannot generate thumbnails for the requested content"
}
}
}
}
}
},
"413" : {
"description" : "The local content is too large for the server to thumbnail.",
"content" : {
"image/jpeg" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
},
"image/png" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
},
"application/json" : {
"examples" : {
"response" : {
"value" : {
"errcode" : "M_TOO_LARGE",
"error" : "Content is too large to thumbnail"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"image/jpeg" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
},
"image/png" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
},
"502" : {
"description" : "The remote content is too large for the server to thumbnail.",
"content" : {
"image/jpeg" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
},
"image/png" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
}
},
"application/json" : {
"examples" : {
"response" : {
"value" : {
"errcode" : "M_TOO_LARGE",
"error" : "Content is too large to thumbnail"
}
}
}
}
}
}
}
}
},
"/_matrix/media/r0/upload" : {
"post" : {
"tags" : [ "Media" ],
"summary" : "Upload some content to the content repository.",
"operationId" : "uploadContent",
"parameters" : [ {
"name" : "Content-Type",
"in" : "header",
"description" : "The content type of the file being uploaded",
"required" : false,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
},
"example" : "Content-Type: application/pdf"
}, {
"name" : "filename",
"in" : "query",
"description" : "The name of the file being uploaded",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
},
"example" : "War and Peace.pdf"
} ],
"requestBody" : {
"description" : "The content to be uploaded.",
"content" : {
"application/json" : {
"schema" : {
"type" : "string",
"format" : "byte"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "The `MXC URI`_ for the uploaded content.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_200_51"
},
"examples" : {
"response" : {
"value" : {
"content_uri" : "mxc://example.com/AQwafuaFswefuhsfAFAgsw"
}
}
}
}
}
},
"403" : {
"description" : "The user does not have permission to upload the content. Some reasons for this error include:\n\n- The server does not permit the file type.\n- The user has reached a quota for uploaded content.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_FORBIDDEN",
"error" : "Cannot upload this content"
}
}
}
}
}
},
"413" : {
"description" : "The uploaded content is too large for the server.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_403"
},
"examples" : {
"response" : {
"value" : {
"errcode" : "M_TOO_LARGE",
"error" : "Cannot upload files larger than 100mb"
}
}
}
}
}
},
"429" : {
"description" : "This request was rate-limited.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/inline_response_429"
}
}
}
}
},
"security" : [ {
"accessToken" : [ ]
} ]
}
}
},
"components" : {
"schemas" : {
"Authentication Data" : {
"required" : [ "type" ],
"type" : "object",
"properties" : {
"session" : {
"type" : "string",
"description" : "The value of the session key given by the homeserver."
},
"type" : {
"type" : "string",
"description" : "The login type that the client is attempting to complete."
}
},
"description" : "Additional authentication information for the user-interactive authentication API.",
"example" : "{\"example_credential\":\"verypoorsharedsecret\",\"session\":\"xxxxx\",\"type\":\"example.type.foo\"}"
},
"inline_response_200_33" : {
"type" : "object",
"properties" : {
"available" : {
"type" : "boolean",
"description" : "A flag to indicate that the username is available. This should always\nbe ``true`` when the server replies with 200 OK."
}
}
},
"inline_response_200_32" : {
"required" : [ "user_id" ],
"type" : "object",
"properties" : {
"access_token" : {
"type" : "string",
"description" : "An access token for the account.\nThis access token can then be used to authorize other requests.\nRequired if the ``inhibit_login`` option is false."
},
"device_id" : {
"type" : "string",
"description" : "ID of the registered device. Will be the same as the\ncorresponding parameter in the request, if one was specified.\nRequired if the ``inhibit_login`` option is false."
},
"home_server" : {
"type" : "string",
"description" : "The server_name of the homeserver on which the account has\nbeen registered.\n\n**Deprecated**. Clients should extract the server_name from\n``user_id`` (by splitting at the first colon) if they require\nit. Note also that ``homeserver`` is not spelt this way."
},
"user_id" : {
"type" : "string",
"description" : "The fully-qualified Matrix user ID (MXID) that has been registered.\n\nAny user ID returned by this API must conform to the grammar given in the\n`Matrix specification <../appendices.html#user-identifiers>`_."
}
}
},
"inline_response_200_35" : {
"type" : "object",
"properties" : {
"end" : {
"type" : "string",
"description" : "A token that can be used to paginate forwards with."
},
"event" : {
"description" : "Details of the requested event.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
},
"events_after" : {
"type" : "array",
"description" : "A list of room events that happened just after the\nrequested event, in chronological order.",
"items" : {
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
}
},
"events_before" : {
"type" : "array",
"description" : "A list of room events that happened just before the\nrequested event, in reverse-chronological order.",
"items" : {
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
}
},
"start" : {
"type" : "string",
"description" : "A token that can be used to paginate backwards with."
},
"state" : {
"type" : "array",
"description" : "The state of the room at the last event returned.",
"items" : {
"allOf" : [ {
"title" : "State Event",
"type" : "object",
"description" : "State Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}, {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
} ]
}
}
},
"description" : "The events and state surrounding the requested event."
},
"inline_response_200_34" : {
"required" : [ "aliases" ],
"type" : "object",
"properties" : {
"aliases" : {
"type" : "array",
"description" : "The server's local aliases on the room. Can be empty.",
"items" : {
"type" : "string"
}
}
}
},
"inline_response_200_31" : {
"required" : [ "enabled" ],
"type" : "object",
"properties" : {
"enabled" : {
"type" : "boolean",
"description" : "Whether the push rule is enabled or not."
}
}
},
"inline_response_200_30" : {
"required" : [ "actions" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The action(s) to perform for this rule.",
"items" : {
"type" : "string"
}
}
}
},
"inline_response_200_37" : {
"type" : "object",
"properties" : {
"chunk" : {
"type" : "array",
"items" : {
"title" : "MemberEvent",
"type" : "object",
"allOf" : [ {
"title" : "The current membership state of a user in the room.",
"type" : "object",
"properties" : {
"content" : {
"title" : "EventContent",
"required" : [ "membership" ],
"type" : "object",
"properties" : {
"avatar_url" : {
"type" : "string",
"description" : "The avatar URL for this user, if any."
},
"displayname" : {
"type" : "string",
"description" : "The display name for this user, if any."
},
"is_direct" : {
"type" : "boolean",
"description" : "Flag indicating if the room containing this event was created with the intention of being a direct chat. See `Direct Messaging`_."
},
"membership" : {
"type" : "string",
"description" : "The membership state of the user.",
"enum" : [ "invite", "join", "knock", "leave", "ban" ]
},
"third_party_invite" : {
"title" : "Invite",
"required" : [ "display_name", "signed" ],
"type" : "object",
"properties" : {
"display_name" : {
"type" : "string",
"description" : "A name which can be displayed to represent the user instead of their third party identifier"
},
"signed" : {
"title" : "signed",
"required" : [ "mxid", "signatures", "token" ],
"type" : "object",
"properties" : {
"mxid" : {
"type" : "string",
"description" : "The invited matrix user ID. Must be equal to the user_id property of the event."
},
"signatures" : {
"title" : "Signatures",
"type" : "object",
"additionalProperties" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
},
"description" : "A single signature from the verifying server, in the format specified by the Signing Events section of the server-server API."
},
"token" : {
"type" : "string",
"description" : "The token property of the containing third_party_invite object."
}
},
"description" : "A block of content which has been signed, which servers can use to verify the event. Clients should ignore this."
}
}
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"invite_room_state" : {
"type" : "array",
"description" : "A subset of the state of the room at the time of the invite, if ``membership`` is ``invite``. Note that this state is informational, and SHOULD NOT be trusted; once the client has joined the room, it SHOULD fetch the live state from the server and discard the invite_room_state. Also, clients must not rely on any particular state being present here; they SHOULD behave properly (with possibly a degraded but not a broken experience) in the absence of any particular events here. If they are set on the room, at least the state for ``m.room.avatar``, ``m.room.canonical_alias``, ``m.room.join_rules``, and ``m.room.name`` SHOULD be included.",
"items" : {
"title" : "StrippedState",
"required" : [ "content", "sender", "state_key", "type" ],
"type" : "object",
"properties" : {
"content" : {
"title" : "EventContent",
"type" : "object",
"description" : "The ``content`` for the event."
},
"sender" : {
"type" : "string",
"description" : "The ``sender`` for the event."
},
"state_key" : {
"type" : "string",
"description" : "The ``state_key`` for the event."
},
"type" : {
"type" : "string",
"description" : "The ``type`` for the event."
}
},
"description" : "A stripped down state event, with only the ``type``, ``state_key``,\n``sender``, and ``content`` keys."
}
}
},
"description" : "Contains optional extra information about the event."
}
}
},
"state_key" : {
"type" : "string",
"description" : "The ``user_id`` this membership event relates to. In all cases except for when ``membership`` is\n``join``, the user ID sending the event does not need to match the user ID in the ``state_key``,\nunlike other events. Regular authorisation rules still apply."
},
"type" : {
"type" : "string",
"enum" : [ "m.room.member" ]
}
},
"description" : "Adjusts the membership state for a user in a room. It is preferable to use the membership APIs (``/rooms/<room id>/invite`` etc) when performing membership actions rather than adjusting the state directly as there are a restricted set of valid transformations. For example, user A cannot force user B to join a room, and trying to force this state change directly will fail.\n\nThe following membership states are specified:\n\n- ``invite`` - The user has been invited to join a room, but has not yet joined it. They may not participate in the room until they join.\n\n- ``join`` - The user has joined the room (possibly after accepting an invite), and may participate in it.\n\n- ``leave`` - The user was once joined to the room, but has since left (possibly by choice, or possibly by being kicked).\n\n- ``ban`` - The user has been banned from the room, and is no longer allowed to join it until they are un-banned from the room (by having their membership state set to a value other than ``ban``).\n\n- ``knock`` - This is a reserved word, which currently has no meaning.\n\nThe ``third_party_invite`` property will be set if this invite is an ``invite`` event and is the successor of an ``m.room.third_party_invite`` event, and absent otherwise.\n\nThis event may also include an ``invite_room_state`` key inside the event's ``unsigned`` data.\nIf present, this contains an array of ``StrippedState`` Events. These events provide information\non a subset of state events such as the room name.\n\nThe user for which a membership applies is represented by the ``state_key``. Under some conditions,\nthe ``sender`` and ``state_key`` may not match - this may be interpreted as the ``sender`` affecting\nthe membership state of the ``state_key`` user.\n\nThe ``membership`` for a given user can change over time. The table below represents the various changes\nover time and how clients and servers must interpret those changes. Previous membership can be retrieved\nfrom the ``prev_content`` object on an event. If not present, the user's previous membership must be assumed\nas ``leave``.\n\n.. TODO: Improve how this table is written? We use a csv-table to get around vertical header restrictions.\n\n.. csv-table::\n :header-rows: 1\n :stub-columns: 1\n\n \"\",\"to ``invite``\",\"to ``join``\",\"to ``leave``\",\"to ``ban``\",\"to ``knock``\"\n \"from ``invite``\",\"No change.\",\"User joined the room.\",\"If the ``state_key`` is the same as the ``sender``, the user rejected the invite. Otherwise, the ``state_key`` user had their invite revoked.\",\"User was banned.\",\"Not implemented.\"\n \"from ``join``\",\"Must never happen.\",\"``displayname`` or ``avatar_url`` changed.\",\"If the ``state_key`` is the same as the ``sender``, the user left. Otherwise, the ``state_key`` user was kicked.\",\"User was kicked and banned.\",\"Not implemented.\"\n \"from ``leave``\",\"New invitation sent.\",\"User joined.\",\"No change.\",\"User was banned.\",\"Not implemented.\"\n \"from ``ban``\",\"Must never happen.\",\"Must never happen.\",\"User was unbanned.\",\"No change.\",\"Not implemented.\"\n \"from ``knock``\",\"Not implemented.\",\"Not implemented.\",\"Not implemented.\",\"Not implemented.\",\"Not implemented.\"",
"allOf" : [ {
"title" : "State Event",
"type" : "object",
"description" : "State Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}, {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
} ]
} ]
}
}
}
},
"Invite3pid" : {
"required" : [ "address", "id_access_token", "id_server", "medium" ],
"type" : "object",
"properties" : {
"address" : {
"type" : "string",
"description" : "The invitee's third party identifier."
},
"id_access_token" : {
"type" : "string",
"description" : "An access token previously registered with the identity server. Servers\ncan treat this as optional to distinguish between r0.5-compatible clients\nand this specification version."
},
"id_server" : {
"type" : "string",
"description" : "The hostname+port of the identity server which should be used for third party identifier lookups."
},
"medium" : {
"type" : "string",
"description" : "The kind of address being passed in the address field, for example ``email``."
}
}
},
"inline_response_200_36" : {
"type" : "object",
"properties" : {
"joined" : {
"type" : "object",
"additionalProperties" : {
"$ref" : "#/components/schemas/RoomMember"
},
"description" : "A map from user ID to a RoomMember object."
}
}
},
"inline_response_200_39" : {
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "A unique identifier for the event."
}
}
},
"Identity Server Information" : {
"required" : [ "base_url" ],
"type" : "object",
"properties" : {
"base_url" : {
"type" : "string",
"description" : "The base URL for the identity server for client-server connections.",
"example" : "https://identity.example.com"
}
},
"description" : "Used by clients to discover identity server information."
},
"RoomVersionsCapability" : {
"required" : [ "available", "default" ],
"type" : "object",
"properties" : {
"available" : {
"title" : "AvailableRoomVersions",
"type" : "object",
"additionalProperties" : {
"title" : "RoomVersionStability",
"type" : "string",
"description" : "The stability of the room version.",
"enum" : [ "stable", "unstable" ]
},
"description" : "A detailed description of the room versions the server supports."
},
"default" : {
"type" : "string",
"description" : "The default room version the server is using for new rooms.",
"example" : "1"
}
},
"description" : "The room versions the server supports."
},
"inline_response_200_38" : {
"type" : "object",
"properties" : {
"chunk" : {
"type" : "array",
"description" : "A list of room events. The order depends on the ``dir`` parameter.\nFor ``dir=b`` events will be in reverse-chronological order,\nfor ``dir=f`` in chronological order, so that events start\nat the ``from`` point.",
"items" : {
"$ref" : "#/components/schemas/RoomEvent"
}
},
"end" : {
"type" : "string",
"description" : "The token the pagination ends at. If ``dir=b`` this token should\nbe used again to request even earlier events."
},
"start" : {
"type" : "string",
"description" : "The token the pagination starts from. If ``dir=b`` this will be\nthe token supplied in ``from``."
},
"state" : {
"type" : "array",
"description" : "A list of state events relevant to showing the ``chunk``. For example, if\n``lazy_load_members`` is enabled in the filter then this may contain\nthe membership events for the senders of events in the ``chunk``.\n\nUnless ``include_redundant_members`` is ``true``, the server\nmay remove membership events which would have already been\nsent to the client in prior calls to this endpoint, assuming\nthe membership of those members has not changed.",
"items" : {
"title" : "RoomStateEvent",
"type" : "object",
"description" : "State Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}, {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
}
}
},
"description" : "A list of messages with a new token to request more."
},
"RoomSummary" : {
"type" : "object",
"properties" : {
"m.heroes" : {
"type" : "array",
"description" : "The users which can be used to generate a room name\nif the room does not have one. Required if the room's\n``m.room.name`` or ``m.room.canonical_alias`` state events\nare unset or empty.\n\nThis should be the first 5 members of the room, ordered\nby stream ordering, which are joined or invited. The\nlist must never include the client's own user ID. When\nno joined or invited members are available, this should\nconsist of the banned and left users. More than 5 members\nmay be provided, however less than 5 should only be provided\nwhen there are less than 5 members to represent.\n\nWhen lazy-loading room members is enabled, the membership\nevents for the heroes MUST be included in the ``state``,\nunless they are redundant. When the list of users changes,\nthe server notifies the client by sending a fresh list of\nheroes. If there are no changes since the last sync, this\nfield may be omitted.",
"items" : {
"type" : "string"
}
},
"m.invited_member_count" : {
"type" : "integer",
"description" : "The number of users with ``membership`` of ``invite``.\nIf this field has not changed since the last sync, it\nmay be omitted. Required otherwise."
},
"m.joined_member_count" : {
"type" : "integer",
"description" : "The number of users with ``membership`` of ``join``,\nincluding the client's own user ID. If this field has\nnot changed since the last sync, it may be omitted.\nRequired otherwise."
}
},
"description" : "Information about the room which clients may need to\ncorrectly render it to users."
},
"Result Room Events" : {
"type" : "object",
"properties" : {
"count" : {
"type" : "integer",
"description" : "An approximate count of the total number of results found."
},
"groups" : {
"title" : "Groups",
"type" : "object",
"additionalProperties" : {
"title" : "Group Key",
"type" : "object",
"additionalProperties" : {
"title" : "Group Value",
"type" : "object",
"properties" : {
"next_batch" : {
"title" : "Next Batch in Group",
"type" : "string",
"description" : "Token that can be used to get the next batch\nof results in the group, by passing as the\n`next_batch` parameter to the next call. If\nthis field is absent, there are no more\nresults in this group."
},
"order" : {
"title" : "Group Order",
"type" : "integer",
"description" : "Key that can be used to order different\ngroups."
},
"results" : {
"type" : "array",
"description" : "Which results are in this group.",
"items" : {
"title" : "Result Event ID",
"type" : "string"
}
}
},
"description" : "The results for a particular group value."
},
"description" : "The results for a given group."
},
"description" : "Any groups that were requested.\n\nThe outer ``string`` key is the group key requested (eg: ``room_id``\nor ``sender``). The inner ``string`` key is the grouped value (eg:\na room's ID or a user's ID)."
},
"highlights" : {
"title" : "Highlights",
"type" : "array",
"description" : "List of words which should be highlighted, useful for stemming which may change the query terms.",
"items" : {
"type" : "string"
}
},
"next_batch" : {
"title" : "Next Batch",
"type" : "string",
"description" : "Token that can be used to get the next batch of\nresults, by passing as the `next_batch` parameter to\nthe next call. If this field is absent, there are no\nmore results."
},
"results" : {
"title" : "Results",
"type" : "array",
"description" : "List of results in the requested order.",
"items" : {
"$ref" : "#/components/schemas/Result"
}
},
"state" : {
"title" : "Current state",
"type" : "object",
"additionalProperties" : {
"title" : "Room State",
"type" : "array",
"items" : {
"title" : "State Event",
"type" : "object",
"description" : "State Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}, {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
}
},
"description" : "The current state for every room in the results.\nThis is included if the request had the\n``include_state`` key set with a value of ``true``.\n\nThe ``string`` key is the room ID for which the ``State\nEvent`` array belongs to."
}
},
"description" : "Mapping of category name to search criteria."
},
"RoomInfo_1" : {
"required" : [ "membership", "room_id" ],
"type" : "object",
"properties" : {
"account_data" : {
"type" : "array",
"description" : "The private data that this user has attached to\nthis room.",
"items" : {
"title" : "Event",
"type" : "object",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
}
},
"invite" : {
"title" : "InviteEvent",
"type" : "object",
"description" : "The invite event if ``membership`` is ``invite``",
"allOf" : [ {
"title" : "The current membership state of a user in the room.",
"type" : "object",
"properties" : {
"content" : {
"title" : "EventContent",
"required" : [ "membership" ],
"type" : "object",
"properties" : {
"avatar_url" : {
"type" : "string",
"description" : "The avatar URL for this user, if any."
},
"displayname" : {
"type" : "string",
"description" : "The display name for this user, if any."
},
"is_direct" : {
"type" : "boolean",
"description" : "Flag indicating if the room containing this event was created with the intention of being a direct chat. See `Direct Messaging`_."
},
"membership" : {
"type" : "string",
"description" : "The membership state of the user.",
"enum" : [ "invite", "join", "knock", "leave", "ban" ]
},
"third_party_invite" : {
"title" : "Invite",
"required" : [ "display_name", "signed" ],
"type" : "object",
"properties" : {
"display_name" : {
"type" : "string",
"description" : "A name which can be displayed to represent the user instead of their third party identifier"
},
"signed" : {
"title" : "signed",
"required" : [ "mxid", "signatures", "token" ],
"type" : "object",
"properties" : {
"mxid" : {
"type" : "string",
"description" : "The invited matrix user ID. Must be equal to the user_id property of the event."
},
"signatures" : {
"title" : "Signatures",
"type" : "object",
"additionalProperties" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
},
"description" : "A single signature from the verifying server, in the format specified by the Signing Events section of the server-server API."
},
"token" : {
"type" : "string",
"description" : "The token property of the containing third_party_invite object."
}
},
"description" : "A block of content which has been signed, which servers can use to verify the event. Clients should ignore this."
}
}
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"invite_room_state" : {
"type" : "array",
"description" : "A subset of the state of the room at the time of the invite, if ``membership`` is ``invite``. Note that this state is informational, and SHOULD NOT be trusted; once the client has joined the room, it SHOULD fetch the live state from the server and discard the invite_room_state. Also, clients must not rely on any particular state being present here; they SHOULD behave properly (with possibly a degraded but not a broken experience) in the absence of any particular events here. If they are set on the room, at least the state for ``m.room.avatar``, ``m.room.canonical_alias``, ``m.room.join_rules``, and ``m.room.name`` SHOULD be included.",
"items" : {
"title" : "StrippedState",
"required" : [ "content", "sender", "state_key", "type" ],
"type" : "object",
"properties" : {
"content" : {
"title" : "EventContent",
"type" : "object",
"description" : "The ``content`` for the event."
},
"sender" : {
"type" : "string",
"description" : "The ``sender`` for the event."
},
"state_key" : {
"type" : "string",
"description" : "The ``state_key`` for the event."
},
"type" : {
"type" : "string",
"description" : "The ``type`` for the event."
}
},
"description" : "A stripped down state event, with only the ``type``, ``state_key``,\n``sender``, and ``content`` keys."
}
}
},
"description" : "Contains optional extra information about the event."
}
}
},
"state_key" : {
"type" : "string",
"description" : "The ``user_id`` this membership event relates to. In all cases except for when ``membership`` is\n``join``, the user ID sending the event does not need to match the user ID in the ``state_key``,\nunlike other events. Regular authorisation rules still apply."
},
"type" : {
"type" : "string",
"enum" : [ "m.room.member" ]
}
},
"description" : "Adjusts the membership state for a user in a room. It is preferable to use the membership APIs (``/rooms/<room id>/invite`` etc) when performing membership actions rather than adjusting the state directly as there are a restricted set of valid transformations. For example, user A cannot force user B to join a room, and trying to force this state change directly will fail.\n\nThe following membership states are specified:\n\n- ``invite`` - The user has been invited to join a room, but has not yet joined it. They may not participate in the room until they join.\n\n- ``join`` - The user has joined the room (possibly after accepting an invite), and may participate in it.\n\n- ``leave`` - The user was once joined to the room, but has since left (possibly by choice, or possibly by being kicked).\n\n- ``ban`` - The user has been banned from the room, and is no longer allowed to join it until they are un-banned from the room (by having their membership state set to a value other than ``ban``).\n\n- ``knock`` - This is a reserved word, which currently has no meaning.\n\nThe ``third_party_invite`` property will be set if this invite is an ``invite`` event and is the successor of an ``m.room.third_party_invite`` event, and absent otherwise.\n\nThis event may also include an ``invite_room_state`` key inside the event's ``unsigned`` data.\nIf present, this contains an array of ``StrippedState`` Events. These events provide information\non a subset of state events such as the room name.\n\nThe user for which a membership applies is represented by the ``state_key``. Under some conditions,\nthe ``sender`` and ``state_key`` may not match - this may be interpreted as the ``sender`` affecting\nthe membership state of the ``state_key`` user.\n\nThe ``membership`` for a given user can change over time. The table below represents the various changes\nover time and how clients and servers must interpret those changes. Previous membership can be retrieved\nfrom the ``prev_content`` object on an event. If not present, the user's previous membership must be assumed\nas ``leave``.\n\n.. TODO: Improve how this table is written? We use a csv-table to get around vertical header restrictions.\n\n.. csv-table::\n :header-rows: 1\n :stub-columns: 1\n\n \"\",\"to ``invite``\",\"to ``join``\",\"to ``leave``\",\"to ``ban``\",\"to ``knock``\"\n \"from ``invite``\",\"No change.\",\"User joined the room.\",\"If the ``state_key`` is the same as the ``sender``, the user rejected the invite. Otherwise, the ``state_key`` user had their invite revoked.\",\"User was banned.\",\"Not implemented.\"\n \"from ``join``\",\"Must never happen.\",\"``displayname`` or ``avatar_url`` changed.\",\"If the ``state_key`` is the same as the ``sender``, the user left. Otherwise, the ``state_key`` user was kicked.\",\"User was kicked and banned.\",\"Not implemented.\"\n \"from ``leave``\",\"New invitation sent.\",\"User joined.\",\"No change.\",\"User was banned.\",\"Not implemented.\"\n \"from ``ban``\",\"Must never happen.\",\"Must never happen.\",\"User was unbanned.\",\"No change.\",\"Not implemented.\"\n \"from ``knock``\",\"Not implemented.\",\"Not implemented.\",\"Not implemented.\",\"Not implemented.\",\"Not implemented.\"",
"allOf" : [ {
"title" : "State Event",
"type" : "object",
"description" : "State Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}, {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
} ]
} ]
},
"membership" : {
"type" : "string",
"description" : "The user's membership state in this room.",
"enum" : [ "invite", "join", "leave", "ban" ]
},
"messages" : {
"$ref" : "#/components/schemas/PaginationChunk"
},
"room_id" : {
"type" : "string",
"description" : "The ID of this room."
},
"state" : {
"type" : "array",
"description" : "If the user is a member of the room this will be the\ncurrent state of the room as a list of events. If the\nuser has left the room this will be the state of the\nroom when they left it.",
"items" : {
"title" : "StateEvent",
"type" : "object",
"allOf" : [ {
"title" : "State Event",
"type" : "object",
"description" : "State Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}, {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
} ]
}
},
"visibility" : {
"type" : "string",
"description" : "Whether this room is visible to the ``/publicRooms`` API\nor not.\"",
"enum" : [ "private", "public" ]
}
}
},
"PusherData" : {
"type" : "object",
"properties" : {
"format" : {
"type" : "string",
"description" : "The format to send notifications in to Push Gateways if the\n``kind`` is ``http``. The details about what fields the\nhomeserver should send to the push gateway are defined in the\n`Push Gateway Specification`_. Currently the only format\navailable is 'event_id_only'."
},
"url" : {
"type" : "string",
"description" : "Required if ``kind`` is ``http``. The URL to use to send\nnotifications to. MUST be an HTTPS URL with a path of \n``/_matrix/push/v1/notify``.",
"example" : "https://push-gateway.location.here/_matrix/push/v1/notify"
}
},
"description" : "A dictionary of information for the pusher implementation\nitself. If ``kind`` is ``http``, this should contain ``url``\nwhich is the URL to use to send notifications to."
},
"DeviceInfo" : {
"type" : "object",
"properties" : {
"sessions" : {
"type" : "array",
"description" : "A user's sessions (i.e. what they did with an access token from one login).",
"items" : {
"$ref" : "#/components/schemas/SessionInfo"
}
}
}
},
"RoomFilter" : {
"type" : "object",
"properties" : {
"account_data" : {
"description" : "The per user account data to include for rooms.",
"allOf" : [ {
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
}, {
"title" : "RoomEventFilter",
"type" : "object",
"properties" : {
"contains_url" : {
"type" : "boolean",
"description" : "If ``true``, includes only events with a ``url`` key in their content. If ``false``, excludes those events. If omitted, ``url`` key is not considered for filtering."
},
"include_redundant_members" : {
"type" : "boolean",
"description" : "If ``true``, sends all membership events for all events, even if they have already\nbeen sent to the client. Does not\napply unless ``lazy_load_members`` is ``true``. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"lazy_load_members" : {
"type" : "boolean",
"description" : "If ``true``, enables lazy-loading of membership events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter.",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included.",
"items" : {
"type" : "string"
}
}
}
} ]
} ]
},
"ephemeral" : {
"description" : "The events that aren't recorded in the room history, e.g. typing and receipts, to include for rooms.",
"allOf" : [ {
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
}, {
"title" : "RoomEventFilter",
"type" : "object",
"properties" : {
"contains_url" : {
"type" : "boolean",
"description" : "If ``true``, includes only events with a ``url`` key in their content. If ``false``, excludes those events. If omitted, ``url`` key is not considered for filtering."
},
"include_redundant_members" : {
"type" : "boolean",
"description" : "If ``true``, sends all membership events for all events, even if they have already\nbeen sent to the client. Does not\napply unless ``lazy_load_members`` is ``true``. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"lazy_load_members" : {
"type" : "boolean",
"description" : "If ``true``, enables lazy-loading of membership events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter.",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included.",
"items" : {
"type" : "string"
}
}
}
} ]
} ]
},
"include_leave" : {
"type" : "boolean",
"description" : "Include rooms that the user has left in the sync, default false"
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter. This filter is applied before the filters in ``ephemeral``, ``state``, ``timeline`` or ``account_data``",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included. This filter is applied before the filters in ``ephemeral``, ``state``, ``timeline`` or ``account_data``",
"items" : {
"type" : "string"
}
},
"state" : {
"title" : "StateFilter",
"type" : "object",
"description" : "The state events to include for rooms.",
"allOf" : [ {
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
}, {
"title" : "RoomEventFilter",
"type" : "object",
"properties" : {
"contains_url" : {
"type" : "boolean",
"description" : "If ``true``, includes only events with a ``url`` key in their content. If ``false``, excludes those events. If omitted, ``url`` key is not considered for filtering."
},
"include_redundant_members" : {
"type" : "boolean",
"description" : "If ``true``, sends all membership events for all events, even if they have already\nbeen sent to the client. Does not\napply unless ``lazy_load_members`` is ``true``. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"lazy_load_members" : {
"type" : "boolean",
"description" : "If ``true``, enables lazy-loading of membership events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter.",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included.",
"items" : {
"type" : "string"
}
}
}
} ]
} ]
},
"timeline" : {
"description" : "The message and state update events to include for rooms.",
"allOf" : [ {
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
}, {
"title" : "RoomEventFilter",
"type" : "object",
"properties" : {
"contains_url" : {
"type" : "boolean",
"description" : "If ``true``, includes only events with a ``url`` key in their content. If ``false``, excludes those events. If omitted, ``url`` key is not considered for filtering."
},
"include_redundant_members" : {
"type" : "boolean",
"description" : "If ``true``, sends all membership events for all events, even if they have already\nbeen sent to the client. Does not\napply unless ``lazy_load_members`` is ``true``. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"lazy_load_members" : {
"type" : "boolean",
"description" : "If ``true``, enables lazy-loading of membership events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter.",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included.",
"items" : {
"type" : "string"
}
}
}
} ]
} ]
}
},
"description" : "Filters to be applied to room data."
},
"StrippedState" : {
"required" : [ "content", "sender", "state_key", "type" ],
"type" : "object",
"properties" : {
"content" : {
"title" : "EventContent",
"type" : "object",
"description" : "The ``content`` for the event."
},
"sender" : {
"type" : "string",
"description" : "The ``sender`` for the event."
},
"state_key" : {
"type" : "string",
"description" : "The ``state_key`` for the event."
},
"type" : {
"type" : "string",
"description" : "The ``type`` for the event."
}
},
"description" : "A stripped down state event, with only the ``type``, ``state_key``,\n``sender``, and ``content`` keys."
},
"inline_response_429" : {
"required" : [ "errcode" ],
"type" : "object",
"properties" : {
"errcode" : {
"type" : "string",
"description" : "The M_LIMIT_EXCEEDED error code",
"example" : "M_LIMIT_EXCEEDED"
},
"error" : {
"type" : "string",
"description" : "A human-readable error message.",
"example" : "Too many requests"
},
"retry_after_ms" : {
"type" : "integer",
"description" : "The amount of time in milliseconds the client should wait\nbefore trying the request again.",
"example" : 2000
}
},
"description" : "The rate limit was reached for this request"
},
"inline_response_200_22" : {
"required" : [ "presence" ],
"type" : "object",
"properties" : {
"currently_active" : {
"type" : "boolean",
"description" : "Whether the user is currently active"
},
"last_active_ago" : {
"type" : "integer",
"description" : "The length of time in milliseconds since an action was performed\nby this user."
},
"presence" : {
"type" : "string",
"description" : "This user's presence.",
"enum" : [ "online", "offline", "unavailable" ]
},
"status_msg" : {
"type" : "string",
"description" : "The state message for this user if one was set."
}
}
},
"inline_response_200_21" : {
"required" : [ "notifications" ],
"type" : "object",
"properties" : {
"next_token" : {
"type" : "string",
"description" : "The token to supply in the ``from`` param of the next\n``/notifications`` request in order to request more\nevents. If this is absent, there are no more results."
},
"notifications" : {
"type" : "array",
"description" : "The list of events that triggered notifications.",
"items" : {
"$ref" : "#/components/schemas/Notification"
}
}
}
},
"inline_response_200_24" : {
"type" : "object",
"properties" : {
"avatar_url" : {
"type" : "string",
"description" : "The user's avatar URL if they have set one, otherwise not present."
}
}
},
"inline_response_200_23" : {
"type" : "object",
"properties" : {
"avatar_url" : {
"type" : "string",
"description" : "The user's avatar URL if they have set one, otherwise not present."
},
"displayname" : {
"type" : "string",
"description" : "The user's display name if they have set one, otherwise not present."
}
}
},
"Categories" : {
"type" : "object",
"properties" : {
"room_events" : {
"$ref" : "#/components/schemas/Room Events Criteria"
}
},
"description" : "Describes which categories to search in and their criteria."
},
"inline_response_200_20" : {
"type" : "object",
"properties" : {
"access_token" : {
"type" : "string",
"description" : "An access token for the account.\nThis access token can then be used to authorize other requests."
},
"device_id" : {
"type" : "string",
"description" : "ID of the logged-in device. Will be the same as the\ncorresponding parameter in the request, if one was specified."
},
"home_server" : {
"type" : "string",
"description" : "The server_name of the homeserver on which the account has\nbeen registered.\n\n**Deprecated**. Clients should extract the server_name from\n``user_id`` (by splitting at the first colon) if they require\nit. Note also that ``homeserver`` is not spelt this way."
},
"user_id" : {
"type" : "string",
"description" : "The fully-qualified Matrix ID that has been registered."
},
"well_known" : {
"$ref" : "#/components/schemas/Discovery Information_1"
}
}
},
"inline_response_200_29" : {
"required" : [ "global" ],
"type" : "object",
"properties" : {
"global" : {
"title" : "Ruleset",
"type" : "object",
"description" : "The global ruleset.",
"allOf" : [ {
"type" : "object",
"properties" : {
"content" : {
"type" : "array",
"items" : {
"title" : "PushRule",
"type" : "object",
"allOf" : [ {
"title" : "PushRule",
"required" : [ "actions", "default", "enabled", "rule_id" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The actions to perform when this rule is matched.",
"items" : {
"type" : "object"
}
},
"conditions" : {
"type" : "array",
"description" : "The conditions that must hold true for an event in order for a rule to be\napplied to an event. A rule with no conditions always matches. Only\napplicable to ``underride`` and ``override`` rules.",
"items" : {
"allOf" : [ {
"title" : "PushCondition",
"required" : [ "kind" ],
"type" : "object",
"properties" : {
"is" : {
"type" : "string",
"description" : "Required for ``room_member_count`` conditions. A decimal integer\noptionally prefixed by one of, ==, <, >, >= or <=. A prefix of < matches\nrooms where the member count is strictly less than the given number and\nso forth. If no prefix is present, this parameter defaults to ==."
},
"key" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The dot-separated field of the\nevent to match.\n\nRequired for ``sender_notification_permission`` conditions. The field in\nthe power level event the user needs a minimum power level for. Fields\nmust be specified under the ``notifications`` property in the power level\nevent's ``content``.",
"x-example" : "content.body"
},
"kind" : {
"type" : "string",
"description" : "The kind of condition to apply. See `conditions <#conditions>`_ for\nmore information on the allowed kinds and how they work."
},
"pattern" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The glob-style pattern to\nmatch against. Patterns with no special glob characters should be\ntreated as having asterisks prepended and appended when testing the\ncondition."
}
}
} ]
}
},
"default" : {
"type" : "boolean",
"description" : "Whether this is a default rule, or has been set explicitly."
},
"enabled" : {
"type" : "boolean",
"description" : "Whether the push rule is enabled or not."
},
"pattern" : {
"type" : "string",
"description" : "The glob-style pattern to match against. Only applicable to ``content``\nrules."
},
"rule_id" : {
"type" : "string",
"description" : "The ID of this rule."
}
}
} ]
}
},
"override" : {
"type" : "array",
"items" : {
"title" : "PushRule",
"type" : "object",
"allOf" : [ {
"title" : "PushRule",
"required" : [ "actions", "default", "enabled", "rule_id" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The actions to perform when this rule is matched.",
"items" : {
"type" : "object"
}
},
"conditions" : {
"type" : "array",
"description" : "The conditions that must hold true for an event in order for a rule to be\napplied to an event. A rule with no conditions always matches. Only\napplicable to ``underride`` and ``override`` rules.",
"items" : {
"allOf" : [ {
"title" : "PushCondition",
"required" : [ "kind" ],
"type" : "object",
"properties" : {
"is" : {
"type" : "string",
"description" : "Required for ``room_member_count`` conditions. A decimal integer\noptionally prefixed by one of, ==, <, >, >= or <=. A prefix of < matches\nrooms where the member count is strictly less than the given number and\nso forth. If no prefix is present, this parameter defaults to ==."
},
"key" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The dot-separated field of the\nevent to match.\n\nRequired for ``sender_notification_permission`` conditions. The field in\nthe power level event the user needs a minimum power level for. Fields\nmust be specified under the ``notifications`` property in the power level\nevent's ``content``.",
"x-example" : "content.body"
},
"kind" : {
"type" : "string",
"description" : "The kind of condition to apply. See `conditions <#conditions>`_ for\nmore information on the allowed kinds and how they work."
},
"pattern" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The glob-style pattern to\nmatch against. Patterns with no special glob characters should be\ntreated as having asterisks prepended and appended when testing the\ncondition."
}
}
} ]
}
},
"default" : {
"type" : "boolean",
"description" : "Whether this is a default rule, or has been set explicitly."
},
"enabled" : {
"type" : "boolean",
"description" : "Whether the push rule is enabled or not."
},
"pattern" : {
"type" : "string",
"description" : "The glob-style pattern to match against. Only applicable to ``content``\nrules."
},
"rule_id" : {
"type" : "string",
"description" : "The ID of this rule."
}
}
} ]
}
},
"room" : {
"type" : "array",
"items" : {
"title" : "PushRule",
"type" : "object",
"allOf" : [ {
"title" : "PushRule",
"required" : [ "actions", "default", "enabled", "rule_id" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The actions to perform when this rule is matched.",
"items" : {
"type" : "object"
}
},
"conditions" : {
"type" : "array",
"description" : "The conditions that must hold true for an event in order for a rule to be\napplied to an event. A rule with no conditions always matches. Only\napplicable to ``underride`` and ``override`` rules.",
"items" : {
"allOf" : [ {
"title" : "PushCondition",
"required" : [ "kind" ],
"type" : "object",
"properties" : {
"is" : {
"type" : "string",
"description" : "Required for ``room_member_count`` conditions. A decimal integer\noptionally prefixed by one of, ==, <, >, >= or <=. A prefix of < matches\nrooms where the member count is strictly less than the given number and\nso forth. If no prefix is present, this parameter defaults to ==."
},
"key" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The dot-separated field of the\nevent to match.\n\nRequired for ``sender_notification_permission`` conditions. The field in\nthe power level event the user needs a minimum power level for. Fields\nmust be specified under the ``notifications`` property in the power level\nevent's ``content``.",
"x-example" : "content.body"
},
"kind" : {
"type" : "string",
"description" : "The kind of condition to apply. See `conditions <#conditions>`_ for\nmore information on the allowed kinds and how they work."
},
"pattern" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The glob-style pattern to\nmatch against. Patterns with no special glob characters should be\ntreated as having asterisks prepended and appended when testing the\ncondition."
}
}
} ]
}
},
"default" : {
"type" : "boolean",
"description" : "Whether this is a default rule, or has been set explicitly."
},
"enabled" : {
"type" : "boolean",
"description" : "Whether the push rule is enabled or not."
},
"pattern" : {
"type" : "string",
"description" : "The glob-style pattern to match against. Only applicable to ``content``\nrules."
},
"rule_id" : {
"type" : "string",
"description" : "The ID of this rule."
}
}
} ]
}
},
"sender" : {
"type" : "array",
"items" : {
"title" : "PushRule",
"type" : "object",
"allOf" : [ {
"title" : "PushRule",
"required" : [ "actions", "default", "enabled", "rule_id" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The actions to perform when this rule is matched.",
"items" : {
"type" : "object"
}
},
"conditions" : {
"type" : "array",
"description" : "The conditions that must hold true for an event in order for a rule to be\napplied to an event. A rule with no conditions always matches. Only\napplicable to ``underride`` and ``override`` rules.",
"items" : {
"allOf" : [ {
"title" : "PushCondition",
"required" : [ "kind" ],
"type" : "object",
"properties" : {
"is" : {
"type" : "string",
"description" : "Required for ``room_member_count`` conditions. A decimal integer\noptionally prefixed by one of, ==, <, >, >= or <=. A prefix of < matches\nrooms where the member count is strictly less than the given number and\nso forth. If no prefix is present, this parameter defaults to ==."
},
"key" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The dot-separated field of the\nevent to match.\n\nRequired for ``sender_notification_permission`` conditions. The field in\nthe power level event the user needs a minimum power level for. Fields\nmust be specified under the ``notifications`` property in the power level\nevent's ``content``.",
"x-example" : "content.body"
},
"kind" : {
"type" : "string",
"description" : "The kind of condition to apply. See `conditions <#conditions>`_ for\nmore information on the allowed kinds and how they work."
},
"pattern" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The glob-style pattern to\nmatch against. Patterns with no special glob characters should be\ntreated as having asterisks prepended and appended when testing the\ncondition."
}
}
} ]
}
},
"default" : {
"type" : "boolean",
"description" : "Whether this is a default rule, or has been set explicitly."
},
"enabled" : {
"type" : "boolean",
"description" : "Whether the push rule is enabled or not."
},
"pattern" : {
"type" : "string",
"description" : "The glob-style pattern to match against. Only applicable to ``content``\nrules."
},
"rule_id" : {
"type" : "string",
"description" : "The ID of this rule."
}
}
} ]
}
},
"underride" : {
"type" : "array",
"items" : {
"title" : "PushRule",
"type" : "object",
"allOf" : [ {
"title" : "PushRule",
"required" : [ "actions", "default", "enabled", "rule_id" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The actions to perform when this rule is matched.",
"items" : {
"type" : "object"
}
},
"conditions" : {
"type" : "array",
"description" : "The conditions that must hold true for an event in order for a rule to be\napplied to an event. A rule with no conditions always matches. Only\napplicable to ``underride`` and ``override`` rules.",
"items" : {
"allOf" : [ {
"title" : "PushCondition",
"required" : [ "kind" ],
"type" : "object",
"properties" : {
"is" : {
"type" : "string",
"description" : "Required for ``room_member_count`` conditions. A decimal integer\noptionally prefixed by one of, ==, <, >, >= or <=. A prefix of < matches\nrooms where the member count is strictly less than the given number and\nso forth. If no prefix is present, this parameter defaults to ==."
},
"key" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The dot-separated field of the\nevent to match.\n\nRequired for ``sender_notification_permission`` conditions. The field in\nthe power level event the user needs a minimum power level for. Fields\nmust be specified under the ``notifications`` property in the power level\nevent's ``content``.",
"x-example" : "content.body"
},
"kind" : {
"type" : "string",
"description" : "The kind of condition to apply. See `conditions <#conditions>`_ for\nmore information on the allowed kinds and how they work."
},
"pattern" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The glob-style pattern to\nmatch against. Patterns with no special glob characters should be\ntreated as having asterisks prepended and appended when testing the\ncondition."
}
}
} ]
}
},
"default" : {
"type" : "boolean",
"description" : "Whether this is a default rule, or has been set explicitly."
},
"enabled" : {
"type" : "boolean",
"description" : "Whether the push rule is enabled or not."
},
"pattern" : {
"type" : "string",
"description" : "The glob-style pattern to match against. Only applicable to ``content``\nrules."
},
"rule_id" : {
"type" : "string",
"description" : "The ID of this rule."
}
}
} ]
}
}
}
} ]
}
}
},
"Discovery Information_1" : {
"required" : [ "m.homeserver" ],
"type" : "object",
"properties" : {
"m.homeserver" : {
"$ref" : "#/components/schemas/Homeserver Information"
},
"m.identity_server" : {
"$ref" : "#/components/schemas/Identity Server Information"
}
},
"description" : "Optional client configuration provided by the server. If present,\nclients SHOULD use the provided object to reconfigure themselves,\noptionally validating the URLs within. This object takes the same\nform as the one returned from .well-known autodiscovery.",
"example" : "{\"m.homeserver\":{\"base_url\":\"https://matrix.example.com\"},\"m.identity_server\":{\"base_url\":\"https://identity.example.com\"},\"org.example.custom.property\":{\"app_url\":\"https://custom.app.example.org\"}}"
},
"inline_response_200_26" : {
"required" : [ "chunk" ],
"type" : "object",
"properties" : {
"chunk" : {
"title" : "PublicRoomsChunks",
"type" : "array",
"description" : "A paginated chunk of public rooms.",
"items" : {
"$ref" : "#/components/schemas/PublicRoomsChunk"
}
},
"next_batch" : {
"type" : "string",
"description" : "A pagination token for the response. The absence of this token\nmeans there are no more results to fetch and the client should\nstop paginating."
},
"prev_batch" : {
"type" : "string",
"description" : "A pagination token that allows fetching previous results. The\nabsence of this token means there are no results before this\nbatch, i.e. this is the first batch."
},
"total_room_count_estimate" : {
"type" : "integer",
"description" : "An estimate on the total number of public rooms, if the\nserver has an estimate."
}
},
"description" : "A list of the rooms on the server.",
"example" : {
"chunk" : [ {
"aliases" : [ "#murrays:cheese.bar" ],
"avatar_url" : "mxc://bleeker.street/CHEDDARandBRIE",
"guest_can_join" : false,
"name" : "CHEESE",
"num_joined_members" : 37,
"room_id" : "!ol19s:bleecker.street",
"topic" : "Tasty tasty cheese",
"world_readable" : true
} ],
"next_batch" : "p190q",
"prev_batch" : "p1902",
"total_room_count_estimate" : 115
}
},
"Room Events Criteria" : {
"required" : [ "search_term" ],
"type" : "object",
"properties" : {
"event_context" : {
"$ref" : "#/components/schemas/Include Event Context"
},
"filter" : {
"title" : "Filter",
"type" : "object",
"description" : "This takes a `filter`_.",
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
}, {
"title" : "RoomEventFilter",
"type" : "object",
"properties" : {
"contains_url" : {
"type" : "boolean",
"description" : "If ``true``, includes only events with a ``url`` key in their content. If ``false``, excludes those events. If omitted, ``url`` key is not considered for filtering."
},
"include_redundant_members" : {
"type" : "boolean",
"description" : "If ``true``, sends all membership events for all events, even if they have already\nbeen sent to the client. Does not\napply unless ``lazy_load_members`` is ``true``. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"lazy_load_members" : {
"type" : "boolean",
"description" : "If ``true``, enables lazy-loading of membership events. See\n`Lazy-loading room members <#lazy-loading-room-members>`_\nfor more information. Defaults to ``false``."
},
"not_rooms" : {
"type" : "array",
"description" : "A list of room IDs to exclude. If this list is absent then no rooms are excluded. A matching room will be excluded even if it is listed in the ``'rooms'`` filter.",
"items" : {
"type" : "string"
}
},
"rooms" : {
"type" : "array",
"description" : "A list of room IDs to include. If this list is absent then all rooms are included.",
"items" : {
"type" : "string"
}
}
}
} ]
},
"groupings" : {
"$ref" : "#/components/schemas/Groupings"
},
"include_state" : {
"title" : "Include current state",
"type" : "boolean",
"description" : "Requests the server return the current state for\neach room returned."
},
"keys" : {
"type" : "array",
"description" : "The keys to search. Defaults to all.",
"items" : {
"type" : "string",
"enum" : [ "content.body", "content.name", "content.topic" ]
}
},
"order_by" : {
"title" : "Ordering",
"type" : "string",
"description" : "The order in which to search for results.\nBy default, this is ``\"rank\"``.",
"enum" : [ "recent", "rank" ]
},
"search_term" : {
"type" : "string",
"description" : "The string to search events for"
}
},
"description" : "Mapping of category name to search criteria."
},
"inline_response_200_25" : {
"type" : "object",
"properties" : {
"displayname" : {
"type" : "string",
"description" : "The user's display name if they have set one, otherwise not present."
}
}
},
"inline_response_200_28" : {
"type" : "object",
"properties" : {
"pushers" : {
"title" : "Pushers",
"type" : "array",
"description" : "An array containing the current pushers for the user",
"items" : {
"$ref" : "#/components/schemas/Pusher"
}
}
}
},
"inline_response_200_27" : {
"required" : [ "chunk" ],
"type" : "object",
"properties" : {
"chunk" : {
"title" : "PublicRoomsChunks",
"type" : "array",
"description" : "A paginated chunk of public rooms.",
"items" : {
"$ref" : "#/components/schemas/PublicRoomsChunk"
}
},
"next_batch" : {
"type" : "string",
"description" : "A pagination token for the response. The absence of this token\nmeans there are no more results to fetch and the client should\nstop paginating."
},
"prev_batch" : {
"type" : "string",
"description" : "A pagination token that allows fetching previous results. The\nabsence of this token means there are no results before this\nbatch, i.e. this is the first batch."
},
"total_room_count_estimate" : {
"type" : "integer",
"description" : "An estimate on the total number of public rooms, if the\nserver has an estimate."
}
},
"description" : "A list of the rooms on the server."
},
"RoomEvent" : {
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields."
},
"ConnectionInfo" : {
"type" : "object",
"properties" : {
"ip" : {
"type" : "string",
"description" : "Most recently seen IP address of the session."
},
"last_seen" : {
"type" : "integer",
"description" : "Unix timestamp that the session was last active.",
"format" : "int64"
},
"user_agent" : {
"type" : "string",
"description" : "User agent string last seen in the session."
}
}
},
"Group" : {
"type" : "object",
"properties" : {
"key" : {
"title" : "Group Key",
"type" : "string",
"description" : "Key that defines the group.",
"enum" : [ "room_id", "sender" ]
}
},
"description" : "Configuration for group."
},
"body_29" : {
"required" : [ "reason", "score" ],
"type" : "object",
"properties" : {
"reason" : {
"type" : "string",
"description" : "The reason the content is being reported. May be blank."
},
"score" : {
"type" : "integer",
"description" : "The score to rate this content as where -100 is most offensive\nand 0 is inoffensive."
}
},
"example" : {
"reason" : "this makes me sad",
"score" : -100
}
},
"body_27" : {
"required" : [ "m.fully_read" ],
"type" : "object",
"properties" : {
"m.fully_read" : {
"type" : "string",
"description" : "The event ID the read marker should be located at. The\nevent MUST belong to the room.",
"example" : "$somewhere:example.org"
},
"m.read" : {
"type" : "string",
"description" : "The event ID to set the read receipt location at. This is\nequivalent to calling ``/receipt/m.read/$elsewhere:example.org``\nand is provided here to save that extra call.",
"example" : "$elsewhere:example.org"
}
}
},
"inline_response_200_51" : {
"required" : [ "content_uri" ],
"type" : "object",
"properties" : {
"content_uri" : {
"type" : "string",
"description" : "The `MXC URI`_ to the uploaded content."
}
}
},
"body_28" : {
"type" : "object",
"properties" : {
"reason" : {
"type" : "string",
"description" : "The reason for the event being redacted."
}
},
"example" : {
"reason" : "Indecent material"
}
},
"inline_response_200_50" : {
"type" : "object",
"properties" : {
"matrix:image:size" : {
"type" : "integer",
"description" : "The byte-size of the image. Omitted if there is no image attached.",
"format" : "int64"
},
"og:image" : {
"type" : "string",
"description" : "An `MXC URI`_ to the image. Omitted if there is no image."
}
}
},
"body_25" : {
"required" : [ "user_id" ],
"type" : "object",
"properties" : {
"user_id" : {
"type" : "string",
"description" : "The fully qualified user ID of the invitee."
}
},
"example" : {
"user_id" : "@cheeky_monkey:matrix.org"
}
},
"body_26" : {
"required" : [ "user_id" ],
"type" : "object",
"properties" : {
"reason" : {
"type" : "string",
"description" : "The reason the user has been kicked. This will be supplied as the \n``reason`` on the target's updated `m.room.member`_ event."
},
"user_id" : {
"type" : "string",
"description" : "The fully qualified user ID of the user being kicked."
}
},
"example" : {
"reason" : "Telling unfunny jokes",
"user_id" : "@cheeky_monkey:matrix.org"
}
},
"SessionInfo" : {
"type" : "object",
"properties" : {
"connections" : {
"type" : "array",
"description" : "Information particular connections in the session.",
"items" : {
"$ref" : "#/components/schemas/ConnectionInfo"
}
}
}
},
"User Profile" : {
"type" : "object",
"properties" : {
"avatar_url" : {
"title" : "Avatar Url",
"type" : "string"
},
"displayname" : {
"title" : "Display name",
"type" : "string"
}
}
},
"Pusher" : {
"required" : [ "app_display_name", "app_id", "data", "device_display_name", "kind", "lang", "pushkey" ],
"type" : "object",
"properties" : {
"app_display_name" : {
"type" : "string",
"description" : "A string that will allow the user to identify what application\nowns this pusher."
},
"app_id" : {
"type" : "string",
"description" : "This is a reverse-DNS style identifier for the application.\nMax length, 64 chars."
},
"data" : {
"$ref" : "#/components/schemas/PusherData_1"
},
"device_display_name" : {
"type" : "string",
"description" : "A string that will allow the user to identify what device owns\nthis pusher."
},
"kind" : {
"type" : "string",
"description" : "The kind of pusher. ``\"http\"`` is a pusher that\nsends HTTP pokes."
},
"lang" : {
"type" : "string",
"description" : "The preferred language for receiving notifications (e.g. 'en'\nor 'en-US')"
},
"profile_tag" : {
"type" : "string",
"description" : "This string determines which set of device specific rules this\npusher executes."
},
"pushkey" : {
"type" : "string",
"description" : "This is a unique identifier for this pusher. See ``/set`` for\nmore detail.\nMax length, 512 bytes."
}
}
},
"Notification" : {
"required" : [ "actions", "event", "read", "room_id", "ts" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The action(s) to perform when the conditions for this rule are met.\nSee `Push Rules: API`_.",
"items" : {
"type" : "object"
}
},
"event" : {
"title" : "Event",
"type" : "object",
"description" : "The Event object for the event that triggered the notification.",
"allOf" : [ {
"title" : "Event",
"type" : "object",
"properties" : {
"content" : {
"title" : "EventContent",
"type" : "object",
"description" : "The content of this event. The fields in this object will vary depending on the type of event."
},
"event_id" : {
"type" : "string",
"description" : "The ID of this event, if applicable."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "The MXID of the user who sent this event."
},
"state_key" : {
"type" : "string",
"description" : "Optional. This key will only be present for state events. A unique key which defines the overwriting semantics for this piece of room state."
},
"type" : {
"type" : "string",
"description" : "The type of event."
},
"unsigned" : {
"title" : "Unsigned",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "Time in milliseconds since the event was sent.",
"format" : "int64"
},
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this state. This will be present only for state events appearing in the ``timeline``. If this is not a state event, or there is no previous content, this key will be missing."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "Optional. The transaction ID set when this message was sent. This key will only be present for message events sent by the device calling this API."
}
},
"description" : "Information about this event which was not sent by the originating homeserver"
}
}
} ]
},
"profile_tag" : {
"type" : "string",
"description" : "The profile tag of the rule that matched this event."
},
"read" : {
"type" : "boolean",
"description" : "Indicates whether the user has sent a read receipt indicating\nthat they have read this message."
},
"room_id" : {
"type" : "string",
"description" : "The ID of the room in which the event was posted."
},
"ts" : {
"type" : "integer",
"description" : "The unix timestamp at which the event notification was sent,\nin milliseconds."
}
}
},
"body_3" : {
"required" : [ "new_password" ],
"type" : "object",
"properties" : {
"auth" : {
"$ref" : "#/components/schemas/Authentication Data"
},
"logout_devices" : {
"type" : "boolean",
"description" : "Whether the user's other access tokens, and their associated devices, should be\nrevoked if the request succeeds. Defaults to true.\n\nWhen ``false``, the server can still take advantage of `the soft logout method <#soft-logout>`_\nfor the user's remaining devices.",
"example" : true
},
"new_password" : {
"type" : "string",
"description" : "The new password for the account.",
"example" : "ihatebananas"
}
}
},
"body_4" : {
"type" : "object",
"properties" : {
"creation_content" : {
"title" : "CreationContent",
"type" : "object",
"description" : "Extra keys, such as ``m.federate``, to be added to the content\nof the `m.room.create`_ event. The server will clobber the following\nkeys: ``creator``, ``room_version``. Future versions of the specification\nmay allow the server to clobber other keys."
},
"initial_state" : {
"type" : "array",
"description" : "A list of state events to set in the new room. This allows\nthe user to override the default state events set in the new\nroom. The expected format of the state events are an object\nwith type, state_key and content keys set.\n\nTakes precedence over events set by ``preset``, but gets\noverriden by ``name`` and ``topic`` keys.",
"items" : {
"$ref" : "#/components/schemas/StateEvent"
}
},
"invite" : {
"type" : "array",
"description" : "A list of user IDs to invite to the room. This will tell the\nserver to invite everyone in the list to the newly created room.",
"items" : {
"type" : "string"
}
},
"invite_3pid" : {
"type" : "array",
"description" : "A list of objects representing third party IDs to invite into\nthe room.",
"items" : {
"$ref" : "#/components/schemas/Invite3pid"
}
},
"is_direct" : {
"type" : "boolean",
"description" : "This flag makes the server set the ``is_direct`` flag on the\n``m.room.member`` events sent to the users in ``invite`` and\n``invite_3pid``. See `Direct Messaging`_ for more information."
},
"name" : {
"type" : "string",
"description" : "If this is included, an ``m.room.name`` event will be sent\ninto the room to indicate the name of the room. See Room\nEvents for more information on ``m.room.name``."
},
"power_level_content_override" : {
"title" : "Power Level Event Content",
"type" : "object",
"description" : "The power level content to override in the default power level\nevent. This object is applied on top of the generated `m.room.power_levels`_\nevent content prior to it being sent to the room. Defaults to\noverriding nothing."
},
"preset" : {
"type" : "string",
"description" : "Convenience parameter for setting various default state events\nbased on a preset.\n\nIf unspecified, the server should use the ``visibility`` to determine\nwhich preset to use. A visbility of ``public`` equates to a preset of\n``public_chat`` and ``private`` visibility equates to a preset of\n``private_chat``.",
"enum" : [ "private_chat", "public_chat", "trusted_private_chat" ]
},
"room_alias_name" : {
"type" : "string",
"description" : "The desired room alias **local part**. If this is included, a\nroom alias will be created and mapped to the newly created\nroom. The alias will belong on the *same* homeserver which\ncreated the room. For example, if this was set to \"foo\" and\nsent to the homeserver \"example.com\" the complete room alias\nwould be ``#foo:example.com``.\n\nThe complete room alias will become the canonical alias for\nthe room."
},
"room_version" : {
"type" : "string",
"description" : "The room version to set for the room. If not provided, the homeserver is\nto use its configured default. If provided, the homeserver will return a\n400 error with the errcode ``M_UNSUPPORTED_ROOM_VERSION`` if it does not\nsupport the room version.",
"example" : "1"
},
"topic" : {
"type" : "string",
"description" : "If this is included, an ``m.room.topic`` event will be sent\ninto the room to indicate the topic for the room. See Room\nEvents for more information on ``m.room.topic``."
},
"visibility" : {
"type" : "string",
"description" : "A ``public`` visibility indicates that the room will be shown\nin the published room list. A ``private`` visibility will hide\nthe room from the published room list. Rooms default to\n``private`` visibility if this key is not included. NB: This\nshould not be confused with ``join_rules`` which also uses the\nword ``public``.",
"enum" : [ "public", "private" ]
}
},
"example" : {
"creation_content" : {
"m.federate" : false
},
"name" : "The Grand Duke Pub",
"preset" : "public_chat",
"room_alias_name" : "thepub",
"topic" : "All about happy hour"
}
},
"body_1" : {
"required" : [ "client_secret", "id_access_token", "id_server", "sid" ],
"type" : "object",
"properties" : {
"client_secret" : {
"type" : "string",
"description" : "The client secret used in the session with the identity server."
},
"id_access_token" : {
"type" : "string",
"description" : "An access token previously registered with the identity server."
},
"id_server" : {
"type" : "string",
"description" : "The identity server to use."
},
"sid" : {
"type" : "string",
"description" : "The session identifier given by the identity server."
}
},
"example" : {
"client_secret" : "d0n'tT3ll",
"id_access_token" : "abc123_OpaqueString",
"id_server" : "example.org",
"sid" : "abc123987"
}
},
"body_2" : {
"type" : "object",
"properties" : {
"auth" : {
"$ref" : "#/components/schemas/Authentication Data"
},
"id_server" : {
"type" : "string",
"description" : "The identity server to unbind all of the user's 3PIDs from.\nIf not provided, the homeserver MUST use the ``id_server``\nthat was originally use to bind each identifier. If the\nhomeserver does not know which ``id_server`` that was,\nit must return an ``id_server_unbind_result`` of\n``no-support``.",
"example" : "example.org"
}
}
},
"body_34" : {
"title" : "body",
"type" : "object",
"properties" : {
"messages" : {
"type" : "object",
"additionalProperties" : {
"type" : "object",
"additionalProperties" : {
"title" : "EventContent",
"type" : "object",
"description" : "Message content"
}
},
"description" : "The messages to send. A map from user ID, to a map from\ndevice ID to message body. The device ID may also be `*`,\nmeaning all known devices for the user.",
"example" : {
"@alice:example.com" : {
"TLLBEANAAG" : {
"example_content_key" : "value"
}
}
}
}
}
},
"body_35" : {
"type" : "object",
"example" : {
"event_fields" : [ "type", "content", "sender" ],
"event_format" : "client",
"presence" : {
"not_senders" : [ "@alice:example.com" ],
"types" : [ "m.presence" ]
},
"room" : {
"ephemeral" : {
"not_rooms" : [ "!726s6s6q:example.com" ],
"not_senders" : [ "@spam:example.com" ],
"types" : [ "m.receipt", "m.typing" ]
},
"state" : {
"not_rooms" : [ "!726s6s6q:example.com" ],
"types" : [ "m.room.*" ]
},
"timeline" : {
"limit" : 10,
"not_rooms" : [ "!726s6s6q:example.com" ],
"not_senders" : [ "@spam:example.com" ],
"types" : [ "m.room.message" ]
}
}
},
"allOf" : [ {
"title" : "Filter",
"type" : "object",
"properties" : {
"account_data" : {
"description" : "The user account data that isn't associated with rooms to include.",
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
} ]
},
"event_fields" : {
"type" : "array",
"description" : "List of event fields to include. If this list is absent then all fields are included. The entries may include '.' characters to indicate sub-fields. So ['content.body'] will include the 'body' field of the 'content' object. A literal '.' character in a field name may be escaped using a '\\\\'. A server may include more fields than were requested.",
"items" : {
"type" : "string"
}
},
"event_format" : {
"type" : "string",
"description" : "The format to use for events. 'client' will return the events in a format suitable for clients. 'federation' will return the raw event as received over federation. The default is 'client'.",
"enum" : [ "client", "federation" ]
},
"presence" : {
"description" : "The presence updates to include.",
"allOf" : [ {
"title" : "EventFilter",
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of events to return."
},
"not_senders" : {
"type" : "array",
"description" : "A list of sender IDs to exclude. If this list is absent then no senders are excluded. A matching sender will be excluded even if it is listed in the ``'senders'`` filter.",
"items" : {
"type" : "string"
}
},
"not_types" : {
"type" : "array",
"description" : "A list of event types to exclude. If this list is absent then no event types are excluded. A matching type will be excluded even if it is listed in the ``'types'`` filter. A '*' can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
},
"senders" : {
"type" : "array",
"description" : "A list of senders IDs to include. If this list is absent then all senders are included.",
"items" : {
"type" : "string"
}
},
"types" : {
"type" : "array",
"description" : "A list of event types to include. If this list is absent then all event types are included. A ``'*'`` can be used as a wildcard to match any sequence of characters.",
"items" : {
"type" : "string"
}
}
}
} ]
},
"room" : {
"$ref" : "#/components/schemas/RoomFilter"
}
}
} ]
},
"body_9" : {
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The room ID to set."
}
},
"example" : {
"room_id" : "!abnjk1jdasj98:capuchins.com"
}
},
"body_32" : {
"required" : [ "new_version" ],
"type" : "object",
"properties" : {
"new_version" : {
"type" : "string",
"description" : "The new version for the room."
}
},
"example" : {
"new_version" : "2"
}
},
"body_33" : {
"required" : [ "search_categories" ],
"type" : "object",
"properties" : {
"search_categories" : {
"$ref" : "#/components/schemas/Categories"
}
},
"example" : {
"search_categories" : {
"room_events" : {
"groupings" : {
"group_by" : [ {
"key" : "room_id"
} ]
},
"keys" : [ "content.body" ],
"order_by" : "recent",
"search_term" : "martians and men"
}
}
}
},
"inline_response_403" : {
"required" : [ "errcode" ],
"type" : "object",
"properties" : {
"errcode" : {
"type" : "string",
"description" : "An error code.",
"example" : "M_UNKNOWN"
},
"error" : {
"type" : "string",
"description" : "A human-readable error message.",
"example" : "An unknown error occurred"
}
},
"description" : "A Matrix-level Error"
},
"Authentication response" : {
"title" : "Authentication response",
"required" : [ "flows" ],
"type" : "object",
"properties" : {
"completed" : {
"type" : "array",
"description" : "A list of the stages the client has completed successfully",
"items" : {
"type" : "string",
"example" : "example.type.foo"
}
},
"flows" : {
"title" : "Flow information",
"type" : "array",
"description" : "A list of the login flows supported by the server for this API.",
"items" : {
"$ref" : "#/components/schemas/Authentication response_flows"
}
},
"params" : {
"type" : "object",
"additionalProperties" : {
"type" : "object"
},
"description" : "Contains any information that the client will need to know in order to\nuse a given type of authentication. For each login type presented,\nthat type may be present as a key in this dictionary. For example, the\npublic part of an OAuth client ID could be given here.",
"example" : {
"example.type.baz" : {
"example_key" : "foobar"
}
}
},
"session" : {
"type" : "string",
"description" : "This is a session identifier that the client must pass back to the home\nserver, if one is provided, in subsequent attempts to authenticate in the\nsame API call.",
"example" : "xxxxxxyz"
}
},
"description" : "Used by servers to indicate that additional authentication information is required,"
},
"body_7" : {
"type" : "object",
"properties" : {
"auth" : {
"$ref" : "#/components/schemas/Authentication Data_1"
}
}
},
"body_30" : {
"required" : [ "typing" ],
"type" : "object",
"properties" : {
"timeout" : {
"type" : "integer",
"description" : "The length of time in milliseconds to mark this user as typing."
},
"typing" : {
"type" : "boolean",
"description" : "Whether the user is typing or not. If ``false``, the ``timeout``\nkey can be omitted."
}
},
"example" : {
"timeout" : 30000,
"typing" : true
}
},
"body_8" : {
"required" : [ "visibility" ],
"type" : "object",
"properties" : {
"visibility" : {
"type" : "string",
"description" : "Whether the room should be visible (public) in the directory\nor not (private).",
"example" : "public",
"enum" : [ "public", "private" ]
}
}
},
"body_31" : {
"required" : [ "user_id" ],
"type" : "object",
"properties" : {
"user_id" : {
"type" : "string",
"description" : "The fully qualified user ID of the user being unbanned."
}
},
"example" : {
"user_id" : "@cheeky_monkey:matrix.org"
}
},
"body_5" : {
"required" : [ "devices" ],
"type" : "object",
"properties" : {
"auth" : {
"$ref" : "#/components/schemas/Authentication Data_1"
},
"devices" : {
"type" : "array",
"description" : "The list of device IDs to delete.",
"example" : [ "QBUAZIFURK", "AUIECTSRND" ],
"items" : {
"type" : "string",
"description" : "A list of device IDs."
}
}
}
},
"body_6" : {
"type" : "object",
"properties" : {
"display_name" : {
"type" : "string",
"description" : "The new display name for this device. If not given, the\ndisplay name is unchanged.",
"example" : "My other phone"
}
}
},
"inline_response_200_44" : {
"required" : [ "access_token", "expires_in", "matrix_server_name", "token_type" ],
"type" : "object",
"properties" : {
"access_token" : {
"type" : "string",
"description" : "An access token the consumer may use to verify the identity of\nthe person who generated the token. This is given to the federation\nAPI ``GET /openid/userinfo`` to verify the user's identity."
},
"expires_in" : {
"type" : "integer",
"description" : "The number of seconds before this token expires and a new one must\nbe generated."
},
"matrix_server_name" : {
"type" : "string",
"description" : "The homeserver domain the consumer should use when attempting to\nverify the user's identity."
},
"token_type" : {
"type" : "string",
"description" : "The string ``Bearer``."
}
}
},
"inline_response_200_43" : {
"required" : [ "filter_id" ],
"type" : "object",
"properties" : {
"filter_id" : {
"type" : "string",
"description" : "The ID of the filter that was created. Cannot start\nwith a ``{`` as this character is used to determine\nif the filter provided is inline JSON or a previously\ndeclared filter by homeservers on some APIs.",
"example" : "66696p746572"
}
}
},
"inline_response_200_46" : {
"required" : [ "limited", "results" ],
"type" : "object",
"properties" : {
"limited" : {
"type" : "boolean",
"description" : "Indicates if the result list has been truncated by the limit."
},
"results" : {
"type" : "array",
"description" : "Ordered by rank and then whether or not profile info is available.",
"items" : {
"$ref" : "#/components/schemas/User"
}
}
}
},
"inline_response_200_45" : {
"type" : "object",
"properties" : {
"tags" : {
"type" : "object",
"additionalProperties" : {
"$ref" : "#/components/schemas/Tag"
}
}
}
},
"inline_response_200_40" : {
"required" : [ "event_id" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "A unique identifier for the event."
}
}
},
"Authentication Data_1" : {
"required" : [ "type" ],
"type" : "object",
"properties" : {
"session" : {
"type" : "string",
"description" : "The value of the session key given by the homeserver."
},
"type" : {
"type" : "string",
"description" : "The login type that the client is attempting to complete."
}
},
"description" : "Additional authentication information for the\nuser-interactive authentication API.",
"example" : "{\"example_credential\":\"verypoorsharedsecret\",\"session\":\"xxxxx\",\"type\":\"example.type.foo\"}"
},
"inline_response_200_42" : {
"required" : [ "next_batch" ],
"type" : "object",
"properties" : {
"account_data" : {
"title" : "Account Data",
"type" : "object",
"description" : "The global private data created by this user.",
"allOf" : [ {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "List of events.",
"items" : {
"type" : "object",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
}
}
}
} ]
},
"device_lists" : {
"title" : "DeviceLists",
"type" : "object",
"description" : "Information on end-to-end device updates, as specified in\n|device_lists_sync|_."
},
"device_one_time_keys_count" : {
"title" : "One-time keys count",
"type" : "object",
"additionalProperties" : {
"type" : "integer"
},
"description" : "Information on end-to-end encryption keys, as specified\nin |device_lists_sync|_."
},
"next_batch" : {
"type" : "string",
"description" : "The batch token to supply in the ``since`` param of the next\n``/sync`` request."
},
"presence" : {
"title" : "Presence",
"type" : "object",
"description" : "The updates to the presence status of other users.",
"allOf" : [ {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "List of events.",
"items" : {
"type" : "object",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
}
}
}
} ]
},
"rooms" : {
"$ref" : "#/components/schemas/Rooms"
},
"to_device" : {
"title" : "ToDevice",
"type" : "object",
"description" : "Information on the send-to-device messages for the client\ndevice, as defined in |send_to_device_sync|_."
}
}
},
"body_36" : {
"type" : "object",
"properties" : {
"order" : {
"type" : "number",
"description" : "A number in a range ``[0,1]`` describing a relative\nposition of the room under the given tag.",
"format" : "float"
}
},
"additionalProperties" : true,
"example" : {
"order" : 0.25
}
},
"Authentication Data_2" : {
"required" : [ "type" ],
"type" : "object",
"properties" : {
"session" : {
"type" : "string",
"description" : "The value of the session key given by the homeserver."
},
"type" : {
"type" : "string",
"description" : "The login type that the client is attempting to complete."
}
},
"description" : "Additional authentication information for the\nuser-interactive authentication API. Note that this\ninformation is *not* used to define how the registered user\nshould be authenticated, but is instead used to\nauthenticate the ``register`` call itself.",
"example" : "{\"example_credential\":\"verypoorsharedsecret\",\"session\":\"xxxxx\",\"type\":\"example.type.foo\"}"
},
"inline_response_200_41" : {
"required" : [ "replacement_room" ],
"type" : "object",
"properties" : {
"replacement_room" : {
"type" : "string",
"description" : "The ID of the new room."
}
}
},
"body_37" : {
"required" : [ "search_term" ],
"type" : "object",
"properties" : {
"limit" : {
"type" : "integer",
"description" : "The maximum number of results to return. Defaults to 10.",
"example" : 10
},
"search_term" : {
"type" : "string",
"description" : "The term to search for",
"example" : "foo"
}
}
},
"inline_response_200_48" : {
"required" : [ "versions" ],
"type" : "object",
"properties" : {
"unstable_features" : {
"type" : "object",
"additionalProperties" : {
"type" : "boolean",
"description" : "Whether or not the namespaced feature is supported."
},
"description" : "Experimental features the server supports. Features not listed here,\nor the lack of this property all together, indicate that a feature is\nnot supported."
},
"versions" : {
"type" : "array",
"description" : "The supported versions.",
"items" : {
"type" : "string",
"description" : "The supported versions"
}
}
}
},
"Homeserver Information" : {
"required" : [ "base_url" ],
"type" : "object",
"properties" : {
"base_url" : {
"type" : "string",
"description" : "The base URL for the homeserver for client-server connections.",
"example" : "https://matrix.example.com"
}
},
"description" : "Used by clients to discover homeserver information."
},
"Discovery Information" : {
"title" : "Discovery Information",
"required" : [ "m.homeserver" ],
"type" : "object",
"properties" : {
"m.homeserver" : {
"$ref" : "#/components/schemas/Homeserver Information"
},
"m.identity_server" : {
"$ref" : "#/components/schemas/Identity Server Information"
}
},
"additionalProperties" : {
"type" : "object",
"description" : "Application-dependent keys using Java package naming convention."
},
"description" : "Used by clients to determine the homeserver, identity server, and other\noptional components they should be interacting with.",
"example" : {
"m.homeserver" : {
"base_url" : "https://matrix.example.com"
},
"m.identity_server" : {
"base_url" : "https://identity.example.com"
},
"org.example.custom.property" : {
"app_url" : "https://custom.app.example.org"
}
}
},
"inline_response_200_47" : {
"required" : [ "password", "ttl", "uris", "username" ],
"type" : "object",
"properties" : {
"password" : {
"type" : "string",
"description" : "The password to use."
},
"ttl" : {
"type" : "integer",
"description" : "The time-to-live in seconds"
},
"uris" : {
"type" : "array",
"description" : "A list of TURN URIs",
"items" : {
"type" : "string"
}
},
"username" : {
"type" : "string",
"description" : "The username to use."
}
}
},
"inline_response_200_49" : {
"type" : "object",
"properties" : {
"m.upload.size" : {
"type" : "integer",
"description" : "The maximum size an upload can be in bytes.\nClients SHOULD use this as a guide when uploading content.\nIf not listed or null, the size limit should be treated as unknown.",
"format" : "int64"
}
}
},
"Rooms" : {
"type" : "object",
"properties" : {
"invite" : {
"title" : "Invited Rooms",
"type" : "object",
"additionalProperties" : {
"$ref" : "#/components/schemas/Invited Room"
},
"description" : "The rooms that the user has been invited to, mapped as room ID to\nroom information."
},
"join" : {
"title" : "Joined Rooms",
"type" : "object",
"additionalProperties" : {
"$ref" : "#/components/schemas/Joined Room"
},
"description" : "The rooms that the user has joined, mapped as room ID to\nroom information."
},
"leave" : {
"title" : "Left rooms",
"type" : "object",
"additionalProperties" : {
"$ref" : "#/components/schemas/Left Room"
},
"description" : "The rooms that the user has left or been banned from, mapped as room ID to\nroom information."
}
},
"description" : "Updates to rooms."
},
"Results" : {
"title" : "Results",
"required" : [ "search_categories" ],
"type" : "object",
"properties" : {
"search_categories" : {
"$ref" : "#/components/schemas/Result Categories"
}
}
},
"RoomMember" : {
"type" : "object",
"properties" : {
"avatar_url" : {
"type" : "string",
"description" : "The mxc avatar url of the user this object is representing."
},
"display_name" : {
"type" : "string",
"description" : "The display name of the user this object is representing."
}
}
},
"Third party identifier" : {
"required" : [ "added_at", "address", "medium", "validated_at" ],
"type" : "object",
"properties" : {
"added_at" : {
"type" : "integer",
"description" : "The timestamp, in milliseconds, when the homeserver associated the third party identifier with the user.",
"format" : "int64"
},
"address" : {
"type" : "string",
"description" : "The third party identifier address."
},
"medium" : {
"type" : "string",
"description" : "The medium of the third party identifier.",
"enum" : [ "email", "msisdn" ]
},
"validated_at" : {
"type" : "integer",
"description" : "The timestamp, in milliseconds, when the identifier was\nvalidated by the identity server.",
"format" : "int64"
}
}
},
"Joined Room" : {
"type" : "object",
"properties" : {
"account_data" : {
"title" : "Account Data",
"type" : "object",
"description" : "The private data that this user has attached to\nthis room.",
"allOf" : [ {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "List of events.",
"items" : {
"type" : "object",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
}
}
}
} ]
},
"ephemeral" : {
"title" : "Ephemeral",
"type" : "object",
"description" : "The ephemeral events in the room that aren't\nrecorded in the timeline or state of the room.\ne.g. typing.",
"allOf" : [ {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "List of events.",
"items" : {
"type" : "object",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
}
}
}
} ]
},
"state" : {
"title" : "State",
"type" : "object",
"description" : "Updates to the state, between the time indicated by\nthe ``since`` parameter, and the start of the\n``timeline`` (or all state up to the start of the\n``timeline``, if ``since`` is not given, or\n``full_state`` is true).\n\nN.B. state updates for ``m.room.member`` events will\nbe incomplete if ``lazy_load_members`` is enabled in\nthe ``/sync`` filter, and only return the member events\nrequired to display the senders of the timeline events\nin this response.",
"allOf" : [ {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "List of events.",
"items" : {
"required" : [ "event_id", "origin_server_ts", "sender", "state_key" ],
"type" : "object",
"allOf" : [ {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
}
}
}
} ]
},
"summary" : {
"$ref" : "#/components/schemas/RoomSummary"
},
"timeline" : {
"title" : "Timeline",
"type" : "object",
"description" : "The timeline of messages and state changes in the\nroom.",
"allOf" : [ {
"type" : "object",
"properties" : {
"limited" : {
"type" : "boolean",
"description" : "True if the number of events returned was limited by the ``limit`` on the filter."
},
"prev_batch" : {
"type" : "string",
"description" : "A token that can be supplied to the ``from`` parameter of the rooms/{roomId}/messages endpoint."
}
},
"allOf" : [ {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "List of events.",
"items" : {
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}
}
}
} ]
} ]
},
"unread_notifications" : {
"$ref" : "#/components/schemas/Unread Notification Counts"
}
}
},
"Event" : {
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "The event that matched."
},
"StateEvent" : {
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The content of the event."
},
"state_key" : {
"type" : "string",
"description" : "The state_key of the state event. Defaults to an empty string."
},
"type" : {
"type" : "string",
"description" : "The type of event to send."
}
}
},
"Tag" : {
"type" : "object",
"properties" : {
"order" : {
"type" : "number",
"description" : "A number in a range ``[0,1]`` describing a relative\nposition of the room under the given tag.",
"format" : "float"
}
}
},
"body" : {
"required" : [ "three_pid_creds" ],
"type" : "object",
"properties" : {
"three_pid_creds" : {
"$ref" : "#/components/schemas/ThreePidCredentials"
}
},
"example" : {
"three_pid_creds" : {
"client_secret" : "d0n'tT3ll",
"id_access_token" : "abc123_OpaqueString",
"id_server" : "matrix.org",
"sid" : "abc123987"
}
}
},
"ThreePidCredentials" : {
"required" : [ "client_secret", "id_access_token", "id_server", "sid" ],
"type" : "object",
"properties" : {
"client_secret" : {
"type" : "string",
"description" : "The client secret used in the session with the identity server."
},
"id_access_token" : {
"type" : "string",
"description" : "An access token previously registered with the identity server. Servers\ncan treat this as optional to distinguish between r0.5-compatible clients\nand this specification version."
},
"id_server" : {
"type" : "string",
"description" : "The identity server to use."
},
"sid" : {
"type" : "string",
"description" : "The session identifier given by the identity server."
}
},
"description" : "The third party credentials to associate with the account."
},
"Unread Notification Counts" : {
"type" : "object",
"properties" : {
"highlight_count" : {
"title" : "Highlighted notification count",
"type" : "integer",
"description" : "The number of unread notifications for this room with the highlight flag set"
},
"notification_count" : {
"title" : "Total notification count",
"type" : "integer",
"description" : "The total number of unread notifications for this room"
}
},
"description" : "Counts of unread notifications for this room. See the\n`Receiving notifications section <#receiving-notifications>`_\nfor more information on how these are calculated."
},
"Result" : {
"type" : "object",
"properties" : {
"context" : {
"$ref" : "#/components/schemas/Event Context"
},
"rank" : {
"type" : "number",
"description" : "A number that describes how closely this result matches the search. Higher is closer."
},
"result" : {
"$ref" : "#/components/schemas/Event"
}
},
"description" : "The result object."
},
"User identifier" : {
"required" : [ "type" ],
"type" : "object",
"properties" : {
"type" : {
"type" : "string",
"description" : "The type of identification. See `Identifier types`_ for supported values and additional property descriptions."
}
},
"description" : "Identification information for the user."
},
"body_12" : {
"type" : "object",
"properties" : {
"device_keys" : {
"description" : "Identity keys for the device. May be absent if no new\nidentity keys are required.",
"allOf" : [ {
"title" : "DeviceKeys",
"required" : [ "algorithms", "device_id", "keys", "signatures", "user_id" ],
"type" : "object",
"properties" : {
"algorithms" : {
"type" : "array",
"description" : "The encryption algorithms supported by this device.",
"example" : [ "m.olm.v1.curve25519-aes-sha2", "m.megolm.v1.aes-sha2" ],
"items" : {
"type" : "string"
}
},
"device_id" : {
"type" : "string",
"description" : "The ID of the device these keys belong to. Must match the device ID used\nwhen logging in.",
"example" : "JLAFKJWSCS"
},
"keys" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
},
"description" : "Public identity keys. The names of the properties should be in the\nformat ``<algorithm>:<device_id>``. The keys themselves should be\nencoded as specified by the key algorithm.",
"example" : {
"curve25519:JLAFKJWSCS" : "3C5BFWi2Y8MaVvjM8M22DBmh24PmgR0nPvJOIArzgyI",
"ed25519:JLAFKJWSCS" : "lEuiRJBit0IG6nUf5pUzWTUEsRVVe/HJkoKuEww9ULI"
}
},
"signatures" : {
"title" : "Signatures",
"type" : "object",
"additionalProperties" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
},
"description" : "Signatures for the device key object. A map from user ID, to a map from\n``<algorithm>:<device_id>`` to the signature.\n\nThe signature is calculated using the process described at `Signing\nJSON`_.",
"example" : {
"@alice:example.com" : {
"ed25519:JLAFKJWSCS" : "dSO80A01XiigH3uBiDVx/EjzaoycHcjq9lfQX0uWsqxl2giMIiSPR8a4d291W1ihKJL/a+myXS367WT6NAIcBA"
}
}
},
"user_id" : {
"type" : "string",
"description" : "The ID of the user the device belongs to. Must match the user ID used\nwhen logging in.",
"example" : "@alice:example.com"
}
},
"description" : "Device identity keys"
} ]
},
"one_time_keys" : {
"type" : "object",
"additionalProperties" : {
"type" : "object"
},
"description" : "One-time public keys for \"pre-key\" messages. The names of\nthe properties should be in the format\n``<algorithm>:<key_id>``. The format of the key is determined\nby the `key algorithm <#key-algorithms>`_.\n\nMay be absent if no new one-time keys are required.",
"example" : {
"curve25519:AAAAAQ" : "/qyvZvwjiTxGdGU0RCguDCLeR+nmsb3FfNG3/Ve4vU8",
"signed_curve25519:AAAAHQ" : {
"key" : "j3fR3HemM16M7CWhoI4Sk5ZsdmdfQHsKL1xuSft6MSw",
"signatures" : {
"@alice:example.com" : {
"ed25519:JLAFKJWSCS" : "IQeCEPb9HFk217cU9kw9EOiusC6kMIkoIRnbnfOh5Oc63S1ghgyjShBGpu34blQomoalCyXWyhaaT3MrLZYQAA"
}
}
},
"signed_curve25519:AAAAHg" : {
"key" : "zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs",
"signatures" : {
"@alice:example.com" : {
"ed25519:JLAFKJWSCS" : "FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw"
}
}
}
}
}
}
},
"body_13" : {
"required" : [ "type" ],
"type" : "object",
"properties" : {
"address" : {
"type" : "string",
"description" : "Third party identifier for the user. Deprecated in favour of ``identifier``."
},
"device_id" : {
"type" : "string",
"description" : "ID of the client device. If this does not correspond to a\nknown client device, a new device will be created. The server\nwill auto-generate a device_id if this is not specified."
},
"identifier" : {
"$ref" : "#/components/schemas/User identifier"
},
"initial_device_display_name" : {
"type" : "string",
"description" : "A display name to assign to the newly-created device. Ignored\nif ``device_id`` corresponds to a known device."
},
"medium" : {
"type" : "string",
"description" : "When logging in using a third party identifier, the medium of the identifier. Must be 'email'. Deprecated in favour of ``identifier``."
},
"password" : {
"type" : "string",
"description" : "Required when ``type`` is ``m.login.password``. The user's\npassword."
},
"token" : {
"type" : "string",
"description" : "Required when ``type`` is ``m.login.token``. Part of `Token-based`_ login."
},
"type" : {
"type" : "string",
"description" : "The login type being used.",
"enum" : [ "m.login.password", "m.login.token" ]
},
"user" : {
"type" : "string",
"description" : "The fully qualified user ID or just local part of the user ID, to log in. Deprecated in favour of ``identifier``."
}
},
"example" : {
"identifier" : {
"type" : "m.id.user",
"user" : "cheeky_monkey"
},
"initial_device_display_name" : "Jungle Phone",
"password" : "ilovebananas",
"type" : "m.login.password"
}
},
"body_10" : {
"required" : [ "one_time_keys" ],
"type" : "object",
"properties" : {
"one_time_keys" : {
"type" : "object",
"additionalProperties" : {
"type" : "object",
"additionalProperties" : {
"type" : "string",
"description" : "algorithm",
"example" : "signed_curve25519"
}
},
"description" : "The keys to be claimed. A map from user ID, to a map from\ndevice ID to algorithm name.",
"example" : {
"@alice:example.com" : {
"JLAFKJWSCS" : "signed_curve25519"
}
}
},
"timeout" : {
"type" : "integer",
"description" : "The time (in milliseconds) to wait when downloading keys from\nremote servers. 10 seconds is the recommended default.",
"example" : 10000
}
}
},
"body_11" : {
"required" : [ "device_keys" ],
"type" : "object",
"properties" : {
"device_keys" : {
"type" : "object",
"additionalProperties" : {
"type" : "array",
"items" : {
"type" : "string",
"description" : "device ID"
}
},
"description" : "The keys to be downloaded. A map from user ID, to a list of\ndevice IDs, or to an empty list to indicate all devices for the\ncorresponding user.",
"example" : {
"@alice:example.com" : [ ]
}
},
"timeout" : {
"type" : "integer",
"description" : "The time (in milliseconds) to wait when downloading keys from\nremote servers. 10 seconds is the recommended default.",
"example" : 10000
},
"token" : {
"type" : "string",
"description" : "If the client is fetching keys as a result of a device update received\nin a sync request, this should be the 'since' token of that sync request,\nor any later sync token. This allows the server to ensure its response\ncontains the keys advertised by the notification in that sync."
}
}
},
"inline_response_200_9" : {
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The room ID for this room alias."
},
"servers" : {
"type" : "array",
"description" : "A list of servers that are aware of this room alias.",
"items" : {
"type" : "string",
"description" : "A server which is aware of this room alias."
}
}
}
},
"body_18" : {
"required" : [ "app_display_name", "app_id", "data", "device_display_name", "kind", "lang", "pushkey" ],
"type" : "object",
"properties" : {
"app_display_name" : {
"type" : "string",
"description" : "A string that will allow the user to identify what application\nowns this pusher."
},
"app_id" : {
"type" : "string",
"description" : "This is a reverse-DNS style identifier for the application.\nIt is recommended that this end with the platform, such that\ndifferent platform versions get different app identifiers.\nMax length, 64 chars.\n\nIf the ``kind`` is ``\"email\"``, this is ``\"m.email\"``."
},
"append" : {
"type" : "boolean",
"description" : "If true, the homeserver should add another pusher with the\ngiven pushkey and App ID in addition to any others with\ndifferent user IDs. Otherwise, the homeserver must remove any\nother pushers with the same App ID and pushkey for different\nusers. The default is ``false``."
},
"data" : {
"$ref" : "#/components/schemas/PusherData"
},
"device_display_name" : {
"type" : "string",
"description" : "A string that will allow the user to identify what device owns\nthis pusher."
},
"kind" : {
"type" : "string",
"description" : "The kind of pusher to configure. ``\"http\"`` makes a pusher that\nsends HTTP pokes. ``\"email\"`` makes a pusher that emails the\nuser with unread notifications. ``null`` deletes the pusher."
},
"lang" : {
"type" : "string",
"description" : "The preferred language for receiving notifications (e.g. 'en'\nor 'en-US')."
},
"profile_tag" : {
"type" : "string",
"description" : "This string determines which set of device specific rules this\npusher executes."
},
"pushkey" : {
"type" : "string",
"description" : "This is a unique identifier for this pusher. The value you\nshould use for this is the routing or destination address\ninformation for the notification, for example, the APNS token\nfor APNS or the Registration ID for GCM. If your notification\nclient has no such concept, use any unique identifier.\nMax length, 512 bytes.\n\nIf the ``kind`` is ``\"email\"``, this is the email address to\nsend notifications to."
}
},
"example" : {
"app_display_name" : "Mat Rix",
"app_id" : "com.example.app.ios",
"append" : false,
"data" : {
"format" : "event_id_only",
"url" : "https://push-gateway.location.here/_matrix/push/v1/notify"
},
"device_display_name" : "iPhone 9",
"kind" : "http",
"lang" : "en",
"profile_tag" : "xxyyzz",
"pushkey" : "APA91bHPRgkF3JUikC4ENAHEeMrd41Zxv3hVZjC9KtT8OvPVGJ-hQMRKRrZuJAEcl7B338qju59zJMjw2DELjzEvxwYv7hH5Ynpc1ODQ0aT4U4OFEeco8ohsN5PjL1iC2dNtk2BAokeMCg2ZXKqpc8FXKmhX94kIxQ"
}
},
"body_19" : {
"required" : [ "actions" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The action(s) to perform when the conditions for this rule are met.",
"items" : {
"type" : "string",
"enum" : [ "notify", "dont_notify", "coalesce", "set_tweak" ]
}
},
"conditions" : {
"type" : "array",
"description" : "The conditions that must hold true for an event in order for a\nrule to be applied to an event. A rule with no conditions\nalways matches. Only applicable to ``underride`` and ``override`` rules.",
"items" : {
"type" : "object",
"allOf" : [ {
"title" : "PushCondition",
"required" : [ "kind" ],
"type" : "object",
"properties" : {
"is" : {
"type" : "string",
"description" : "Required for ``room_member_count`` conditions. A decimal integer\noptionally prefixed by one of, ==, <, >, >= or <=. A prefix of < matches\nrooms where the member count is strictly less than the given number and\nso forth. If no prefix is present, this parameter defaults to ==."
},
"key" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The dot-separated field of the\nevent to match.\n\nRequired for ``sender_notification_permission`` conditions. The field in\nthe power level event the user needs a minimum power level for. Fields\nmust be specified under the ``notifications`` property in the power level\nevent's ``content``.",
"x-example" : "content.body"
},
"kind" : {
"type" : "string",
"description" : "The kind of condition to apply. See `conditions <#conditions>`_ for\nmore information on the allowed kinds and how they work."
},
"pattern" : {
"type" : "string",
"description" : "Required for ``event_match`` conditions. The glob-style pattern to\nmatch against. Patterns with no special glob characters should be\ntreated as having asterisks prepended and appended when testing the\ncondition."
}
}
} ]
}
},
"pattern" : {
"type" : "string",
"description" : "Only applicable to ``content`` rules. The glob-style pattern to match against."
}
},
"example" : {
"actions" : [ "notify" ],
"pattern" : "cake*lie"
}
},
"inline_response_200_5" : {
"type" : "object",
"properties" : {
"devices" : {
"type" : "object",
"additionalProperties" : {
"$ref" : "#/components/schemas/DeviceInfo"
},
"description" : "Each key is an identifier for one of the user's devices."
},
"user_id" : {
"type" : "string",
"description" : "The Matrix user ID of the user."
}
}
},
"body_16" : {
"type" : "object",
"properties" : {
"displayname" : {
"type" : "string",
"description" : "The new display name for this user."
}
},
"example" : {
"displayname" : "Alice Margatroid"
}
},
"inline_response_200_6" : {
"required" : [ "capabilities" ],
"type" : "object",
"properties" : {
"capabilities" : {
"$ref" : "#/components/schemas/Capabilities"
}
}
},
"body_17" : {
"type" : "object",
"properties" : {
"filter" : {
"$ref" : "#/components/schemas/Filter"
},
"include_all_networks" : {
"type" : "boolean",
"description" : "Whether or not to include all known networks/protocols from\napplication services on the homeserver. Defaults to false.",
"example" : false
},
"limit" : {
"type" : "integer",
"description" : "Limit the number of results returned."
},
"since" : {
"type" : "string",
"description" : "A pagination token from a previous request, allowing clients\nto get the next (or previous) batch of rooms. The direction\nof pagination is specified solely by which token is supplied,\nrather than via an explicit flag."
},
"third_party_instance_id" : {
"type" : "string",
"description" : "The specific third party network/protocol to request from the\nhomeserver. Can only be used if ``include_all_networks`` is false.",
"example" : "irc"
}
},
"example" : {
"filter" : {
"generic_search_term" : "foo"
},
"include_all_networks" : false,
"limit" : 10,
"third_party_instance_id" : "irc"
}
},
"inline_response_200_7" : {
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The created room's ID."
}
},
"description" : "Information about the newly created room."
},
"body_14" : {
"required" : [ "presence" ],
"type" : "object",
"properties" : {
"presence" : {
"type" : "string",
"description" : "The new presence state.",
"enum" : [ "online", "offline", "unavailable" ]
},
"status_msg" : {
"type" : "string",
"description" : "The status message to attach to this state."
}
},
"example" : {
"presence" : "online",
"status_msg" : "I am here."
}
},
"inline_response_200_8" : {
"type" : "object",
"properties" : {
"devices" : {
"type" : "array",
"description" : "A list of all registered devices for this user.",
"items" : {
"type" : "object",
"allOf" : [ {
"title" : "Device",
"required" : [ "device_id" ],
"type" : "object",
"properties" : {
"device_id" : {
"type" : "string",
"description" : "Identifier of this device.",
"example" : "QBUAZIFURK"
},
"display_name" : {
"type" : "string",
"description" : "Display name set by the user for this device. Absent if no name has been\nset.",
"example" : "android"
},
"last_seen_ip" : {
"type" : "string",
"description" : "The IP address where this device was last seen. (May be a few minutes out\nof date, for efficiency reasons).",
"example" : "1.2.3.4"
},
"last_seen_ts" : {
"type" : "integer",
"description" : "The timestamp (in milliseconds since the unix epoch) when this devices\nwas last seen. (May be a few minutes out of date, for efficiency\nreasons).",
"format" : "int64",
"example" : 1474491775024
}
},
"description" : "A client device"
} ]
}
}
}
},
"body_15" : {
"type" : "object",
"properties" : {
"avatar_url" : {
"type" : "string",
"description" : "The new avatar URL for this user."
}
},
"example" : {
"avatar_url" : "mxc://matrix.org/wefh34uihSDRGhw34"
}
},
"Groupings" : {
"type" : "object",
"properties" : {
"group_by" : {
"title" : "Groups",
"type" : "array",
"description" : "List of groups to request.",
"items" : {
"$ref" : "#/components/schemas/Group"
}
}
},
"description" : "Requests that the server partitions the result set\nbased on the provided list of keys."
},
"Result Categories" : {
"type" : "object",
"properties" : {
"room_events" : {
"$ref" : "#/components/schemas/Result Room Events"
}
},
"description" : "Describes which categories to search in and their criteria."
},
"Authentication response_flows" : {
"required" : [ "stages" ],
"type" : "object",
"properties" : {
"stages" : {
"type" : "array",
"description" : "The login type of each of the stages required to complete this\nauthentication flow",
"items" : {
"type" : "string",
"example" : "example.type.foo"
}
}
}
},
"inline_response_200_1" : {
"required" : [ "id_server_unbind_result" ],
"type" : "object",
"properties" : {
"id_server_unbind_result" : {
"type" : "string",
"description" : "An indicator as to whether or not the homeserver was able to unbind\nthe 3PID from the identity server. ``success`` indicates that the\nindentity server has unbound the identifier whereas ``no-support``\nindicates that the identity server refuses to support the request\nor the homeserver was not able to determine an identity server to\nunbind from.",
"example" : "success",
"enum" : [ "no-support", "success" ]
}
}
},
"body_23" : {
"required" : [ "user_id" ],
"type" : "object",
"properties" : {
"reason" : {
"type" : "string",
"description" : "The reason the user has been banned. This will be supplied as the ``reason`` on the target's updated `m.room.member`_ event."
},
"user_id" : {
"type" : "string",
"description" : "The fully qualified user ID of the user being banned."
}
},
"example" : {
"reason" : "Telling unfunny jokes",
"user_id" : "@cheeky_monkey:matrix.org"
}
},
"inline_response_200_2" : {
"required" : [ "id_server_unbind_result" ],
"type" : "object",
"properties" : {
"id_server_unbind_result" : {
"type" : "string",
"description" : "An indicator as to whether or not the identity server was able to unbind\nthe 3PID. ``success`` indicates that the identity server has unbound the\nidentifier whereas ``no-support`` indicates that the identity server\nrefuses to support the request or the homeserver was not able to determine\nan identity server to unbind from.",
"example" : "success",
"enum" : [ "no-support", "success" ]
}
}
},
"body_24" : {
"required" : [ "address", "id_access_token", "id_server", "medium" ],
"type" : "object",
"properties" : {
"address" : {
"type" : "string",
"description" : "The invitee's third party identifier."
},
"id_access_token" : {
"type" : "string",
"description" : "An access token previously registered with the identity server. Servers\ncan treat this as optional to distinguish between r0.5-compatible clients\nand this specification version."
},
"id_server" : {
"type" : "string",
"description" : "The hostname+port of the identity server which should be used for third party identifier lookups."
},
"medium" : {
"type" : "string",
"description" : "The kind of address being passed in the address field, for example ``email``."
}
},
"example" : {
"address" : "cheeky@monkey.com",
"id_access_token" : "abc123_OpaqueString",
"id_server" : "matrix.org",
"medium" : "email"
}
},
"inline_response_200_3" : {
"required" : [ "id_server_unbind_result" ],
"type" : "object",
"properties" : {
"id_server_unbind_result" : {
"type" : "string",
"description" : "An indicator as to whether or not the homeserver was able to unbind\nthe user's 3PIDs from the identity server(s). ``success`` indicates\nthat all identifiers have been unbound from the identity server while\n``no-support`` indicates that one or more identifiers failed to unbind\ndue to the identity server refusing the request or the homeserver\nbeing unable to determine an identity server to unbind from. This\nmust be ``success`` if the homeserver has no identifiers to unbind\nfor the user.",
"example" : "success",
"enum" : [ "success", "no-support" ]
}
}
},
"body_21" : {
"required" : [ "enabled" ],
"type" : "object",
"properties" : {
"enabled" : {
"type" : "boolean",
"description" : "Whether the push rule is enabled or not."
}
},
"example" : {
"enabled" : true
}
},
"inline_response_200_4" : {
"required" : [ "user_id" ],
"type" : "object",
"properties" : {
"user_id" : {
"type" : "string",
"description" : "The user id that owns the access token."
}
}
},
"body_22" : {
"type" : "object",
"properties" : {
"auth" : {
"$ref" : "#/components/schemas/Authentication Data_2"
},
"device_id" : {
"type" : "string",
"description" : "ID of the client device. If this does not correspond to a\nknown client device, a new device will be created. The server\nwill auto-generate a device_id if this is not specified.",
"example" : "GHTYAJCE"
},
"inhibit_login" : {
"type" : "boolean",
"description" : "If true, an ``access_token`` and ``device_id`` should not be\nreturned from this call, therefore preventing an automatic\nlogin. Defaults to false.",
"example" : false
},
"initial_device_display_name" : {
"type" : "string",
"description" : "A display name to assign to the newly-created device. Ignored\nif ``device_id`` corresponds to a known device.",
"example" : "Jungle Phone"
},
"password" : {
"type" : "string",
"description" : "The desired password for the account.",
"example" : "ilovebananas"
},
"username" : {
"type" : "string",
"description" : "The basis for the localpart of the desired Matrix ID. If omitted,\nthe homeserver MUST generate a Matrix ID local part.",
"example" : "cheeky_monkey"
}
}
},
"body_20" : {
"required" : [ "actions" ],
"type" : "object",
"properties" : {
"actions" : {
"type" : "array",
"description" : "The action(s) to perform for this rule.",
"items" : {
"type" : "string",
"enum" : [ "notify", "dont_notify", "coalesce", "set_tweak" ]
}
}
},
"example" : {
"actions" : [ "notify" ]
}
},
"inline_response_200_11" : {
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
},
"inline_response_200_10" : {
"type" : "object",
"properties" : {
"chunk" : {
"type" : "array",
"description" : "An array of events.",
"items" : {
"title" : "Event",
"type" : "object",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
}
},
"end" : {
"type" : "string",
"description" : "A token which correlates to the last value in ``chunk``. This\ntoken should be used in the next request to ``/events``."
},
"start" : {
"type" : "string",
"description" : "A token which correlates to the first value in ``chunk``. This\nis usually the same token supplied to ``from=``."
}
}
},
"inline_response_200_13" : {
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The joined room ID."
}
}
},
"inline_response_200_12" : {
"required" : [ "end", "presence", "rooms" ],
"type" : "object",
"properties" : {
"account_data" : {
"type" : "array",
"description" : "The global private data created by this user.",
"items" : {
"title" : "Event",
"type" : "object",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
}
},
"end" : {
"type" : "string",
"description" : "A token which correlates to the last value in ``chunk``. This\ntoken should be used with the ``/events`` API to listen for new\nevents."
},
"presence" : {
"type" : "array",
"description" : "A list of presence events.",
"items" : {
"title" : "Event",
"type" : "object",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
}
},
"rooms" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/RoomInfo_1"
}
}
}
},
"Include Event Context" : {
"type" : "object",
"properties" : {
"after_limit" : {
"title" : "After limit",
"type" : "integer",
"description" : "How many events after the result are\nreturned. By default, this is ``5``."
},
"before_limit" : {
"title" : "Before limit",
"type" : "integer",
"description" : "How many events before the result are\nreturned. By default, this is ``5``."
},
"include_profile" : {
"title" : "Return profile information",
"type" : "boolean",
"description" : "Requests that the server returns the\nhistoric profile information for the users\nthat sent the events that were returned.\nBy default, this is ``false``."
}
},
"description" : "Configures whether any context for the events\nreturned are included in the response."
},
"User" : {
"required" : [ "user_id" ],
"type" : "object",
"properties" : {
"avatar_url" : {
"type" : "string",
"description" : "The avatar url, as an MXC, if one exists.",
"example" : "mxc://bar.com/foo"
},
"display_name" : {
"type" : "string",
"description" : "The display name of the user, if one exists.",
"example" : "Foo"
},
"user_id" : {
"type" : "string",
"description" : "The user's matrix user ID.",
"example" : "@foo:bar.com"
}
}
},
"inline_response_200_19" : {
"type" : "object",
"properties" : {
"flows" : {
"type" : "array",
"description" : "The homeserver's supported login types",
"items" : {
"$ref" : "#/components/schemas/LoginFlow"
}
}
}
},
"InviteState" : {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "The StrippedState events that form the invite state.",
"items" : {
"$ref" : "#/components/schemas/StrippedState"
}
}
},
"description" : "The state of a room that the user has been invited\nto. These state events may only have the ``sender``,\n``type``, ``state_key`` and ``content`` keys\npresent. These events do not replace any state that\nthe client already has for the room, for example if\nthe client has archived the room. Instead the\nclient should keep two separate copies of the\nstate: the one from the ``invite_state`` and one\nfrom the archived ``state``. If the client joins\nthe room then the current state will be given as a\ndelta against the archived ``state`` not the\n``invite_state``."
},
"inline_response_200_18" : {
"required" : [ "one_time_key_counts" ],
"type" : "object",
"properties" : {
"one_time_key_counts" : {
"type" : "object",
"additionalProperties" : {
"type" : "integer"
},
"description" : "For each key algorithm, the number of unclaimed one-time keys\nof that type currently held on the server for this device.",
"example" : {
"curve25519" : 10,
"signed_curve25519" : 20
}
}
}
},
"RoomInfo" : {
"title" : "RoomInfo",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"account_data" : {
"type" : "array",
"description" : "The private data that this user has attached to this room.",
"items" : {
"title" : "Event",
"type" : "object",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
}
},
"membership" : {
"type" : "string",
"description" : "The user's membership state in this room.",
"enum" : [ "invite", "join", "leave", "ban" ]
},
"messages" : {
"$ref" : "#/components/schemas/PaginationChunk"
},
"room_id" : {
"type" : "string",
"description" : "The ID of this room."
},
"state" : {
"type" : "array",
"description" : "If the user is a member of the room this will be the\ncurrent state of the room as a list of events. If the\nuser has left the room this will be the state of the\nroom when they left it.",
"items" : {
"title" : "StateEvent",
"type" : "object",
"allOf" : [ {
"title" : "State Event",
"type" : "object",
"description" : "State Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}, {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
} ]
}
},
"visibility" : {
"type" : "string",
"description" : "Whether this room is visible to the ``/publicRooms`` API\nor not.\"",
"enum" : [ "private", "public" ]
}
}
},
"ChangePasswordCapability" : {
"required" : [ "enabled" ],
"type" : "object",
"properties" : {
"enabled" : {
"type" : "boolean",
"description" : "True if the user can change their password, false otherwise.",
"example" : false
}
},
"description" : "Capability to indicate if the user can change their password."
},
"inline_response_200_15" : {
"type" : "object",
"properties" : {
"changed" : {
"type" : "array",
"description" : "The Matrix User IDs of all users who updated their device\nidentity keys.",
"example" : [ "@alice:example.com", "@bob:example.org" ],
"items" : {
"type" : "string"
}
},
"left" : {
"type" : "array",
"description" : "The Matrix User IDs of all users who may have left all\nthe end-to-end encrypted rooms they previously shared\nwith the user.",
"example" : [ "@clara:example.com", "@doug:example.org" ],
"items" : {
"type" : "string"
}
}
}
},
"inline_response_200_14" : {
"required" : [ "joined_rooms" ],
"type" : "object",
"properties" : {
"joined_rooms" : {
"type" : "array",
"description" : "The ID of each room in which the user has ``joined`` membership.",
"items" : {
"type" : "string"
}
}
}
},
"inline_response_200_17" : {
"type" : "object",
"properties" : {
"device_keys" : {
"type" : "object",
"additionalProperties" : {
"type" : "object",
"additionalProperties" : {
"properties" : {
"unsigned" : {
"title" : "UnsignedDeviceInfo",
"type" : "object",
"properties" : {
"device_display_name" : {
"type" : "string",
"description" : "The display name which the user set on the device."
}
},
"description" : "Additional data added to the device key information\nby intermediate servers, and not covered by the\nsignatures."
}
},
"allOf" : [ {
"title" : "DeviceKeys",
"required" : [ "algorithms", "device_id", "keys", "signatures", "user_id" ],
"type" : "object",
"properties" : {
"algorithms" : {
"type" : "array",
"description" : "The encryption algorithms supported by this device.",
"example" : [ "m.olm.v1.curve25519-aes-sha2", "m.megolm.v1.aes-sha2" ],
"items" : {
"type" : "string"
}
},
"device_id" : {
"type" : "string",
"description" : "The ID of the device these keys belong to. Must match the device ID used\nwhen logging in.",
"example" : "JLAFKJWSCS"
},
"keys" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
},
"description" : "Public identity keys. The names of the properties should be in the\nformat ``<algorithm>:<device_id>``. The keys themselves should be\nencoded as specified by the key algorithm.",
"example" : {
"curve25519:JLAFKJWSCS" : "3C5BFWi2Y8MaVvjM8M22DBmh24PmgR0nPvJOIArzgyI",
"ed25519:JLAFKJWSCS" : "lEuiRJBit0IG6nUf5pUzWTUEsRVVe/HJkoKuEww9ULI"
}
},
"signatures" : {
"title" : "Signatures",
"type" : "object",
"additionalProperties" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
},
"description" : "Signatures for the device key object. A map from user ID, to a map from\n``<algorithm>:<device_id>`` to the signature.\n\nThe signature is calculated using the process described at `Signing\nJSON`_.",
"example" : {
"@alice:example.com" : {
"ed25519:JLAFKJWSCS" : "dSO80A01XiigH3uBiDVx/EjzaoycHcjq9lfQX0uWsqxl2giMIiSPR8a4d291W1ihKJL/a+myXS367WT6NAIcBA"
}
}
},
"user_id" : {
"type" : "string",
"description" : "The ID of the user the device belongs to. Must match the user ID used\nwhen logging in.",
"example" : "@alice:example.com"
}
},
"description" : "Device identity keys"
} ]
}
},
"description" : "Information on the queried devices. A map from user ID, to a\nmap from device ID to device information. For each device,\nthe information returned will be the same as uploaded via\n``/keys/upload``, with the addition of an ``unsigned``\nproperty.",
"example" : {
"@alice:example.com" : {
"JLAFKJWSCS" : {
"algorithms" : [ "m.olm.v1.curve25519-aes-sha2", "m.megolm.v1.aes-sha2" ],
"device_id" : "JLAFKJWSCS",
"keys" : {
"curve25519:JLAFKJWSCS" : "3C5BFWi2Y8MaVvjM8M22DBmh24PmgR0nPvJOIArzgyI",
"ed25519:JLAFKJWSCS" : "lEuiRJBit0IG6nUf5pUzWTUEsRVVe/HJkoKuEww9ULI"
},
"signatures" : {
"@alice:example.com" : {
"ed25519:JLAFKJWSCS" : "dSO80A01XiigH3uBiDVx/EjzaoycHcjq9lfQX0uWsqxl2giMIiSPR8a4d291W1ihKJL/a+myXS367WT6NAIcBA"
}
},
"unsigned" : {
"device_display_name" : "Alice's mobile phone"
},
"user_id" : "@alice:example.com"
}
}
}
},
"failures" : {
"type" : "object",
"additionalProperties" : {
"type" : "object"
},
"description" : "If any remote homeservers could not be reached, they are\nrecorded here. The names of the properties are the names of\nthe unreachable servers.\n\nIf the homeserver could be reached, but the user or device\nwas unknown, no failure is recorded. Instead, the corresponding\nuser or device is missing from the ``device_keys`` result.",
"example" : { }
}
}
},
"inline_response_200_16" : {
"required" : [ "one_time_keys" ],
"type" : "object",
"properties" : {
"failures" : {
"type" : "object",
"additionalProperties" : {
"type" : "object"
},
"description" : "If any remote homeservers could not be reached, they are\nrecorded here. The names of the properties are the names of\nthe unreachable servers.\n\nIf the homeserver could be reached, but the user or device\nwas unknown, no failure is recorded. Instead, the corresponding\nuser or device is missing from the ``one_time_keys`` result.",
"example" : { }
},
"one_time_keys" : {
"type" : "object",
"additionalProperties" : {
"type" : "object",
"additionalProperties" : {
"type" : "object"
}
},
"description" : "One-time keys for the queried devices. A map from user ID, to a\nmap from devices to a map from ``<algorithm>:<key_id>`` to the key object.\n\nSee the `key algorithms <#key-algorithms>`_ section for information\non the Key Object format.",
"example" : {
"@alice:example.com" : {
"JLAFKJWSCS" : {
"signed_curve25519:AAAAHg" : {
"key" : "zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs",
"signatures" : {
"@alice:example.com" : {
"ed25519:JLAFKJWSCS" : "FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw"
}
}
}
}
}
}
}
}
},
"inline_response_200" : {
"type" : "object",
"properties" : {
"threepids" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/Third party identifier"
}
}
}
},
"PaginationChunk" : {
"required" : [ "chunk", "end", "start" ],
"type" : "object",
"properties" : {
"chunk" : {
"type" : "array",
"description" : "If the user is a member of the room this will be a\nlist of the most recent messages for this room. If\nthe user has left the room this will be the\nmessages that preceeded them leaving. This array\nwill consist of at most ``limit`` elements.",
"items" : {
"title" : "RoomEvent",
"type" : "object",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "room_id" ],
"type" : "object",
"properties" : {
"room_id" : {
"type" : "string",
"description" : "The ID of the room associated with this event. Will not be present on events\nthat arrive through ``/sync``, despite being required everywhere else."
}
},
"description" : "Room Events have the following fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
}
},
"end" : {
"type" : "string",
"description" : "A token which correlates to the last value in ``chunk``.\nUsed for pagination."
},
"start" : {
"type" : "string",
"description" : "A token which correlates to the first value in ``chunk``.\nUsed for pagination."
}
},
"description" : "The pagination chunk for this room."
},
"Invited Room" : {
"type" : "object",
"properties" : {
"invite_state" : {
"$ref" : "#/components/schemas/InviteState"
}
}
},
"LoginFlow" : {
"type" : "object",
"properties" : {
"type" : {
"type" : "string",
"description" : "The login type. This is supplied as the ``type`` when\nlogging in."
}
}
},
"PusherData_1" : {
"type" : "object",
"properties" : {
"format" : {
"type" : "string",
"description" : "The format to use when sending notifications to the Push\nGateway."
},
"url" : {
"type" : "string",
"description" : "Required if ``kind`` is ``http``. The URL to use to send\nnotifications to."
}
},
"description" : "A dictionary of information for the pusher implementation\nitself."
},
"Left Room" : {
"type" : "object",
"properties" : {
"account_data" : {
"title" : "Account Data",
"type" : "object",
"description" : "The private data that this user has attached to\nthis room.",
"allOf" : [ {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "List of events.",
"items" : {
"type" : "object",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
}
}
}
} ]
},
"state" : {
"title" : "State",
"type" : "object",
"description" : "The state updates for the room up to the start of the timeline.",
"allOf" : [ {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "List of events.",
"items" : {
"required" : [ "event_id", "origin_server_ts", "sender", "state_key" ],
"type" : "object",
"allOf" : [ {
"title" : "State Event",
"required" : [ "state_key" ],
"type" : "object",
"properties" : {
"prev_content" : {
"title" : "EventContent",
"type" : "object",
"description" : "Optional. The previous ``content`` for this event. If there is no previous content, this key will be missing."
},
"state_key" : {
"type" : "string",
"description" : "A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event.\nState 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."
}
},
"description" : "In addition to the Room Event fields, State Events have the following additional fields.",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
} ]
}
}
}
} ]
},
"timeline" : {
"title" : "Timeline",
"type" : "object",
"description" : "The timeline of messages and state changes in the\nroom up to the point when the user left.",
"allOf" : [ {
"type" : "object",
"properties" : {
"limited" : {
"type" : "boolean",
"description" : "True if the number of events returned was limited by the ``limit`` on the filter."
},
"prev_batch" : {
"type" : "string",
"description" : "A token that can be supplied to the ``from`` parameter of the rooms/{roomId}/messages endpoint."
}
},
"allOf" : [ {
"type" : "object",
"properties" : {
"events" : {
"type" : "array",
"description" : "List of events.",
"items" : {
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"allOf" : [ {
"title" : "Room Event",
"required" : [ "event_id", "origin_server_ts", "sender" ],
"type" : "object",
"properties" : {
"event_id" : {
"type" : "string",
"description" : "The globally unique event identifier."
},
"origin_server_ts" : {
"type" : "integer",
"description" : "Timestamp in milliseconds on originating homeserver when this event was sent.",
"format" : "int64"
},
"sender" : {
"type" : "string",
"description" : "Contains the fully-qualified ID of the user who sent this event."
},
"unsigned" : {
"title" : "UnsignedData",
"type" : "object",
"properties" : {
"age" : {
"type" : "integer",
"description" : "The time in milliseconds that has elapsed since the event was sent. This field is generated by the local homeserver, and may be incorrect if the local time on at least one of the two servers is out of sync, which can cause the age to either be negative or greater than it actually is."
},
"redacted_because" : {
"title" : "Event",
"type" : "object",
"description" : "Optional. The event that redacted this event, if any."
},
"transaction_id" : {
"type" : "string",
"description" : "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
}
},
"description" : "Contains optional extra information about the event."
}
},
"description" : "In addition to the Event fields, Room Events have the following additional fields.",
"allOf" : [ {
"title" : "Event",
"required" : [ "content", "type" ],
"type" : "object",
"properties" : {
"content" : {
"type" : "object",
"description" : "The fields in this object will vary depending on the type of event. When interacting with the REST API, this is the HTTP body."
},
"type" : {
"type" : "string",
"description" : "The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'"
}
},
"description" : "The basic set of fields all events must have."
} ]
} ]
}
}
}
} ]
} ]
}
}
},
"PublicRoomsChunk" : {
"required" : [ "guest_can_join", "num_joined_members", "room_id", "world_readable" ],
"type" : "object",
"properties" : {
"aliases" : {
"type" : "array",
"description" : "Aliases of the room. May be empty.",
"items" : {
"type" : "string"
}
},
"avatar_url" : {
"type" : "string",
"description" : "The URL for the room's avatar, if one is set."
},
"canonical_alias" : {
"type" : "string",
"description" : "The canonical alias of the room, if any."
},
"guest_can_join" : {
"type" : "boolean",
"description" : "Whether guest users may join the room and participate in it.\nIf they can, they will be subject to ordinary power level\nrules like any other user."
},
"name" : {
"type" : "string",
"description" : "The name of the room, if any."
},
"num_joined_members" : {
"type" : "integer",
"description" : "The number of members joined to the room."
},
"room_id" : {
"type" : "string",
"description" : "The ID of the room."
},
"topic" : {
"type" : "string",
"description" : "The topic of the room, if any."
},
"world_readable" : {
"type" : "boolean",
"description" : "Whether the room may be viewed by guest users without joining."
}
}
},
"Filter" : {
"type" : "object",
"properties" : {
"generic_search_term" : {
"type" : "string",
"description" : "A string to search for in the room metadata, e.g. name,\ntopic, canonical alias etc. (Optional)."
}
},
"description" : "Filter to apply to the results."
},
"Capabilities" : {
"type" : "object",
"properties" : {
"m.change_password" : {
"$ref" : "#/components/schemas/ChangePasswordCapability"
},
"m.room_versions" : {
"$ref" : "#/components/schemas/RoomVersionsCapability"
}
},
"description" : "The custom capabilities the server supports, using the\nJava package naming convention."
},
"Event Context" : {
"type" : "object",
"properties" : {
"end" : {
"title" : "End Token",
"type" : "string",
"description" : "Pagination token for the end of the chunk"
},
"events_after" : {
"title" : "Events After",
"type" : "array",
"description" : "Events just after the result.",
"items" : {
"$ref" : "#/components/schemas/RoomEvent"
}
},
"events_before" : {
"title" : "Events Before",
"type" : "array",
"description" : "Events just before the result.",
"items" : {
"$ref" : "#/components/schemas/RoomEvent"
}
},
"profile_info" : {
"title" : "Profile Information",
"type" : "object",
"additionalProperties" : {
"$ref" : "#/components/schemas/User Profile"
},
"description" : "The historic profile information of the\nusers that sent the events returned.\n\nThe ``string`` key is the user ID for which\nthe profile belongs to."
},
"start" : {
"title" : "Start Token",
"type" : "string",
"description" : "Pagination token for the start of the chunk"
}
},
"description" : "Context for result, if requested."
}
},
"requestBodies" : {
"delete3pidFromAccountBody" : {
"content" : {
"application/json" : {
"schema" : {
"required" : [ "address", "medium" ],
"type" : "object",
"properties" : {
"address" : {
"type" : "string",
"description" : "The third party address being removed.",
"example" : "example@example.org"
},
"id_server" : {
"type" : "string",
"description" : "The identity server to unbind from. If not provided, the homeserver\nMUST use the ``id_server`` the identifier was added through. If the\nhomeserver does not know the original ``id_server``, it MUST return\na ``id_server_unbind_result`` of ``no-support``.",
"example" : "example.org"
},
"medium" : {
"type" : "string",
"description" : "The medium of the third party identifier being removed.",
"example" : "email",
"enum" : [ "email", "msisdn" ]
}
}
}
}
}
},
"joinRoomThirdPartySigned" : {
"content" : {
"application/json" : {
"schema" : {
"type" : "object",
"properties" : {
"third_party_signed" : {
"title" : "Third Party Signed",
"required" : [ "mxid", "sender", "signatures", "token" ],
"type" : "object",
"properties" : {
"mxid" : {
"type" : "string",
"description" : "The Matrix ID of the invitee.",
"example" : "@bob:example.org"
},
"sender" : {
"type" : "string",
"description" : "The Matrix ID of the user who issued the invite.",
"example" : "@alice:example.org"
},
"signatures" : {
"title" : "Signatures",
"type" : "object",
"additionalProperties" : {
"type" : "object",
"additionalProperties" : {
"type" : "string"
}
},
"description" : "A signatures object containing a signature of the entire signed object.",
"example" : {
"example.org" : {
"ed25519:0" : "some9signature"
}
}
},
"token" : {
"type" : "string",
"description" : "The state key of the m.third_party_invite event.",
"example" : "random8nonce"
}
},
"description" : "A signature of an ``m.third_party_invite`` token to prove that this user\nowns a third party identity which has been invited to the room."
}
}
}
}
}
}
},
"securitySchemes" : {
"accessToken" : {
"type" : "apiKey",
"description" : "The access_token returned by a call to ``/login`` or ``/register``",
"name" : "access_token",
"in" : "query"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment