Skip to main content
The social module is built around a set of interconnected entities that model a social network: users create and join communities, publish posts and stories, leave comments, add reactions, and follow each other. Content is organized through feeds, and media is managed via files.
Who is this for? This reference describes the core server data model. It’s essential for data import, analytics integration, and understanding API response structures.

Conventions

ConventionDescription
Triple-ID patternMost entities expose three IDs: a primary {entity}Id, a {entity}PublicId (stable external identifier), and a {entity}InternalId (database-level reference). For joins, prefer userId / userPublicId.
Soft deleteNearly every entity has an isDeleted boolean. Deleted records remain in the database with isDeleted: true. Filter these out unless you specifically need deletion history.
TimestampscreatedAt and updatedAt (ISO 8601 date-time) are present on all entities. Some also have editedAt.
MetadataA freeform metadata object is available on most entities for custom fields.
FlaggingflagCount (number of reports) and hashFlag (bloom-filter structure) track moderation state. Parent entities bubble up flags via hasFlaggedComment, hasFlaggedPost, hasFlaggedChildren.

Entity-Relationship Diagram

The following diagram shows the core entities and their relationships in the social module.

Entity Reference

A registered user within the network. Users can create content, join communities, follow others, and react to content.
FieldTypeDescription
userIdstringPrimary key. Unique user identifier.
userPublicIdstringStable public identifier (v3+).
userInternalIdstringInternal database identifier (v3+).
displayNamestringDisplay name.
profileHandlestringUnique handle (v3+).
descriptionstringUser bio (v3+).
avatarFileIdstringFK → File. Avatar image.
avatarCustomUrlstringExternal avatar URL (v3+).
rolesstring[]Role IDs assigned to this user.
permissionsstring[]Resolved permissions (v3+).
flagCountintegerNumber of moderation reports.
hashFlagobjectBloom-filter flag structure.
metadataobjectCustom fields.
isGlobalBanbooleanWhether user is globally banned (v3+).
isBrandbooleanWhether user is a brand account (v3+).
tagsarrayTag assignments: [{tagId: "...", assignedAt: "..."}] (v3+).
isDeletedbooleanSoft-delete flag.
createdAtdate-timeCreation timestamp.
updatedAtdate-timeLast update timestamp.
Relationships:
  • 1:N → Post (as postedUserId)
  • 1:N → Comment (as userId)
  • 1:N → Story (as creatorId)
  • 1:N → Poll (as userId)
  • M:N → Community (via CommunityUser join)
  • 1:N → Follow (as from or to)
A group or space where users gather, share posts, and interact. Every community has a backing channel (1:1) and can be associated with categories.
Direct DB queries: Several community fields (displayName, tags, metadata, avatarFileId, categoryIds, hasFlaggedComment, hasFlaggedPost, notificationMode) are actually stored on the backing Channel document, not on the Community document itself. The API serializer merges both into a single response.
FieldTypeDescription
communityIdstringPrimary key.
channelIdstringFK → Channel. 1:1 backing channel.
userIdstringFK → User. Creator.
userPublicIdstringCreator’s public ID.
userInternalIdstringCreator’s internal ID.
displayNamestringCommunity display name.
descriptionstringCommunity description.
avatarFileIdstringFK → File. Avatar image.
isOfficialbooleanOfficial community flag.
isPublicbooleanPublic visibility.
isDiscoverablebooleanWhether private community appears in search.
onlyAdminCanPostbooleanRestrict posting to admins.
needApprovalOnPostCreationbooleanPosts require review before publishing.
requiresJoinApprovalbooleanMembers need admin approval to join.
allowCommentInStorybooleanAllow comments on stories.
categoryIdsstring[]FK → CommunityCategory. Many-to-many.
tagsstring[]Searchable tags.
metadataobjectCustom fields.
postsCountintegerTotal post count.
membersCountintegerTotal member count.
moderatorMemberCountintegerModerator count.
hasFlaggedCommentbooleanContains reported comments.
hasFlaggedPostbooleanContains reported posts.
notificationModeenumdefault | silent | subscribe.
typeenumdefault | event.
eventIdstringFK → Event. Present when type = "event".
isJoinedboolean(Computed) Whether the requesting user is a member.
isDeletedbooleanSoft-delete flag.
createdAtdate-timeCreation timestamp.
updatedAtdate-timeLast update timestamp.
Relationships:
  • 1:1 → Channel (every community has a backing channel)
  • M:N → CommunityCategory (via categoryIds[])
  • 1:N → CommunityUser (members)
  • 1:N → Post (via polymorphic targetId where targetType = "community")
  • 1:N → Story (via polymorphic targetId where targetType = "community")
  • 1:N → Feed (via polymorphic targetId where targetType = "community")
