Custom extensions to the entity.
key: The extension name.value: Extension data. MUST be a JSON object, following Versia JSON rules.
Versia’s core provides users, subscriptions, and the rules for exchanging entities between instances. Everything else comes from extensions, which add entities, fields and behavior without any changes to the core. Posts, for example, come from the Social extension.
Extensions can be implemented in any combination that meets their requirements.
Extensions SHOULD be standardized and publicly documented.
These extensions are documented on this site, and all use the pub.versia namespace and are at version 1. See Naming for how their names are formed.
pub.versia:custom_emojisAdds custom emojis to any entity with text content.
pub.versia:decorationsAdds a User's header image, images around their avatar, a profile background and a profile sound.
pub.versia:delegationLets users show their actions under another user's name.
pub.versia:domain_handlesLets users be shown by a domain they own, such as @joe.example.
pub.versia:groupsOrganizes users and notes into communities.
pub.versia:instance_messagingLets instances send each other federation debug messages.
pub.versia:interaction_controlsLets users control who can interact with their notes.
pub.versia:likesLets users like and dislike notes.
pub.versia:migrationLets users move their subscribers and subscriptions to another instance.
pub.versia:pollsLets users create and vote on polls.
pub.versia:profileAdds a User's bio, custom fields, pronouns, birthday, location and time zone.
pub.versia:reactionsLets users react to notes with emojis.
pub.versia:reportsReports content to the moderators or administrators of a remote instance for review.
pub.versia:shareLets users share notes with others.
pub.versia:socialLets users post notes, with visibility, mentions, replies, quotes and a collection of each user's notes.
An extension does not need to be listed here to be used. To propose one for this list, open an issue.
When an extension is not supported by an Implementation, it can be ignored. This means that the extension is not processed, and its data is not used. Implementations MUST NOT throw an error when encountering an unsupported extension, as long as the rest of the entity is valid. An entity whose type comes from an unsupported extension is answered with a 2xx status code and dropped.
Extensions MUST NOT be designed in a way that makes them required to understand or process core entities, or the entities of an extension that does not require them.
An extension can build on another, for example by adding interactions to entities that the other extension defines. It then requires that extension. Its page lists the extensions it requires, each with a version. For example, pub.versia:likes@1 requires pub.versia:social@1, because likes are given to Notes, which Social defines.
An Instance that lists an extension in compatibility.extensions MUST also list every extension it requires, at the required version. An extension MUST NOT require itself, directly or through other extensions.
Versia extension names are composed of two parts:
pub.versiasnake_case. Example: likespub.versia:likes
Matrix names custom event types the same way, such as com.example.myapp.event. ActivityPub uses JSON-LD contexts instead. See Other Protocols.
The namespace MUST come from a domain the author controls. pub.versia is reserved for extensions defined in this specification.
Custom entities are named in the same way, but with an additional part:
PascalCase. Example: Likepub.versia:likes/Like
An extension’s version is a whole number that starts at 1, and goes up only when a change is incompatible. Extension keys, entity types and endpoints do not include it.
Instances list what they support in compatibility.extensions, as the extension name and version joined by @. They MAY list several versions of an extension.
pub.versia:likes@1
Two instances that both list an extension use the highest version they have in common. If they have none in common, the sender MUST leave out that extension’s data: its key in extensions, its entity types and its collections. The same applies when the version they would use requires an extension that they do not have in common at the required version.
Extensions can add any of the following:
extensions property.Fields
extensions Record<string, JSONData> Custom extensions to the entity.
key: The extension name.value: Extension data. MUST be a JSON object, following Versia JSON rules.{
"type": "pub.versia:groups/Group",
"id": "033j6qrwzt002",
"created_at": "2021-01-01T00:00:00Z",
"open": true,
"extensions": {
"com.example:gps": {
"location": {
"latitude": 37.7749,
"longitude": -122.4194
},
"accuracy": 10,
"name": "San Francisco"
}
}
}Fields
The extension type, following naming conventions.
Other properties of the custom entity. These are specific to the extension, and SHOULD be documented by the extension author.
Note that id and created_at are still required for custom entities, unless the extension author specifies otherwise.
{
"type": "com.example:bookmarks/Bookmark",
"id": "033fsr7ggg004",
"author": "example.com:033wv9k6n0007",
"created_at": "2021-01-01T00:00:00Z",
"target": "example.com:033qtdbdkj006",
"label": "Read later"
}An extension’s collections are named like its custom entities, for example pub.versia:likes/Likes.
An extension’s endpoints MUST be under /.versia/v0.X/extensions/{extension_name}/. This keeps them from colliding with core endpoints or with other extensions. The extension name is not percent-encoded.
/.versia/v0.7/extensions/pub.versia:instance_messaging/messaging