Skip to main content
Posts are the foundation of content creation and sharing in social.plus. A post can include text, images, videos, files, polls, live streams, or custom content—enabling users to express themselves, share information, and connect with others in a network or community.
Posts support real-time events and Live Object features. See Live Objects/Collections and Realtime Events for more.

Post Structure

Posts use a parent-child relationship:
  • The parent post acts as a container (e.g., for text or metadata)
  • Each image, video, or file is a separate child post
  • Both parent and child posts support reactions and comments
Example: An image post with three images will have one parent post (text container) and three child posts (each with an image).
Users can interact (react, comment) with both parent and child posts, enabling rich engagement.

Post Structure Types

Every post has a structureType field that automatically classifies its content composition. This enables precise filtering and querying of posts based on their media content.
Posts containing a single type of content or attachment:
Structure TypeDescriptionUse Case
textText-only content, no attachmentsAnnouncements, discussions, status updates
imageOnly image attachments (1-10 images)Photo galleries, visual content
videoOnly video attachmentsVideo tutorials, recordings
audioOnly audio attachmentsPodcasts, voice messages, audio content
fileOnly file attachmentsDocument sharing, PDFs, presentations
liveStreamLive streaming contentLive broadcasts, real-time events
pollPoll/survey contentVoting, feedback collection
clipShort-form video content (up to 15 min)Quick videos, highlights
Example Query: Get only photo posts (pure images)
const posts = await PostRepository.getPosts({
  dataTypes: ['image'],
  includeMixedStructure: false // Only pure image posts
});
Structure Type: mixedPosts that combine multiple media types in a single post. A post is classified as mixed when it contains 2 or more distinct attachment types (image, video, audio, file).Examples of Mixed Posts:
  • Tutorial with images + instructional video
  • Product showcase with photos + demo video + spec sheet PDF
  • Event coverage with photos + highlight video + audio interview
  • Educational content with diagrams + explanatory video + downloadable resources
Creation: Use createMixedMediaPost() or createMixedAttachmentPost() to combine different media types.Querying: Control whether mixed posts appear in filtered results using includeMixedStructure:
// Include mixed posts that contain images
const posts = await PostRepository.getPosts({
  dataTypes: ['image'],
  includeMixedStructure: true // Includes pure + mixed with images
});
Learn more: Mixed Media Posts
Automatic Classification
  • The structureType is automatically assigned based on post attachments
  • No manual specification needed
  • Updates automatically when post is edited
Query Filtering
  • By default, single-type queries return only pure structure posts
  • Use includeMixedStructure: true to include mixed posts containing that type
  • Multi-type queries automatically include mixed posts
See Query Posts for filtering details.

Post Data Model

NameData TypeDescription
postIdStringID of the post
parentPostIdStringID of the parent post (null if parent)
postedUserIdStringID of the user who posted
targetIDStringID of the target (e.g., community, user)
targetTypeStringType of target (e.g., community, user)
dataTypeStringData type of post (text, image, video, etc.)
structureTypeStringStructure classification (text, image, video, audio, file, liveStream, poll, clip, mixed). Automatically determined based on attachments.
dataObjectData of the post
metadataObjectMetadata of the post
flagCountIntegerNumber of times the post is flagged
editedAtDateDate/time the post was edited
createdAtDateDate/time the post was created
updatedAtDateDate/time the post was updated
reactionsObjectInformation about the post reactions
reactionsCountIntegerNumber of reactions to the post
myReactionsArray of stringsReactions by the current user
commentsCountIntegerNumber of comments to the post
commentsArray of AmityCommentThe first three comments for previewing
childrenPostsObjectChild posts (e.g., images, videos)
isDeletedBooleanTrue if the post is deleted
hasFlaggedCommentBooleanTrue if the post has flagged comments
hasFlaggedChildrenBooleanTrue if the post has flagged children
tagsArray of stringsArbitrary tags for querying/filtering posts
feedIdStringID of the post’s feed

Quick Start Guide

1

Choose Post Type

Select the appropriate post type based on your content:
  • Text: For discussions and announcements
  • Image: For photo sharing and visual content
  • Video: For video content and tutorials
  • Audio: For podcasts, voice messages, and audio content
  • Clip: For short-form video content up to 15 minutes
  • Poll: For community engagement and feedback
  • File: For document sharing
  • Live Stream: For real-time broadcasts
  • Mixed Media: For combining multiple media types (images + videos + audio + files)
  • Custom: For advanced or app-specific content
2

Create Content

Use the creation guides for your chosen post type:
// Example: Creating a text post
const post = await PostRepository.createPost({
  type: 'text',
  data: {
  text: 'hello!',
  },
  targetType: 'community',
  targetId: 'community-id'
});
3

Manage Post

Use management tools to edit, delete, or moderate your posts
4

Track Performance

Monitor engagement through analytics and impression tracking