# Share Extension

Lets users share notes with others.

Extension name: `pub.versia:share`

The Share Extension lets users share notes with others. This is the same as Twitter's "retweet" and Mastodon's "boost".

This extension requires [`pub.versia:social@1`](/extensions/social), which defines [Notes](/extensions/social#note).

## Definition

- Type: `"pub.versia:share/Share"`
- Fetch: `GET /.versia/v0.7/entities/pub.versia:share/Share/{id}`

**Fields**

- `type` (`string`, required): **MUST** be `pub.versia:share/Share`.
- `author` (`Reference`, required): [Reference](/entities#reference) to the [User](/entities/user) who created the Share.
- `target` (`Reference`, required): [Reference](/entities#reference) to the note being shared.

Inherited from [Entity](/entities):

- [`id`](/entities#entity-id) (`string`, required)
- [`created_at`](/entities#entity-created-at) (`RFC3339`, required)
- [`updated_at`](/entities#entity-updated-at) (`RFC3339`)
- [`extensions`](/entities#entity-extensions) (`Extensions`)

```jsonc title="Example Share"
{
    "id": "033gs6adpp000",
    "type": "pub.versia:share/Share",
    "created_at": "2021-01-01T00:00:00Z",
    "author": "example.com:033wv9k6n0007",
    "target": "example.org:033w19vsgr000"
}
```

## Behavior

A user **MUST NOT** share a [Note](/extensions/social#note) whose `visibility` is not `public`. A receiver **MUST** ignore a Share of such a Note.

In clients, `Shares` **SHOULD** be rendered in a way that makes it clear that the shared note was originally authored by someone else than the user who shared it.

`Shares` can be undone ("unboosting") with a [Delete](/entities/delete) entity.

## Delivery and Access

A sender **MUST** [deliver](/federation#delivery) Shares to the author of the [Note](/extensions/social#note) and to the subscribers of the user who shared it.

Any instance that [may fetch](/extensions/social#delivery-and-access) the Note, and the instance of the Note's author, may fetch a Share.

## Collections

The Share extension adds the following collections to the [Note](/extensions/social#note) entity:

- `pub.versia:share/Shares`: [Reference Collection](/structures/collection#reference-collection) of all the shares of the note.

## Interaction Types

This extension registers the following [interaction types](/extensions/interaction-controls#interaction-types):

- `pub.versia:share/share`, for sharing a Note.

## Versia Links

The Share extension adds the following [Versia Link](/links) action:

- `share/{instance}/{id}`: Share a note.
