# Copyright 2019 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. openapi: 3.1.0 info: title: Matrix Client-Server Capabilities API version: 1.0.0 paths: /capabilities: get: summary: Gets information about the server's capabilities. description: |- Gets information about the server's supported feature set and other relevant capabilities. operationId: getCapabilities security: - accessTokenQuery: [] - accessTokenBearer: [] responses: "200": description: The capabilities of the server. content: application/json: schema: type: object required: - capabilities properties: capabilities: type: object title: Capabilities description: |- The custom capabilities the server supports, using the Java package naming convention. additionalProperties: description: |- Application-dependent keys using the [Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar). properties: m.change_password: $ref: '#/components/schemas/booleanCapability' description: Capability to indicate if the user can change their password. m.room_versions: type: object description: The room versions the server supports. title: RoomVersionsCapability properties: default: type: string description: The default room version the server is using for new rooms. example: "1" available: type: object description: A detailed description of the room versions the server supports. additionalProperties: type: string title: RoomVersionStability enum: - stable - unstable description: The stability of the room version. required: - default - available m.set_displayname: deprecated: true $ref: '#/components/schemas/booleanCapability' description: | **Deprecated:** Capability to indicate if the user can change their display name. Refer to `m.profile_fields` for extended profile management. For backwards compatibility, servers that directly or indirectly include the `displayname` profile field in the `m.profile_fields` capability MUST also set this capability accordingly. m.set_avatar_url: deprecated: true $ref: '#/components/schemas/booleanCapability' description: | **Deprecated:** Capability to indicate if the user can change their avatar. Refer to `m.profile_fields` for extended profile management. For backwards compatibility, servers that directly or indirectly include the `avatar_url` profile field in the `m.profile_fields` capability MUST also set this capability accordingly. m.3pid_changes: $ref: '#/components/schemas/booleanCapability' description: Capability to indicate if the user can change 3PID associations on their account. m.get_login_token: $ref: '#/components/schemas/booleanCapability' description: Capability to indicate if the user can generate tokens to log further clients into their account. m.profile_fields: x-addedInMatrixVersion: "1.16" type: object title: ProfileFieldsCapability description: Capability to indicate if the user can set or modify extended profile fields via [`PUT /_matrix/client/v3/profile/{userId}/{keyName}`](/client-server-api/#put_matrixclientv3profileuseridkeyname). If absent, clients SHOULD assume custom profile fields are supported, provided the homeserver advertises a specification version that includes `m.profile_fields` in the [`/versions`](/client-server-api/#get_matrixclientversions) response. properties: allowed: type: array description: | If present, a list of profile fields that clients are allowed to create, modify or delete, provided `enabled` is `true`; no other profile fields may be changed. If absent, clients may set all profile fields except those forbidden by the `disallowed` list, where present. items: type: string example: - "m.example_field" - "org.example.job_title" disallowed: type: array description: | This property has no meaning if `allowed` is also specified. Otherwise, if present, a list of profile fields that clients are _not_ allowed to create, modify or delete. Provided `enabled` is `true`, clients MAY assume that they can set any profile field which is not included in this list. items: type: string example: - "org.example.managed_field" enabled: type: boolean description: "`true` if the user can create, update or delete any profile fields, `false` otherwise." example: true required: - enabled examples: response: value: { "capabilities": { "m.change_password": { "enabled": false }, "m.room_versions": { "default": "1", "available": { "1": "stable", "2": "stable", "3": "unstable", "test-version": "unstable" } }, "com.example.custom.ratelimit": { "max_requests_per_hour": 600 } } } "429": description: This request was rate-limited. content: application/json: schema: $ref: definitions/errors/rate_limited.yaml tags: - Capabilities servers: - url: "{protocol}://{hostname}{basePath}" variables: protocol: enum: - http - https default: https hostname: default: localhost:8008 basePath: default: /_matrix/client/v3 components: securitySchemes: accessTokenQuery: $ref: definitions/security.yaml#/accessTokenQuery accessTokenBearer: $ref: definitions/security.yaml#/accessTokenBearer schemas: booleanCapability: type: object title: BooleanCapability properties: enabled: type: boolean description: True if the user can perform the action, false otherwise. example: false required: - enabled