Skip to content
Back

Reactions

Emoji reactions on folios — read counts and update reactions for public engagement.

Overview

Reactions allow viewers to express quick feedback on folios using emoji. Reactions are public — no authentication required for reading or writing.

Supported emojis:

EmojiName
👍Thumbs up
❤️Heart
💡Idea
🔥Fire

Only these four emojis are accepted. Other emoji values are silently ignored.

Reaction Object

Reactions are stored as a map of emoji to count:

{
  "👍": 12,
  "❤️": 7,
  "💡": 3,
  "🔥": 9
}

Get Reactions

GET /api/files/{id}/reactions

Returns the current reaction counts for a folio. Reactions are included in the public folio metadata (see GET /api/files/{id}/public).

Example Request:

curl https://livefolio.cloud/api/files/a1b2c3d/public

Response (relevant field):

{
  "reactions": {
    "👍": 12,
    "❤️": 7,
    "💡": 3,
    "🔥": 9
  }
}

Update Reactions

POST /api/files/{id}/reactions
Content-Type: application/json

Sets (replaces) reaction counts. The provided counts are merged with existing counts — you can update one emoji without affecting others. Counts must be non-negative integers.

Request Body:

FieldTypeRequiredDescription
reactionsobjectYesMap of emoji to count (e.g., {"👍": 13})

Example Request:

curl -X POST https://livefolio.cloud/api/files/a1b2c3d/reactions \
  -H "Content-Type: application/json" \
  -d '{
    "reactions": {
      "👍": 13,
      "🔥": 10
    }
  }'

Response:

{
  "success": true,
  "reactions": {
    "👍": 13,
    "❤️": 7,
    "💡": 3,
    "🔥": 10
  }
}

Error Responses:

StatusErrorDescription
400Invalid reactions format.reactions field missing or not an object
404Project not foundFolio does not exist

Note: The PUT method is also accepted and behaves identically to POST.

Validation Rules

  • Only the four supported emojis are accepted: 👍, ❤️, 💡, 🔥
  • Counts must be non-negative numbers (negative values are ignored)
  • Non-integer counts are floored to integers
  • Unknown emoji keys are silently dropped
  • Each update merges with existing counts (not a full replace of all emojis)