Examples
Carousel post
Attach multiple images to one post in a fixed display order.
Scopes: media:write, posts:write, posts:publish.
There is no separate carousel content type: multiple media on a POST become a
carousel, and the slides appear in the order of the mediaIds array.
1. Import each image
Repeat POST /v1/media once per slide and collect the ids:
for url in \
"https://example.com/images/slide-1.png" \
"https://example.com/images/slide-2.png" \
"https://example.com/images/slide-3.png"; do
curl -s -X POST https://api.nimply.io/v1/media \
-H "Authorization: Bearer $NIMPLY_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"url\": \"$url\"}"
echo
doneEach call returns a media object — note down the three id values in the order you want
the slides shown.
2. Create the post with ordered mediaIds
curl -X POST https://api.nimply.io/v1/posts \
-H "Authorization: Bearer $NIMPLY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: feature-carousel-001" \
-d '{
"channelIds": ["123e4567-e89b-12d3-a456-426614174000"],
"content": "Swipe through the highlights 👉",
"contentType": "POST",
"mediaIds": [
"9f2b1c3d-5a6e-4f70-8b91-2c3d4e5f6a70",
"1b2c3d4e-5f60-4a7b-8c9d-0e1f2a3b4c5d",
"aa11bb22-cc33-4d44-8e55-ff6677889900"
],
"schedule": "2026-08-01T09:00:00.000Z"
}'The returned post echoes mediaIds in the same order — that is the slide order.
Gotchas
- Order matters:
mediaIdsis defined as "media asset ids in display order". Reorder the array to reorder the slides. contentTypestays"POST"(it's also the default) — the multiple media are what make it a carousel.- Media assets are reusable: the same media id can appear in many posts, so you don't need to re-import shared brand assets per post.