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
Field | Type | Required | Description | Allowed Values |
---|---|---|---|---|
postType | string | Yes | Type of post to generate | "CAROUSEL" |
requestorId | string | No | Custom identifier for tracking | Any string |
templateId | string | Yes | ID of the template to use | Valid template ID |
brandId | string | Yes | ID of the brand configuration | Valid brand ID |
responseType | string | No | Output format (default: “PDF”) | "PDF" , "PNG" |
slides | array | Yes | Array of slide objects | See slide structure below |
Slide Structure
Each slide must have the following structure:
Field | Type | Required | Description | Allowed Values |
---|---|---|---|---|
type | string | Yes | Type of slide | "starting_slide" , "body_slide" , "ending_slide" |
heading | string | Yes | Main heading text | Any string |
sub_heading | string | No | Subtitle text | Any string |
description | string | No | Description text | Any string |
image | string | No | Image URL | Valid URL |
background_image | string | No | Background image URL | Valid URL |
cta_button | string | No | Call-to-action button text | Any 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"
}
}