Text Posts
Simple text-based posts with formatting support
Image Posts
Photo sharing with multiple image support and filters
Video Posts
Video content with streaming and playback controls
Audio Posts
Share audio files, podcasts, and voice messages
Clip Posts
Short-form video content up to 15 minutes
File Posts
Document and file sharing capabilities
Poll Posts
Interactive polls and surveys for user engagement
Live Stream Posts
Real-time live streaming integration
Mixed Media Posts
Combine multiple media types in a single post
Custom Posts
Extend functionality with custom post types
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
Users can interact (react, comment) with both parent and child posts, enabling
rich engagement.
Post Structure Types
Every post has astructureType field that automatically classifies its content composition. This enables precise filtering and querying of posts based on their media content.
Pure Structure Types
Pure Structure Types
Posts containing a single type of content or attachment:
Example Query: Get only photo posts (pure images)
| Structure Type | Description | Use Case |
|---|---|---|
text | Text-only content, no attachments | Announcements, discussions, status updates |
image | Only image attachments (1-10 images) | Photo galleries, visual content |
video | Only video attachments | Video tutorials, recordings |
audio | Only audio attachments | Podcasts, voice messages, audio content |
file | Only file attachments | Document sharing, PDFs, presentations |
liveStream | Live streaming content | Live broadcasts, real-time events |
poll | Poll/survey content | Voting, feedback collection |
clip | Short-form video content (up to 15 min) | Quick videos, highlights |
Mixed Structure Type
Mixed Structure Type
Structure Type: Learn more: Mixed Media Posts
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
createMixedMediaPost() or createMixedAttachmentPost() to combine different media types.Querying: Control whether mixed posts appear in filtered results using includeMixedStructure:Structure Type Behavior
Structure Type Behavior
Automatic Classification
- The
structureTypeis automatically assigned based on post attachments - No manual specification needed
- Updates automatically when post is edited
- By default, single-type queries return only pure structure posts
- Use
includeMixedStructure: trueto include mixed posts containing that type - Multi-type queries automatically include mixed posts
Post Data Model
| Name | Data Type | Description |
|---|---|---|
postId | String | ID of the post |
parentPostId | String | ID of the parent post (null if parent) |
postedUserId | String | ID of the user who posted |
targetID | String | ID of the target (e.g., community, user) |
targetType | String | Type of target (e.g., community, user) |
dataType | String | Data type of post (text, image, video, etc.) |
structureType | String | Structure classification (text, image, video, audio, file, liveStream, poll, clip, mixed). Automatically determined based on attachments. |
data | Object | Data of the post |
metadata | Object | Metadata of the post |
flagCount | Integer | Number of times the post is flagged |
editedAt | Date | Date/time the post was edited |
createdAt | Date | Date/time the post was created |
updatedAt | Date | Date/time the post was updated |
reactions | Object | Information about the post reactions |
reactionsCount | Integer | Number of reactions to the post |
myReactions | Array of strings | Reactions by the current user |
commentsCount | Integer | Number of comments to the post |
comments | Array of AmityComment | The first three comments for previewing |
childrenPosts | Object | Child posts (e.g., images, videos) |
isDeleted | Boolean | True if the post is deleted |
hasFlaggedComment | Boolean | True if the post has flagged comments |
hasFlaggedChildren | Boolean | True if the post has flagged children |
tags | Array of strings | Arbitrary tags for querying/filtering posts |
feedId | String | ID 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:
3
Manage Post
Use management tools to edit, delete, or moderate your posts
4
Track Performance
Monitor engagement through analytics and impression tracking