A label/tag that can be associated with communities. Communities reference categories via categoryIds[] (many-to-many).
FieldTypeDescription
categoryIdstringPrimary key.
namestringDisplay name.
metadataobjectCustom fields.
avatarFileIdstringFK → File. Category avatar.
isDeletedbooleanSoft-delete flag.
createdAtdate-timeCreation timestamp.
updatedAtdate-timeLast update timestamp.
Relationships:
  • M:N → Community (referenced by community.categoryIds[])
The join entity between User and Community. Represents a user’s membership, roles, and status within a community.
FieldTypeDescription
userIdstringFK → User.
userPublicIdstringUser’s public ID.
userInternalIdstringUser’s internal ID.
communityIdstringFK → Community.
channelIdstringFK → Channel. The community’s backing channel.
communityMembershipenumnone | member | banned.
notMemberReasonstringReason user is not a member.
isBannedbooleanBan status.
rolesstring[]Community-specific role IDs.
permissionsstring[]Resolved permissions within this community.
lastActivitydate-timeLast activity in community.
createdAtdate-timeRecord creation timestamp.
updatedAtdate-timeLast update timestamp.
Relationships:
  • N:1 → User
  • N:1 → Community
  • Composite key: (userId, communityId)
The primary content unit. Posts can target a community or a user’s profile feed. Posts support a parent–child composition model where a single logical post (e.g., a gallery) is a parent with child posts for each attachment. See Post Composition Model.
FieldTypeDescription
postIdstringPrimary key.
parentPostIdstringFK → Post (self). Parent post ID for child posts. null for top-level posts.
postedUserIdstringFK → User. Creator.
postedUserPublicIdstringCreator’s public ID.
postedUserInternalIdstringCreator’s internal ID.
sharedPostIdstringFK → Post. Reference to the shared/reposted post.
sharedCountintegerNumber of times shared.
targetIdstringFK → Community or User. Polymorphic target.
targetPublicIdstringTarget’s public ID.
targetInternalIdstringTarget’s internal ID.
targetTypeenumuser | community | content. Determines what targetId points to.
dataTypeenumtext | image | file | video | liveStream | audio | poll | clip | room. Content type.
dataobjectContent payload. Fields vary by dataType — see below.
data.titlestringPost title (max 150 chars).
data.textstringPost body text.
data.fileIdstringFK → File. Image/file attachment.
data.thumbnailFileIdstringFK → File. Video thumbnail.
data.videoFileIdobjectVideo file IDs by quality: {original, low, medium, high}.
data.streamIdstringFK → VideoStream. For live stream posts.
data.imageDisplayModeenumfit | fill. How image is displayed.
data.roomIdstringFK → Room. For room posts.
metadataobjectCustom fields.
childrenstring[]IDs of child posts.
childrenNumberintegerCount of child posts.
commentsstring[]IDs of comments.
commentsCountintegerTotal comment count.
reactionsobjectMap of reactionName → count (e.g., {"like": 5}).
reactionsCountintegerTotal reaction count.
myReactionsstring[]Current user’s reaction names.
feedIdstringFK → Feed. Which feed this post belongs to.
tagsstring[]Up to 5 tags (max 24 chars each).
hashtagsstring[]Up to 30 hashtags (max 100 chars each).
mentioneesarrayMentioned users: [{type: "user", userIds: [...]}].
impressionintegerNon-unique view count.
reachintegerUnique view count.
structureTypeenumDerived type — see StructureType enum.
flagCountintegerReport count.
hashFlagobjectBloom-filter flag.
hasFlaggedCommentbooleanContains reported comments.
hasFlaggedChildrenbooleanContains reported child posts.
approvedbooleanWhether the post is approved for global feed.
isDiscoverablebooleanWhether the post is discoverable.
sequenceNumberintegerOrdering sequence within feed.
publisherIdstringFK → User. Publisher (may differ from poster in moderated flows).
publisherPublicIdstringPublisher’s public ID.
eventIdstringFK → Event. Room/event reference (optional).
linksarrayLink preview data extracted from post content.
editedAtdate-timeLast content edit timestamp.
isDeletedbooleanSoft-delete flag.
createdAtdate-timeCreation timestamp.
updatedAtdate-timeLast update timestamp.
Relationships:
  • N:1 → User (creator via postedUserId)
  • N:1 → Community or User (via targetId + targetType)
  • 1:N → Post (children via parentPostId, self-referential)
  • 1:N → Comment (via comment.referenceId where referenceType = "post")
  • 1:N → Reaction (via reaction.referenceId where referenceType = "post")
  • N:1 → Feed (via feedId)
  • 0:1 → Poll (via data.pollId when created as poll post)
  • 0:N → File (attachments via child posts or data.fileId)
