Use this when a customer wants to publish several images under one post. Upload each image by file or URL first, then create the post with multiple file IDs.
// Option 1: Upload images from files
POST /v1/files
Authorization: Bearer YOUR_API_KEY
Content-Type: multipart/form-data
file=@image1.jpg
file=@image2.jpg
// Example response
{
"files": [
{ "id": "file_1" },
{ "id": "file_2" }
]
}
// Option 2: Upload an image from a public URL
POST /v1/files
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"url": "https://example.com/image1.jpg"
}
// Repeat for each URL and collect the returned file IDs.
// Create one post with multiple images
POST /v1/posts
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"content": "New collection from Asia Lifestyle Magazine",
"platforms": ["instagram", "linkedin"],
"media": [
{ "file_id": "file_1" },
{ "file_id": "file_2" }
]
}