Compare commits

...

16 commits

Author SHA1 Message Date
Tom Foster 729d50cd4a
Update data/api/client-server/profile.yaml
Co-authored-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-08-06 08:58:07 +01:00
Tom Foster 7c67865646
Update content/client-server-api/modules/guest_access.md
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:52:46 +01:00
Tom Foster eb8d9ec14e
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:51:14 +01:00
Tom Foster 187aeb07a3
Update data/api/client-server/capabilities.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:50:57 +01:00
Tom Foster 947cc30046
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:50:24 +01:00
Tom Foster 4bb5ae85ae
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:49:41 +01:00
Tom Foster 6b85e93d20
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:49:27 +01:00
Tom Foster ef266e87dd
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:49:16 +01:00
Tom Foster ec7fa46581
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:49:03 +01:00
Tom Foster 88697f7fd9
Update data/api/client-server/capabilities.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:48:11 +01:00
Tom Foster 6dba7990de
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:47:55 +01:00
Tom Foster 105ad39845
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:47:40 +01:00
Tom Foster e64320880b
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:47:25 +01:00
Tom Foster c2827c4083
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:47:12 +01:00
Tom Foster a10fea207a
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:46:59 +01:00
Tom Foster f44ccf4c03
Update data/api/client-server/profile.yaml
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-08-06 07:46:42 +01:00
3 changed files with 38 additions and 39 deletions

View file