A comment attached to a Post or Story. Comments support two-level threading — see Comment Threading Model.
FieldTypeDescription
commentIdstringPrimary key.
userIdstringFK → User. Creator.
userPublicIdstringCreator’s public ID.
userInternalIdstringCreator’s internal ID.
parentIdstringFK → Comment (self). Direct parent for replies. null for top-level.
rootIdstringFK → Comment (self). Thread root comment. null for top-level.
referenceIdstringFK → Post or Story. Polymorphic. The content this comment is on.
referenceTypeenumpost | content | story. What referenceId points to.
targetIdstring(Computed) FK → Community or User. Derived from path at serialization time.
targetTypeenum(Computed) community | user | content. Derived from path at serialization time.
dataTypestring(Deprecated) Type of comment — fixed as "text" in newer SDKs.
dataTypesstring[]Content types: text | image | video. A comment can contain multiple types.
dataobjectComment body content.
metadataobjectCustom fields.
attachmentsarrayMedia attachments — [{type: "image"|"video", fileId: "..."}].
childrenstring[]IDs of reply comments.
childrenNumberintegerReply count.
reactionsobjectMap of reactionName → count.
reactionsCountintegerTotal reaction count.
myReactionsstring[]Current user’s reaction names.
mentioneesarrayMentioned users: [{type: "user", userIds: [...]}].
segmentNumberintegerOrdering segment.
flagCountintegerReport count.
hashFlagobjectBloom-filter flag.
publisherPublicIdstringPublisher’s public ID (may differ from commenter).
linksarrayLink preview data extracted from comment content.
editedAtdate-timeLast edit timestamp.
isDeletedbooleanSoft-delete flag.
createdAtdate-timeCreation timestamp.
updatedAtdate-timeLast update timestamp.
Relationships:
  • N:1 → User (creator via userId)
  • N:1 → Post or Story (via referenceId + referenceType)
  • 1:N → Comment (replies via parentId, self-referential)
  • N:1 → Comment (root thread via rootId)
  • 1:N → Reaction (via reaction.referenceId where referenceType = "comment")
  • 0:N → File (via attachments[].fileId)
