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

Slide Type Requirements

  • Exactly 1 starting_slide (required)
  • At least 1 body_slide (required)
  • Exactly 1 ending_slide (required)

Example Request

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"
        }
    ]
}'

Response

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