Skip to main content
An entity is the central content unit in Sublay — it can represent a post, article, product listing, video, or any other piece of content in your application. Entities support reactions, comments, votes, file attachments, geo-location, and more.
Entities are provided by the optional entities bundle. A project without it returns 403 database/tables-not-available for entity endpoints. See Bundles.

Properties

Nested Types

TopComment

Included when the entity has at least one comment.

GeoPoint

NSFW flagging

An entity carries its own nsfw boolean and exposes a live-computed nsfwEffective:
  • nsfw — the entity’s own flag. It defaults to false and is what the owner, a service/master key, or a space moderator toggles.
  • nsfwEffective — never stored on the entity. It is computed on every read as:
    So an entity reads as effectively NSFW when either its own flag is set or the space it lives in is effectively NSFW (which itself folds in the space’s whole ancestor chain — see Space → NSFW flagging). A space-less entity (spaceId is null) falls back to its own flag; on a project without the spaces bundle, the space contribution is simply absent and nsfwEffective equals entity.nsfw.
The effect is a live OR: clearing an entity’s own nsfw cannot make it read safe while its space chain is still NSFW, and flagging a space instantly cascades to every entity inside it without stamping or backfilling entity rows. To filter a list by effective NSFW, pass nsfwFilter to Fetch many entities (include-all default / exclude / only).
Sublay only labels (nsfw) and filters (nsfwFilter) content. It does not blur, age-gate, add interstitials, or store a per-viewer “show mature content” preference — how NSFW-flagged content is presented is entirely the consuming app’s responsibility.

Includes

Pass an include array to populate optional fields:

See Also