Tracks reactions (likes, love, etc.) on content. Each reaction is stored as its own document — one document per user-reaction-reference combination. Reactions use a polymorphic reference to support multiple content types.
FieldTypeDescription
reactionIdstringPrimary key. Unique reaction instance ID.
reactionNamestringFreeform name, e.g., "like", "love", "wow".
userIdstringFK → User. Who reacted.
userInternalIdstringReactor’s internal ID.
referenceIdstringFK → Post, Comment, Story, or Message. The content being reacted to.
referenceTypeenumpost | comment | story | message. Determines what referenceId points to.
createdAtdate-timeWhen the reaction was added.
updatedAtdate-timeWhen the reaction was last updated.
Reaction names are freeform strings, not a fixed enum. The reactions field on Post/Comment/Story aggregates these as {reactionName: count}.Aggregated view: When querying reactions for a reference, the API returns an aggregated reactors[] array grouped by reference. Each entry contains reactionId, reactionName, userId, and createdAt.
Relationships:
  • N:1 → Post (when referenceType = "post")
  • N:1 → Comment (when referenceType = "comment")
  • N:1 → Story (when referenceType = "story")
  • N:1 → Message (when referenceType = "message")
  • N:1 → User (via userId)
A user-to-user follow relationship. Supports request-based following with status tracking.
FieldTypeDescription
fromstringFK → User. The follower’s user ID.
fromUserPublicIdstringFollower’s public ID.
fromUserInternalIdstringFollower’s internal ID.
tostringFK → User. The followed user’s ID.
toUserPublicIdstringFollowed user’s public ID.
toUserInternalIdstringFollowed user’s internal ID.
statusenumpending | accepted | none | deleted | blocked.
createdAtdate-timeWhen the follow was initiated.
updatedAtdate-timeLast status change.
FollowCount (separate aggregation entity):
FieldTypeDescription
userIdstringFK → User.
followerCountintegerNumber of followers.
followingCountintegerNumber of users being followed.
pendingCountintegerPending follow requests.
Relationships:
  • N:1 → User (from — the follower)
  • N:1 → User (to — the followed)
A container that groups posts for a specific target (community or user). Each target can have up to three feed types that represent different stages of the post approval workflow.
FieldTypeDescription
feedIdstringPrimary key.
targetIdstringFK → Community or User. Polymorphic owner.
targetTypeenumcommunity | user.
feedTypeenumpublished (main feed) | reviewing (pending approval) | declined (rejected).
postCountintegerNumber of posts in this feed.
createdAtdate-timeCreation timestamp.
updatedAtdate-timeLast update timestamp.
Relationships:
  • N:1 → Community (when targetType = "community")
  • N:1 → User (when targetType = "user")
  • 1:N → Post (posts reference feed via post.feedId)
A poll embedded within a post. Polls have a question with up to 10 answers and can be open or closed.
FieldTypeDescription
pollIdstringPrimary key.
userIdstringFK → User. Creator.
userPublicIdstringCreator’s public ID.
userInternalIdstringCreator’s internal ID.
titlestringPoll title (max 150 chars).
questionstringPoll question text.
answerTypeenumsingle | multiple. Whether user can pick one or many answers.
answersarrayUp to 10 answers — see Answer below.
statusenumopen (default) | closed.
closedAtstringWhen the poll was/should be closed.
closedInnumberAuto-close duration.
isVotedboolean(Computed) Whether current user has voted.
isDeletedbooleanSoft-delete flag.
createdAtdate-timeCreation timestamp.
updatedAtdate-timeLast update timestamp.
Answer (nested object):
FieldTypeDescription
idstringOption ID.
dataTypeenumtext | image.
datastringAnswer text.
fileIdstringFK → File. Required when dataType = "image".
voteCountnumberNumber of votes.
isVotedByUserbooleanWhether current user voted for this option.
UsersAnswered (vote tracking):
FieldTypeDescription
userIdstringFK → User.
pollIdstringFK → Poll.
answerIdsstring[]Which answers the user selected.
Relationships:
  • N:1 → User (creator)
  • 1:1 → Post (poll is embedded via post.data.pollId)
