Posttar API

Slides

8 endpoints for slides, with parameters and a real response example.

PATCH/slides/{id}

Update a slide's fields

Changes one or more text fields of a single slide: title, body, or any other text field the slide's layout has. Use GET /posts/{id} first: the names and current values are in content.slides[].fields, and ONLY those are accepted here. What sits in content.slides[].design is not editable through this endpoint and is refused: on a premium carousel or an infographic the slide is a finished image (use POST /slides/{id}/reimagine), and the free-layout geometry has no text to change. A slide with fields: [] has nothing for this call. Does not change color, font, texture (POST /slides/{id}/style) or the photo.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
fieldsrequiredbodyobjectField name to new value, only for fields the slide's layout accepts. Values are text, up to 2200 characters each, at most 20 fields per request.

Response

{
  "slideId": "d32ab31a-073e-471f-8d7a-d145c587e653"
}

DELETE/slides/{id}

Delete a slide

Removes a slide from the carousel and renumbers the rest. Deleting the only remaining slide is rejected: a carousel needs at least one.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.

Response

{
  "postId": "d9af393d-efcf-4083-b446-15a158eac89c",
  "slideId": "b4dfcd93-31b8-4a9e-a7ed-e6fb38781c29",
  "totalSlides": 8,
  "media": "synced"
}

POST/slides/{id}/style

Update a slide's visual style

Changes the font, colors (background, text, brand), or background texture of a single slide, never the whole post and never the project's brand. Send only the fields that need to change; colors must be hex (#rrggbb).

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
titleFontbody"Inter" | "Poppins" | "Sora" | "Manrope" | "Space Grotesk" | "Fraunces" | "Instrument Serif" | "Bebas Neue" | "JetBrains Mono" | "Permanent Marker" | "Caveat"One of Posttar's fonts. The same list is in options.fonts of GET /projects/{id}/dna.
bodyFontbody"Inter" | "Poppins" | "Sora" | "Manrope" | "Space Grotesk" | "Fraunces" | "Instrument Serif" | "Bebas Neue" | "JetBrains Mono" | "Permanent Marker" | "Caveat"One of Posttar's fonts.
backgroundColorbodystringThis slide's background, as #rrggbb. Only this slide, never the project.
textColorbodystringThis slide's text color, as #rrggbb.
brandColorbodystringThis slide's accent color, as #rrggbb.
texturebody"none" | "dotted-grid" | "lined-grid" | "diagonal-hatch" | "mesh-gradient" | "vignette" | "topographic"The slide's background pattern. none removes it.

Response

{
  "slideId": "d32ab31a-073e-471f-8d7a-d145c587e653"
}

GET/slides/{id}/layouts

List a slide's layouts

The layouts this slide can switch to, with the id that POST /slides/{id}/variant expects. Only layouts from the same family as the current one: that is what keeps a carousel looking like one piece. A slide with no layout (the premium carousel and the infographic are finished images) answers invalid_state and points to POST /slides/{id}/reimagine instead of an empty list, because empty would read as "no layouts" when the truth is "this format has none".

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
localequery"pt" | "en" | "es"The language of the NAMES this endpoint returns (the catalog of styles, the layout names). It does not translate your content. Defaults to English, which is the API default.

Response

{
  "slideId": "d32ab31a-073e-471f-8d7a-d145c587e653",
  "currentLayout": "0f9f4b1e-8a2c-4a0e-9d37-5c9a1b2e7f10",
  "layouts": [
    {
      "id": "0f9f4b1e-8a2c-4a0e-9d37-5c9a1b2e7f10",
      "name": "Headline and body",
      "description": "A title at the top and a paragraph below it.",
      "inUse": true
    },
    {
      "id": "2b7d4e91-3c10-4f6a-8e55-1a0d9c3b7e22",
      "name": "Big number",
      "description": "One figure filling the slide, with a short label.",
      "inUse": false
    }
  ]
}

POST/slides/{id}/variant

Change a slide's layout

Swaps a single slide's layout variant for another one from the catalog.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
layoutIdrequiredbodystringA layout id from GET /slides/{id}/layouts. Only layouts of the same family as the current one appear there.

Response

{
  "slideId": "d32ab31a-073e-471f-8d7a-d145c587e653"
}

POST/slides/{id}/reimagine

Reimagine a slide with AI

Only for the formats whose slide is a finished image (premium_carousel and infographic), where the whole slide is AI-designed and the text is baked into the image, so there is no field for PATCH /slides/{id} to change. Describe the change in one sentence and the slide is redesigned, preserving the rest. Limited edits per carousel; GET /posts/{id}/edit-budget reports how many remain. Not for twitter_carousel: use PATCH /slides/{id}/tweet there instead, which is free.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
instructionrequiredbodystringmax 500 charsThe change, in one sentence, up to 500 characters. It is a CHANGE and not a briefing: the rest of the slide is preserved.

Response

{
  "slideId": "8c0b14d6-d9ad-48f2-8c10-4b7bbcd8dcbc",
  "url": "https://.../post-images/ai-edits/11ddc1b3/0b13691b.webp",
  "used": 1,
  "cap": 2,
  "remaining": 1
}

PATCH/slides/{id}/tweet

Edit a Twitter Carousel slide

Only for twitter_carousel slides, which are a rendered image of a tweet rather than a template with fields, so PATCH /slides/{id} has nothing to change there. Send a new text (up to 280 characters), clear the image with imageUrl: null, or both. Free, and does not touch the image-edit budget that POST /slides/{id}/reimagine spends.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
textbodystringmax 280 charsThe slide's new tweet text, up to 280 characters. Only twitter_carousel slides take this endpoint; every other format uses PATCH /slides/{id}.
imageUrlbodystring | nullA Posttar-hosted image address for the slide. Null removes it. Anywhere else is refused.

Response

{
  "slideId": "b4dfcd93-31b8-4a9e-a7ed-e6fb38781c29",
  "url": "https://.../post-images/twitter-carousel/b4dfcd93/6f2a9d10.png"
}

DELETE/slides/{id}/tweet

Delete a tweet slide

Removes one slide from a twitter_carousel post and renumbers the rest, the same rule as DELETE /slides/{id}: a carousel needs at least one slide left. Free.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.

Response

{
  "removed": "b4dfcd93-31b8-4a9e-a7ed-e6fb38781c29"
}