Skip to main content
Fetch Entity
Requires the entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.
Returns a single entity by its Sublay UUID. An entity a moderator removed is still returned, so a link to it keeps working: in full to its author, and as a placeholder (content and author blanked, moderationStatus: "removed" kept) to everyone else. Drafts are only returned to their author: a user token, or a service key naming the author in actingUserId. An entity in a space the viewer can’t read (see who can read content) answers 404 entity/not-found, exactly like an entity that doesn’t exist. A service key without actingUserId reads as a signed-out caller, so it gets 404 for entities in members-only and private spaces; name a member in actingUserId to read them.

Path Parameters

string
required
The UUID of the entity to fetch.

Query Parameters

string
Service key only: the user to read as. The response is exactly what that user’s own access token would get — their own drafts, block filtering, saved, their own reaction, the top comments they may see, and moderation details (moderationReason, moderatedById, moderatedByType) appear only where that user may see them — and the read counts as their view. Leave it out for the anonymous view: drafts return 404, there are no moderation details, and the read doesn’t count as a view. A user token always acts as its own user and must not send it, and neither may a request with no credentials (400 entity/acting-user-not-allowed).
string
Associations to include. Pass it as one comma-separated value (include=user,space) or as repeated params (include=user&include=space). Values:
  • user — the author’s user profile
  • space — the space the entity belongs to
  • topComments — the entity’s best top-level comments, as full Comment objects (see Top comments)
  • saved — saved: { isSaved, collections }: whether the current user has saved this entity, and the collections of theirs it is in (see Saved state)
  • files — uploaded file/image attachments
  • grants — the reputation-grant summary for the entity
number
default:"1"
With include=topComments: how many top comments per entity. A whole number of at least 1 — 0, a negative number or a non-integer value returns 400 entity/invalid-query. Maximum 5 — larger values are treated as 5.
string
default:"upvote"
With include=topComments: the reaction whose raw count ranks the top comments (ties newest first). One of upvote, downvote, like, love, wow, sad, angry, funny.
include values are case-insensitive. An unknown value returns 400 entity/invalid-query, as does sending topCommentsLimit or topCommentsSortByReaction without include=topComments. topComments lists real content only — deleted, removed and block-edged comments are left out — and is [] when nothing qualifies.

Space-scoped reputation

This endpoint has a space in context, so it accepts the opt-in reputation params. They add a spaceReputation field to the populated author user, alongside the always-present reputation total. Requires the reputation bundle. See the Reputation data model for the full contract.

Response

Returns an Entity object.

Error Responses

Returned with code entity/invalid-query for an unknown include value, when topCommentsLimit is below 1 or not a whole number, or when topCommentsLimit / topCommentsSortByReaction is sent without include=topComments.
include=topComment is rejected with a pointer to its replacement.
Also returned for draft entities when the viewer is not the author, including a service key that names nobody, and for an entity in a space the viewer can’t read.
A user token, or a request with no credentials, sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.
GET /entities/:entityId/saved and GET /entities/is-entity-saved are not v8 routes. They answer with a pointer to include=saved on this endpoint.