A live video streaming session. Rooms support direct streaming (single host via RTMP/SRT) or co-host mode (multi-participant via WebRTC). Rooms are surfaced in the social feed via Posts with dataType = "room" and data.roomId. They have a lifecycle (idle → live → ended/recorded) and can optionally attach a live chat channel.
FieldTypeDescription
roomIdstringPrimary key.
typeenumdirectStreaming | coHosts.
statusenumidle | live | waitingReconnect | ended | recorded | terminated | error.
titlestringRoom title (max 1000 chars).
descriptionstringRoom description (max 5000 chars).
createdBystringFK → User. Creator’s public ID.
creatorInternalIdstringCreator’s internal ID.
targetTypeenumcommunity. Where the room is hosted.
targetIdstringFK → Community. Target community ID.
referenceTypeenumpost. The entity this room is linked to.
referenceIdstringFK → Post. The post embedding this room.
thumbnailFileIdstringFK → File. Thumbnail image.
participantsarrayParticipants: [{userId, userInternalId, type: "host"|"coHost", canManageProductTags?}].
liveChatEnabledbooleanWhether live chat is enabled.
liveChannelIdstringFK → Channel. Attached live chat channel’s public ID.
parentRoomIdstringFK → Room (self). Parent room for multi-stream layouts.
childRoomIdsstring[]Child room IDs for multi-stream layouts.
metadataobjectCustom fields.
durationSecondsnumberStream duration in seconds.
liveAtdate-timeWhen the room went live.
endedAtdate-timeWhen the room ended.
recordedAtdate-timeWhen the recording became available.
livePlaybackUrlstring(Computed) HLS playback URL. Only present for non-banned users while room is live.
liveThumbnailUrlstring(Computed) Live thumbnail URL. Same access conditions as livePlaybackUrl.
recordedPlaybackInfosarray(Computed) Recorded playback: [{url, thumbnailUrl}]. Only for non-banned users after recording.
isDeletedbooleanSoft-delete flag.
deletedAtdate-timeDeletion timestamp.
deletedBystringFK → User. Who deleted the room.
createdAtdate-timeCreation timestamp.
updatedAtdate-timeLast update timestamp.
Relationships:
  • N:1 → User (creator via createdBy)
  • N:1 → Community (via targetId where targetType = "community")
  • 1:1 → Post (room is embedded via post.data.roomId; room references back via referenceId)
  • 1:N → Room (children via parentRoomId, self-referential)
  • 0:1 → File (thumbnail via thumbnailFileId)
  • 0:1 → Channel (live chat via liveChannelId)
Ephemeral content with an expiration time. Stories can target a user’s profile or a community.
FieldTypeDescription
storyIdstringPrimary key.
creatorIdstringFK → User (internal ID). Creator.
creatorPublicIdstringCreator’s public ID.
targetIdstringFK → Community or User (internal ID). Polymorphic target.
targetPublicIdstringTarget’s public ID.
targetTypeenumuser | community.
dataTypeenumtext | image | video.
dataobjectStory content — see below.
data.textstringText content.
data.fileIdstringFK → File. Image file.
data.imageDisplayModeenumfit | fill. How image is displayed.
data.thumbnailFileIdstringFK → File. Video thumbnail.
data.videoFileIdobjectVideo files by quality: {original, low, medium, high}.
itemsarrayStory overlays. Currently supports hyperlink items (max 10).
metadataobjectCustom fields.
expiresAtdate-timeWhen the story expires (configurable, 1–1440 minutes).
reactionsobjectMap of reactionName → count.
reactionsCountintegerTotal reaction count.
myReactionsstring[]Current user’s reaction names.
commentsCountintegerComment count.
hasFlaggedCommentbooleanContains reported comments.
mentionedUsersarrayMentioned users/channels.
impressionintegerNon-unique view count.
reachintegerUnique view count.
flagCountintegerReport count.
hashFlagobjectBloom-filter flag structure.
commentsarrayComment data for this story.
referenceIdstringOptional reference ID.
isDeletedbooleanSoft-delete flag.
createdAtdate-timeCreation timestamp.
updatedAtdate-timeLast update timestamp.
StoryTarget (aggregated ring state):
FieldTypeDescription
targetIdstringFK → Community or User.
targetPublicIdstringTarget’s public ID.
targetTypeenumcommunity | user.
lastStoryExpiresAtdate-timeExpiry of the latest active story.
lastStorySeenExpiresAtdate-timeExpiry of the latest story the user has seen.
targetUpdatedAtdate-timeWhen the target was last updated.
Relationships:
  • N:1 → User (creator via creatorId)
  • N:1 → Community (when targetType = "community")
  • N:1 → User (when targetType = "user")
  • 1:N → Comment (via comment.referenceId where referenceType = "story")
  • 1:N → Reaction (via reaction.referenceId where referenceType = "story")
  • 0:N → File (via data.fileId, data.thumbnailFileId)
