Skip to content

User

The User entity represents an account on a Versia instance. Users can subscribe to other users, and post and interact with content through extensions such as Social. Users are identified by their id property, which is unique within the instance. Only the instance a User is on may send or serve that User. A User holds only what every instance needs to show and address it. A bio and custom fields are in the Profile extension, and images such as a header are in the Decorations extension.

Definition

Type
"User"
Fetch
GET /.versia/v0.7/entities/User/{id}
Collections
  • subscribers: Reference Collection of users subscribed to the user.
  • subscriptions: Reference Collection of users that the user is subscribed to. It lists only Users: an extension whose types accept subscriptions can add a collection of its own for them.

Fields

The user’s avatar. MUST be an image (image/*).

display_name string

Display name, as shown to other users. Can contain emojis and any Unicode character.

username string Required

The user’s username. MUST be unique within the instance, and at least 1 character long. MUST be treated as changeable by the user.

MUST contain only the following characters: a-z, A-Z (case-insensitive), 0-9, _ and -.

If true, the user approves new subscribers manually. If false, subscribers are automatically approved. This does not affect federation, and is meant to be used for clients to display correct UI: every Subscribe is still answered.

indexable boolean Required

User consent to be indexed by search engines. If false, the user’s profile SHOULD NOT be indexed.

Address of the user’s profile page on their instance, for people to open in a browser. Software that shows the user elsewhere can link to it.

Inherited from Entity: id, type, created_at, updated_at, extensions
{
    "id": "033p0g85e2000",
    "type": "User",
    "created_at": "2024-04-09T01:38:51Z",
    "avatar": {
        "url": "https://cdn.example.com/avatars/april.png",
        "media_type": "image/png"
    },
    "display_name": "April The Pink (limited Sand Edition)",
    "extensions": {
        "pub.versia:custom_emojis": {
            "emojis": []
        },
        "pub.versia:profile": {
            "bio": "<p>🌸🌸🌸</p>",
            "fields": [
                {
                    "key": "Website",
                    "value": "<a href=\"https://april.example\">april.example</a>"
                }
            ]
        }
    },
    "username": "april",
    "manually_approves_subscribers": false,
    "indexable": false,
    "url": "https://versia.example/@april"
}

Subscriptions

Users accept subscriptions. A user’s subscribers receive the entities that Delivery sends to them, such as changes to the user.

Addresses

Users may be represented by a shorthand address, in the following format:

@username@instance

For example:

@alice@versia.example

This is similar to an email address or an ActivityPub address. Usernames are case-insensitive.

With the Domain Handles extension, a user can also be shown by a domain they own, such as @alice.example.

Username

Username MUST be the user’s username.

Usernames can be changed by the user, so an address may stop working. Use a Reference for long-term references.

Instance

Instance MUST be the Domain that the user is on.