Carousels & Infographics
Edit carousel slide
Edits one slide (or, for an infographic, the single canvas at slideIndex 0) via a natural-language instruction. Postiv's slide-edit agent rewrites the HTML; saves as a new carousel version.
POST
/api/public/carousels/:id/edit-slidecURLPOST /api/public/carousels/:id/edit-slide
curl -X POST https://postiv.ai/api/public/carousels/ID_ID/edit-slide \
-H "Authorization: Bearer pk_postiv_..." \
-H "Content-Type: application/json" \
-d '{
"slideIndex": 123,
"instruction": "..."
}'200Response
{
"success": true,
"carouselId": "car1...",
"versionId": "cv2...",
"versionNumber": 2,
"slideIndex": 0,
"deduped": false,
"summary": "Shortened the headline and darkened the background",
"slide": {
"index": 0,
"title": "5 Content Mistakes",
"textPreview": "Most B2B content fails..."
}
}Authorization
Requires an organization API key with the posts:write scope, sent as Authorization: Bearer or x-api-key.
Path parameters
idstringrequiredResource id from the corresponding list or create endpoint.
Body parameters
slideIndexintrequired0-based.
instructionstringrequired1-4000 chars, e.g. 'shorten the headline to 5 words'.
Response
The edit result.
carouselIduuidversionId / versionNumbermixedNew version unless deduped.
slideIndexintdedupedbooleantrue if the edit produced no meaningful change: no new version was saved.
summarystringAgent's own summary of what changed.
slide.index / title / textPreviewmixedErrors
| 400 | missing_instruction / invalid_slide_index / slide_not_editable |
| 404 | carousel_not_found / slide_not_found |
| 409 | carousel_locked: carousel is scheduled/published; unschedule first |
| 409 | carousel_version_conflict: carousel changed concurrently during the edit; re-read and retry |
Good to know
- Only one slide per call. Takes 15-90+ seconds; the route timeout is 180s to allow a validation-repair retry on large imported-style slides (up to 24k output tokens).