An uploaded media file (image, video, audio, or generic file). Files are referenced by other entities via fileId.
FieldTypeDescription
fileIdstringPrimary key. Cloud storage key.
fileUrlstringHTTP download URL.
typeenumimage | file | video | audio | clip.
accessTypeenumpublic (open download) | network (requires authentication).
altTextstringAlternative text (max 180 chars).
feedTypestringFeed type associated with this file.
statusenumuploaded | transcoding | transcoded | transcodeFailed. Processing status (mainly for video/audio).
isDeletedbooleanSoft-delete flag.
videoUrlobjectVideo URLs by resolution: {1080p, 720p, 480p, 360p, original}. Present for video files.
attributes.namestringOriginal file name.
attributes.extensionstringFile extension/format.
attributes.sizenumberFile size in bytes.
attributes.mimeTypestringMIME type.
attributes.metadataobject(Schemaless) Additional metadata. May contain width, height, exif, gps if set by the uploading client, but these sub-fields are not enforced by the schema.
createdAtdate-timeUpload timestamp.
updatedAtdate-timeLast update timestamp.
Relationships: Referenced by: Post (data.fileId, child post attachments), Comment (attachments[].fileId), Story (data.fileId), User (avatarFileId), Community (avatarFileId), CommunityCategory (avatarFileId), Poll answers (answers[].fileId).

Polymorphic Reference Patterns

Two polymorphic foreign key patterns are used throughout the data model. Understanding these is critical for correct data joins.
Critical for data integration: Misunderstanding these patterns is the most common source of join errors. Always check both the ID and its accompanying type field.
Used to associate content with its owner/container.
EntityPossible targetType valuesInterpretation
Postuser, community, contentWhere the post was published — a user’s profile or a community.
Commentcommunity, user, contentThe context of the referenced content.
Storyuser, communityWhere the story was published.
Feedcommunity, userThe owner of the feed.
How to join:
IF targetType = "community" THEN targetId → community.communityId
IF targetType = "user"      THEN targetId → user.userId

Post Composition Model (Parent–Child Posts)

Posts use a parent–child composition pattern to represent multi-attachment content (e.g., image galleries, mixed-media posts).
1

Top-level posts

A top-level post has parentPostId = null.
2

Child posts

A child post has parentPostId pointing to the parent’s postId.
3

Parent tracks children

The parent post holds children[] (array of child post IDs) and childrenNumber.
4

One attachment per child

Each child post holds a single attachment (one fileId or videoFileId per child).
5

Structure type derivation

The structureType field on the parent indicates the derived type: image, video, file, text, etc. if all children are the same type, or mixed if children have different data types.
6

Querying top-level posts

When querying posts, filter by parentPostId = null to get only top-level posts. Then load children[] to get attachments.

Comment Threading Model

Comments support two-level threading using parentId and rootId.
1

Top-level comments

Top-level comments have referenceId → Post/Story, parentId = null, rootId = null.
2

Replies

Replies set parentId to the direct parent comment and rootId to the thread root.
3

Shared root

All replies in a thread share the same rootId, regardless of nesting depth.
4

Children tracking

Parent comments track replies via children[] (array of child comment IDs) and childrenNumber.
5

Content reference

Comments reference their parent content (Post or Story) via referenceId + referenceType.

Feed System

Feeds organize posts for a specific target. Each community or user can have up to three feed types representing the post approval workflow:
Feed TypeDescription
publishedThe main, publicly visible feed. Posts are live.
reviewingPosts pending review/approval (when community.needApprovalOnPostCreation = true).
declinedPosts rejected during the review process.

