On this page https://spec.matrix.org/latest/#profiles it mentions:
Users may publish arbitrary key/value data associated with their account; such as a human-readable display name, a profile photo URL, contact information (email address, phone numbers, website URLs etc).
From the spec, it seems it should work… not sure if "just not implemented yet" or if the spec has changed not to allow this.
Here https://spec.matrix.org/v1.8/client-server-api/#profiles it mentions only GET and PUT for profile/${user_id}/{avatar,displayname}, and when trying for an other "profile key" (than avatar and display name), it errors.
Any idea how one does add new "arbitrary key/value" to their user profile? With the matrix-js-sdk, or the HTTP API?