Create specialized content types beyond standard posts with flexible schemas and structured data. Perfect for e-commerce, real estate, events, or any unique use case requiring custom rendering.

Flexible Schema

Define your own data structure with up to 100KB JSON payload

Custom Rendering

Full control over how content appears in feeds and apps

Overview

Custom posts enable you to create specialized content types beyond standard text, image, video, and file posts. Build unique experiences for e-commerce, events, real estate, or any structured content that requires custom rendering.

Key Features

Flexible Schema

Define your own data structure

Custom Rendering

Full control over appearance

Rich Metadata

Include complex structured data

Large Payload

Up to 100KB of custom data
1

Design Schema

Define your custom data structure and required fields
2

Create Post

Use the custom dataType and structured JSON data
3

Implement Rendering

Build custom UI components to display your content
The dataType parameter must have the custom prefix (e.g., “custom.recipe”, “custom.product”).

Parameters

ParameterTypeRequiredDescription
dataTypeStringYesCustom type identifier (must start with “custom”)
dataObjectYesFree-form JSON object with your custom structure
textStringNoOptional text content
targetTypeEnumYesTarget destination (community or user feed)
tagsArrayNoSearchable tags
metadataObjectNoAdditional properties
let builder = AmityCustomPostBuilder()
builder.setDataType("custom.mycustomtype") // Data type should be in this pattern custom.*
builder.setData([
    "favourite_color" : "Red",
    "favourite_food" : "Pizza"
])

// Create a post from builder
do {
    let post = try await postRepository.createCustomPost(builder, targetId: "feed-id", targetType: .community, metadata: nil, mentionees: nil)
} catch {
    // Handle error here
}

Data Structure Examples

When designing custom post types, consider how they’ll appear in feeds on different platforms and devices. Always include meaningful text content as a fallback for better accessibility and user experience.

Best Practices

Troubleshooting

Common Use Cases

E-commerce

Product listings with prices, specs, inventory, and ratings

Real Estate

Property listings with location, amenities, and pricing details

Events

Event details with dates, locations, speakers, and registration

Job Postings

Job listings with requirements, benefits, and application info

Recipes

Cooking instructions with ingredients and nutritional information

Reviews

Structured reviews with ratings, pros/cons, and recommendations

Industry-Specific Examples

Schema Design Tip: Include version fields in your data structure to support schema evolution as your custom post types mature and require updates.