Feed Endpoints

Community Feed

Posts published in a specific community. Filtered by targetType = "community".

User Feed

Posts published on a specific user’s profile. Filtered by targetType = "user".

Global Feed

Aggregated feed across communities and users. Configurable per network.

Following Feed

Posts from users the current user follows.

Post → Feed Mapping

  • Every post has a feedId pointing to the Feed it belongs to.
  • The Feed’s targetId + targetType tells you which community or user owns it.
  • To find all published posts in a community: find the Feed where targetId = communityId, targetType = "community", feedType = "published", then query posts by that feedId.

Key Enums Reference

EnumValuesUsed By
CommunityMembershipnone, member, bannedCommunityUser .communityMembership
Community.typedefault, eventCommunity .type
Community.notificationModedefault, silent, subscribeCommunity .notificationMode
Post.targetTypeuser, community, contentPost .targetType, Comment .targetType
Post.dataTypetext, image, file, video, liveStream, audio, poll, clip, roomPost .dataType
StructureTypefile, image, video, audio, text, liveStream, poll, clip, room, mixedPost .structureType
Comment.referenceTypepost, content, storyComment .referenceType
Comment.dataTypestext, image, videoComment .dataTypes[]
Reaction.referenceTypepost, comment, story, messageReaction .referenceType
Follow.statuspending, accepted, none, deleted, blockedFollow .status
Feed.feedTypepublished, reviewing, declinedFeed .feedType
Feed.targetTypecommunity, userFeed .targetType
Story.dataTypetext, image, videoStory .dataType
Story.targetTypeuser, communityStory .targetType
File.typeimage, file, video, audio, clipFile .type
File.accessTypepublic, networkFile .accessType
File.statusuploaded, transcoding, transcoded, transcodeFailedFile .status
Poll.answerTypesingle, multiplePoll .answerType
Room.typedirectStreaming, coHostsRoom .type
Room.statusidle, live, waitingReconnect, ended, recorded, terminated, errorRoom .status
Room.participantTypehost, coHostRoom .participants[].type
Room.targetTypecommunityRoom .targetType
Room.referenceTypepostRoom .referenceType

Data Import Tips

Most entities expose three IDs (userId, userPublicId, userInternalId). For joining data across entities, use userId or the corresponding public ID — these are the values used in foreign key references. Internal IDs are database-level identifiers and may not appear in all API responses.
Always check targetType + targetId on posts:
  • targetType = "community" → the post belongs to a community; join on targetId = community.communityId.
  • targetType = "user" → the post is on a user’s profile feed; join on targetId = user.userId.
Reaction names (e.g., "like", "love", "wow") are freeform strings, not a fixed enum. When aggregating, group by reactionName. The reactions object on Post/Comment/Story already provides {name: count} aggregations.
A poll is created as part of a post. The post’s data object will contain a pollId during creation. To join: Post.data.pollId → Poll.pollId. Not all posts have polls — only those with structureType = "poll" or where data.pollId exists.
Stories have an expiresAt timestamp. To query only active stories, filter where expiresAt > NOW(). Expiry duration is configurable per network (1–1440 minutes). Expired stories remain in the database but are no longer shown in story rings.
Soft-deleted records have isDeleted: true. Exclude these by default for analytics unless you need deletion history. Posts also support permanent (hard) deletes — these records are removed entirely.
When querying posts via feeds, pay attention to feedType:
  • published → live, visible posts (this is what you want for most analytics).
  • reviewing → posts awaiting approval.
  • declined → rejected posts.
To avoid double-counting in analytics, filter by parentPostId = null when counting top-level posts. Child posts are attachments/media within a parent post, not standalone content.
To get only top-level comments (not replies), filter by parentId = null. To reconstruct full threads, group by rootId.
A user’s relationship with a community is captured in the CommunityUser join entity. Check communityMembership:
  • member → active member.
  • banned → banned from the community.
  • none → not a member.