EmbedEmbed APIInitiate a PostImport

Initiate Import

POST /post/initiate/import

Creates a carousel post by importing your own slide content.

Headers

  • Content-Type: application/json
  • embed-api-key: your-api-key-here (required)

Request Body

FieldTypeRequiredDescriptionAllowed Values
postTypestringYesType of post to generate"CAROUSEL"
requestorIdstringNoCustom identifier for trackingAny string
templateIdstringYesID of the template to useValid template ID
brandIdstringYesID of the brand configurationValid brand ID
responseTypestringNoOutput format (default: “PDF”)"PDF", "PNG"
slidesarrayYesArray of slide objectsSee slide structure below

Slide Structure

Each slide must have the following structure:

FieldTypeRequiredDescriptionAllowed Values
typestringYesType of slide"starting_slide", "body_slide", "ending_slide"
headingstringYesMain heading textAny string
sub_headingstringNoSubtitle textAny string
descriptionstringNoDescription textAny string
imagestringNoImage URLValid URL
background_imagestringNoBackground image URLValid URL
cta_buttonstringNoCall-to-action button textAny string
layoutTypestringNoSlide layout type"default", "infographics"
layoutConfigstringNoInfographics configurationLayout Configuration
Layout Configuration (Infographics)
FieldTypeRequiredDescriptionAllowed Values
columnCountnumberYesNumber of columns to display1, 2, and 3
columnDisplaystringYesTo show cyclical or grid layout for infographic"cycle", "grid"
displayCounterAsstringYesDisplay counter?"none", "counter"
hasHeaderbooleanYesDisplay header for each columntrue, false
columnDataarrayNoArray of column dataColumn Data
Infographics Column Data
FieldTypeRequiredDescriptionAllowed Values
headerstringYesColumn header"cycle", "grid"
contentarrayYesContains column data{"title: <content_title>, "description": <content_description>}

Important Information!

  • Exactly 1 starting_slide (required)
  • At least 1 body_slide (required)
  • Exactly 1 ending_slide (required)
  • Column Count should not exceed 3
  • Layout Type set as infographics will replace the image
  • Column Display can either be set as cycle or grid
  • Cyclical Infographic accepts data in the first column, so no need to add information in two or three

Example Requests

Default

curl --location 'https://embed-api.postnitro.ai/post/initiate/import' \
--header 'Content-Type: application/json' \
--header 'embed-api-key: pn-plnnepb6v9omx2ik88v793ak' \
--data '{
    "postType": "CAROUSEL",
    "requestorId": "null",
    "templateId": "xtrnxgfgk9a08tmsz2601k1c",
    "brandId": "cmdhb8oe10006v0pmh6a4no6t",
    "responseType": "PNG",
    "slides": [
        {
            "type": "starting_slide",
            "sub_heading": "My Awesome Subtitle",
            "heading": "Welcome to the Carousel!",
            "description": "This is how you start with a bang.",
            "cta_button": "Swipe to learn more",
            "background_image": "https://example.com/background1.jpg"
        },
        {
            "type": "body_slide",
            "heading": "Section 1: The Core Idea",
            "description": "Explain your first key point here. This point might have multiple lines too.",
            "image": "https://example.com/image1.jpg"
        },
        {
            "type": "body_slide",
            "heading": "Section 2: Deeper Dive",
            "description": "More details for the second point.",
            "image": "https://example.com/image2.png"
        },
        {
            "type": "ending_slide",
            "sub_heading": "Ready to Act?",
            "heading": "Get Started Today!",
            "description": "A final encouraging message.",
            "cta_button": "Visit Our Website",
            "image": "https://example.com/logo.png",
            "background_image": "https://example.com/background2.jpg"
        }
    ]
}'

With Infographics

curl --location 'https://embed-api.postnitro.ai/post/initiate/import' \
--header 'Content-Type: application/json' \
--header 'embed-api-key: pn-plnnepb6v9omx2ik88v793ak' \
--data '{
    "postType": "CAROUSEL",
    "requestorId": "null",
    "templateId": "xtrnxgfgk9a08tmsz2601k1c",
    "brandId": "cmdhb8oe10006v0pmh6a4no6t",
    "responseType": "PNG",
    "slides": [
        {
            "type":"starting_slide",
            "sub_heading":"Import API Feature",
            "heading":"PostNitro Infographics",
            "description":"Create stunning visual carousels with structured data using PostNitro's powerful infographics feature.",
            "cta_button":"Learn More",
            "background_image":"https://example.com/postnitro-bg.jpg"
        },
        {
            "type":"body_slide",
            "heading":"Grid Layout Infographics",
            "description":"Display multiple data points in an organized grid format with PostNitro's flexible column system.",
            "layoutType":"infographic",
            "layoutConfig":{
                "columnCount":2,
                "columnDisplay":"grid",
                "displayCounterAs":"counter",
                "hasHeader":true,
                "columnData":[
                {
                    "header":"Layout Options",
                    "content":[
                        {
                            "title":"Grid Display",
                            "description":"Organize content in structured columns for easy comparison and readability."
                        },
                        {
                            "title":"Counter Support",
                            "description":"Add numbered counters to help users follow the sequence of information."
                        }
                    ]
                },
                {
                    "header":"Customization",
                    "content":[
                        {
                            "title":"Column Headers",
                            "description":"Enable or disable headers for each column to match your content structure."
                        },
                        {
                            "title":"Flexible Columns",
                            "description":"Choose between 1, 2, or 3 columns to fit your data presentation needs."
                        }
                    ]
                }
                ]
            }
        },
        {
            "type":"body_slide",
            "heading":"Standard Content Slides",
            "description":"Mix infographics with traditional image-based slides for comprehensive storytelling with PostNitro.",
            "image":"https://skfhtbmyanoeqbvrtxqa.supabase.co/storage/v1/object/public/media/static/postnitro-on-the-moon.png"
        },
        {
            "type":"body_slide",
            "heading":"Cyclical Infographics",
            "description":"Perfect for step-by-step processes or sequential information using PostNitro's cycle display.",
            "layoutType":"infographic",
            "layoutConfig":{
                "columnCount":1,
                "columnDisplay":"cycle",
                "displayCounterAs":"counter",
                "hasHeader":true,
                "columnData":[
                {
                    "header":"Implementation Steps",
                    "content":[
                        {
                            "title":"Set Layout Type",
                            "description":"Configure layoutType as 'infographic' to enable structured data display."
                        },
                        {
                            "title":"Choose Display Mode",
                            "description":"Select 'cycle' for sequential presentation or 'grid' for comparative layout."
                        },
                        {
                            "title":"Add Column Data",
                            "description":"Structure your content with titles and descriptions for each data point."
                        },
                        {
                            "title":"Configure Options",
                            "description":"Set column count, headers, and counters to match your presentation needs."
                        }
                    ]
                }
                ]
            }
        },
        {
            "type":"ending_slide",
            "sub_heading":"Start Creating Today",
            "heading":"Try PostNitro Infographics",
            "description":"Transform your data into engaging visual carousels with PostNitro's Import API.",
            "cta_button":"Get Your API Key"
        }
    ]
}'

Example Carousel Output

Response

{
    "success": true,
    "message": "CAROUSEL generation initiated",
    "data": {
        "embedPostId": "post123",
        "status": "PENDING"
    }
}