# Share model

A share code and what it opens: an image or a folder.

## Fields

| Field | Type | Present | Notes |
|---|---|---|---|
| `id` | `integer` |  |  |
| `code` | `string` |  |  |
| `referenceType` | `enum` |  | One of `User`, `Image`, `File`, `Paste`, `Short`, `Bio`, `Folder`, `Comment`. |
| `referenceId` | `integer` |  |  |
| `updatedAt` | `date-time` |  |  |
| `reference` | [`Image`](https://hematite.gg/docs/developers/models/image) or [`Folder`](https://hematite.gg/docs/developers/models/folder) |  |  |

## Returned by

The endpoints whose `data` holds a Share as it is, and where.

- [`GET /shares/:shareId`](https://hematite.gg/docs/developers/reference/shares#get-shares-shareid), in `data`
- [`PATCH /shares/:shareId`](https://hematite.gg/docs/developers/reference/shares#patch-shares-shareid), in `data`

## Example

```json
{
  "id": 1,
  "code": "x7Kp2QmA",
  "referenceType": "Image",
  "referenceId": 1,
  "updatedAt": "2026-11-10T18:24:00.000Z",
  "reference": {
    "id": 1,
    "userId": 1,
    "createdAt": "2026-11-10T18:24:00.000Z",
    "updatedAt": "2026-11-10T18:24:00.000Z",
    "title": "Clutch on Ascent",
    "description": "1v4 on the last round",
    "visibility": "Unlisted",
    "folderId": 1,
    "views": 0,
    "downloads": 0,
    "favorite": false,
    "application": "VALORANT",
    "filename": "a1b2c3d4e5f6.png",
    "size": 2457600,
    "width": 1920,
    "height": 1080,
    "nsfw": false,
    "storageId": 1,
    "autoDeleteAt": null,
    "hideUser": false,
    "shield": false,
    "nsfwLockedAt": "2026-11-10T18:24:00.000Z",
    "privateLockedAt": "2026-11-10T18:24:00.000Z",
    "offlineAt": "2026-11-10T18:24:00.000Z",
    "storage": {
      "key": "images/a1b2c3d4e5f6.png"
    },
    "shareId": 1,
    "shareCode": "x7Kp2QmA",
    "likeCount": 0,
    "commentCount": 0,
    "meta": {
      "id": 1,
      "blurHash": "string",
      "dominantColor": "string",
      "palette": null,
      "hasAlpha": false,
      "animated": false,
      "orientation": 0
    },
    "treatment": "string",
    "burn": {
      "secondsPerView": 0,
      "viewsEach": 0,
      "viewsInAll": 0,
      "then": "Blur",
      "viewsUsed": 0,
      "burnedAt": "string"
    }
  }
}
```