@ -63,8 +63,8 @@ for sending events:
The following API endpoints are allowed to be accessed by guest accounts The following API endpoints are allowed to be accessed by guest accounts
for their own account maintenance: for their own account maintenance:
* [PUT /profile/{userId}/displayname](#put_matrixclientv3profileuseridkeyname) guests users may only modify their displayname in their profile * [PUT /profile/{userId}/displayname](#put_matrixclientv3profileuseridkeyname). Guest users may only modify their display name; other profile fields may not be changed.
* [DELETE /profile/{userId}/displayname](#delete_matrixclientv3profileuseridkeyname) guests users may only modify their displayname in their profile * {{% added-in v="1.16" %}} [DELETE /profile/{userId}/displayname](#delete_matrixclientv3profileuseridkeyname). Again, guest users may delete their display name but not other profile fields.
* [GET /devices](#get_matrixclientv3devices) * [GET /devices](#get_matrixclientv3devices)
* [GET /devices/{deviceId}](#get_matrixclientv3devicesdeviceid) * [GET /devices/{deviceId}](#get_matrixclientv3devicesdeviceid)
* [PUT /devices/{deviceId}](#put_matrixclientv3devicesdeviceid) * [PUT /devices/{deviceId}](#put_matrixclientv3devicesdeviceid)

View file

@ -112,9 +112,12 @@ paths:
properties: properties:
allowed: allowed:
type: array type: array
description: List of allowed additional custom profile field keys. A `*` can be used as a description: |
wildcard to match any sequence of characters. This list takes precedence over the If present, a list of profile fields that clients are allowed to create, modify or delete,
disallowed list if both are provided. 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: items:
type: string type: string
example: example:
@ -122,11 +125,12 @@ paths:
- "org.example.job_title" - "org.example.job_title"
disallowed: disallowed:
type: array type: array
description: If `enabled` is `true`, a list of profile fields that clients are _not_ allowed to description: |
create, modify or delete. Clients SHOULD assume all fields not in this list to be unmanaged This property has no meaning if `allowed` is also specified.
and available for their use.
Only one of `allowed` and `disallowed` is permitted at the same time. 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: items:
type: string type: string
example: example:

View file

@ -19,7 +19,7 @@ paths:
"/profile/{userId}/{keyName}": "/profile/{userId}/{keyName}":
put: put:
x-changedInMatrixVersion: x-changedInMatrixVersion:
"1.16": This endpoint now accepts a variable `keyName` parameter. "1.16": This endpoint now accepts a variable `keyName` parameter. Previously only `displayname` and `avatar_url` were accepted.
summary: Set a profile field for a user. summary: Set a profile field for a user.
description: |- description: |-
Set or update a profile field for a user. Must be authenticated with an Set or update a profile field for a user. Must be authenticated with an
@ -43,7 +43,7 @@ paths:
type: string type: string
- in: path - in: path
name: keyName name: keyName
description: The profile field key name to set. This MUST be either description: The name of the profile field to set. This MUST be either
`avatar_url`, `displayname`, or a custom field following the `avatar_url`, `displayname`, or a custom field following the
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar). [Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
required: true required: true
@ -61,12 +61,16 @@ paths:
schema: schema:
type: object type: object
minProperties: 1 minProperties: 1
description: The JSON object must include a property whose key description: |
matches the `keyName` specified in the URL. For `avatar_url`, An object which contains exactly one property. The key
the value must be an MXC URI string. For `displayname`, the value of that property MUST match the `keyName` specified in the URL.
must be a string. For custom keys, any JSON type is allowed -
servers may not validate these values, but clients should follow For `avatar_url`, the value MUST be an MXC URI string.
the format defined for that key.
For `displayname`, the value MUST be a string.
For custom keys, any JSON type is allowed. Servers MAY not validate
these values, but clients SHOULD follow the format defined for that key.
additionalProperties: true additionalProperties: true
example: { "displayname": "Alice Wonderland" } example: { "displayname": "Alice Wonderland" }
responses: responses:
@ -85,7 +89,7 @@ paths:
of the following error codes: of the following error codes:
- `M_BAD_JSON`: The provided value is not valid JSON. - `M_BAD_JSON`: The provided value is not valid JSON.
- `M_MISSING_PARAM`: The required `{keyName}` property is - `M_MISSING_PARAM`: The required `keyName` property is
missing from the request body. missing from the request body.
- `M_PROFILE_TOO_LARGE`: Storing the supplied value would - `M_PROFILE_TOO_LARGE`: Storing the supplied value would
make the profile exceed its maximum allowed size of 64 KiB. make the profile exceed its maximum allowed size of 64 KiB.
@ -133,7 +137,7 @@ paths:
- User data - User data
get: get:
x-changedInMatrixVersion: x-changedInMatrixVersion:
"1.16": This endpoint now accepts a variable `keyName` parameter. "1.16": This endpoint now accepts a variable `keyName` parameter. Previously only `displayname` and `avatar_url` were accepted.
summary: Get a profile field for a user. summary: Get a profile field for a user.
description: Get the value of a profile field for a user. description: Get the value of a profile field for a user.
operationId: getProfileField operationId: getProfileField
@ -147,9 +151,7 @@ paths:
type: string type: string
- in: path - in: path
name: keyName name: keyName
description: The profile field key name to retrieve. It must be either description: The name of the profile field to retrieve.
`avatar_url`, `displayname`, or a custom field following the
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
required: true required: true
example: "displayname" example: "displayname"
schema: schema:
@ -162,12 +164,9 @@ paths:
application/json: application/json:
schema: schema:
type: object type: object
description: If a value is stored for `keyName`, the JSON response description: |
includes a property whose key matches the `keyName` specified An object with one property, whose key matches the `keyName` specified
in the URL. For `avatar_url`, the value will be an MXC URI string. in the URL, and whose value is the current setting of that profile field.
For `displayname`, the value will be a string. For custom keys, any
JSON type is possible - clients should expect the format defined
for that key.
additionalProperties: true additionalProperties: true
examples: examples:
response: response:
@ -210,9 +209,7 @@ paths:
type: string type: string
- in: path - in: path
name: keyName name: keyName
description: The key name of the profile field to delete. It must be either description: The name of the profile field to delete.
`avatar_url`, `displayname`, or a custom field following the
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
required: true required: true
example: "displayname" example: "displayname"
schema: schema:
@ -220,7 +217,7 @@ paths:
pattern: '^(avatar_url|displayname|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$' pattern: '^(avatar_url|displayname|[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+)$'
responses: responses:
"200": "200":
description: The profile field was deleted. description: The profile field was deleted or it doesn't exist.
content: content:
application/json: application/json:
schema: schema:
@ -270,9 +267,7 @@ paths:
get: get:
summary: Get all profile information for a user. summary: Get all profile information for a user.
description: |- description: |-
Get the complete profile for a user. The response includes `avatar_url` Get the complete profile for a user.
and `displayname` (unless set to `null`, as they can only be strings)
plus any custom profile fields.
operationId: getUserProfile operationId: getUserProfile
parameters: parameters:
- in: path - in: path
@ -293,14 +288,14 @@ paths:
avatar_url: avatar_url:
type: string type: string
format: mx-mxc-uri format: mx-mxc-uri
description: "Avatar URL value (MXC URI format)." description: The user's avatar URL if they have set one, otherwise not present.
displayname: displayname:
type: string type: string
description: The user's display name if they have set one, otherwise not
present.
additionalProperties: additionalProperties:
x-addedInMatrixVersion: "1.16" x-addedInMatrixVersion: "1.16"
description: Any additional profile field value; may be any description: Additional profile fields.
valid JSON type, with keys following the
[Common Namespaced Identifier Grammar](/appendices/#common-namespaced-identifier-grammar).
examples: examples:
response: response:
value: value: