Posttar API

Brand DNA

6 endpoints for brand dna, with parameters and a real response example.

GET/projects/{id}/dna

Get a project's brand DNA

Returns every field of the project's brand DNA, the same set the app's DNA screen shows: what the business is and who it speaks to, tone of voice, the language Posttar writes in, image and design style, fonts, colors and background texture, the caption footer, how many slides a carousel starts with, which layouts generation may use, and the name, @, photo and logo that sign the artwork. photoUrl is the photo in use on the artwork: the override if there is one, otherwise the connected Instagram account's photo. photoOverride is what POST /projects/{id}/brand/photo writes (null means the account's photo applies). identity is the name, @ and photo that sign the artwork right now. logoUrl is the first palette's logo, the one /brand/logo writes. colors and textColor are the colors the brand chose; a default the brand never picked comes back as null even though the artwork still has a color. It also carries, in options, the catalog of fonts, image styles, design styles and textures this project can choose from, which is where the valid values for PATCH /projects/{id}/dna come from. Read this before writing: it is the only place those keys exist.

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

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "projectName": "Projeto de teste",
  "description": "A Posttar é uma ferramenta da VINTTI Soluções Digitais que automatiza a criação, personalização, agendamento e publicação de carrosséis no Instagram. Gera textos e imagens, revi...",
  "targetAudience": "Pessoas, marcas e empresas que querem manter constância no Instagram, mas não têm tempo, equipe ou conhecimento para criar carrosséis. Fala especialmente com empreendedores, neg...",
  "contentPreferences": "Priorizar conteúdos práticos sobre crescimento no Instagram, constância, automação, criação de carrosséis, identidade visual, geração de leads e produtividade. Mostrar como a fe...",
  "toneOfVoice": "Escreva em português, de forma direta, simples e comercial, com frases curtas e foco no benefício. Use linguagem acessível, evitando excesso de termos técnicos. Fale com quem qu...",
  "instagramSwitch": null,
  "imageStyle": "modern",
  "titleFont": null,
  "bodyFont": null,
  "colors": {
    "brand": "#3C50DD",
    "background": "#FDFDFF"
  },
  "photoUrl": "https://.../post-images/profiles/c85848ba/17841400000000000.jpg",

PATCH/projects/{id}/dna

Update a project's brand DNA

Changes any field of the brand DNA, the same set the app's DNA screen writes. Saves only the fields sent; anything omitted stays exactly as it is. Text is replaced in full, never merged, and the four that describe the brand (description, targetAudience, contentPreferences, toneOfVoice) refuse an empty value instead of erasing it: clearing those is done on the DNA screen, where you see what you are clearing. captionSuffix, profileNameOverride and profileHandleOverride are the opposite, and an empty string CLEARS them, which is how you remove a footer or go back to the connected account's name. Colors must be hex. Applies to what Posttar generates from now on: no existing post, caption, or slide text is rewritten, and an already published post never changes.

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.
descriptionbodystringmax 5000 charsWhat the business is and what it sells, up to 5000 characters. Replaced in full; an empty value is refused instead of erasing it.
targetAudiencebodystringmax 5000 charsWho the posts speak to, up to 5000 characters.
contentPreferencesbodystringmax 2000 charsWhat to write about, and what to avoid, up to 2000 characters.
toneOfVoicebodystringmax 5000 charsHow it should sound, up to 5000 characters. It is an instruction to the writer, not a sample.
imageStylebodystringA key from options.imageStyles in GET /projects/{id}/dna.
titleFontbodystringA font from options.fonts in GET /projects/{id}/dna.
bodyFontbodystringA font from options.fonts in GET /projects/{id}/dna.
brandColorbodystringThe brand color, as #rrggbb.
backgroundColorbodystringThe posts' background, as #rrggbb. It is the BACKGROUND of the artwork, and not an accent color.
textColorbodystringThe artwork's text color, as #rrggbb. Like the two above, it goes into the project's FIRST palette, even when the project has more than one; the others stay as they are (otherPalettes in the response says how many). With palette alternation off (useMultiPalette), the first palette is the only one the posts use; with it on, the slides alternate between all of them, so new posts mix the new color with the old ones.
profileTypebody"personal" | "business"Whether the profile is a person or a company.
profileNamebodystringmax 100 charsThe profile's or company's name, up to 100 characters. Not the project's display name, which PATCH /projects/{id} changes.
profileLanguagebody"pt" | "en" | "es"The language Posttar writes in for this project: captions, scripts and narration. Without it, Portuguese.
captionSuffixbodystringmax 2000 charsText added to the end of every generated caption, up to 2000 characters. Send an empty string to remove it.
profileNameOverridebodystringmax 100 charsThe name printed on the artwork, up to 100 characters. Empty goes back to the connected Instagram account's name.
profileHandleOverridebodystringmax 60 charsThe @ printed on the artwork, up to 60 characters. Empty goes back to the connected account's.
includeHashtagsbodybooleanWhether Posttar looks for hashtags and puts them in the caption.
allowUnlicensedImagesbodybooleanWhether image search may use pictures without a free license. With it off, only free-licensed ones. With it on, the rights to use what it finds are yours.
useAccentColorbodybooleanWhether the artwork uses the accent color.
useMultiPalettebodybooleanWhether the project keeps more than one palette. With it off, the brand colors drive a single palette.
backgroundTexturebody"none" | "dotted-grid" | "lined-grid" | "diagonal-hatch" | "mesh-gradient" | "vignette" | "topographic" | nullThe slides' background pattern, from options.textures in GET /projects/{id}/dna. Null goes back to the design style's own.
designPresetbodystringmax 50 charsThe project's design style, a key from options.designPresets in GET /projects/{id}/dna. Changing it RESETS the allowed layouts, because a layout id belongs to one style.
defaultSlideCountbodyinteger | nullHow many slides a carousel is born with, 1 to 10. Null lets the writer choose post by post.
allowedLayoutsModebody"all" | "with_images" | "specific"Which layouts generation may use: all, with_images (only layouts that carry a picture) or specific (only the ones in allowedLayoutIds).
allowedLayoutIdsbodystring[]max 200 itemsLayout ids, as returned by GET /slides/{id}/layouts. Only used with allowedLayoutsMode: "specific". An id that does not exist is refused, never ignored.
acknowledgeInstagramSwitchbodytrueSend true once the brand DNA has been reviewed after the Instagram account was switched. Editing the description, audience, content preferences or tone of voice clears the notice too.

Response

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "changed": [],
  "palette": "updated",
  "paletteName": "Default",
  "otherPalettes": 0
}

GET/projects/{id}/palettes

List color palettes

Posttar's ready-made color palettes, each with the key POST /projects/{id}/palettes/apply accepts, plus the colors this project uses today.

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

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "ready": [
    {
      "key": "green",
      "brandColor": "#099250",
      "schemes": [
        {
          "name": "Default",
          "brandColor": "#099250",
          "backgroundColor": "#F6FEF9",
          "textColor": "#1D2939"
        },
        {
          "name": "Dark background",
          "brandColor": "#3CCB7F",

POST/projects/{id}/palettes/apply

Apply a color palette

Replaces the brand's colors with one of the ready-made palettes (or the project's own brand color hex), preserving the logo. Applies to what Posttar generates from now on; an already published post never changes.

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.
keyrequiredbodystringA key from ready in GET /projects/{id}/palettes (green, blue...), or that palette's brandColor hex. The project's own current color does not work: it is not one of the nine ready-made palettes.

Response

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "palette": "green",
  "replaced": 1,
  "created": 3,
  "logoKept": true,
  "usesMoreThanOnePalette": false
}

POST/projects/{id}/brand/photo

Set the brand's round photo

Replaces the round photo shown in the header of the slides. url must already be in Posttar's public bucket. What this writes is photoOverride in GET /projects/{id}/dna; photoUrl there is the photo in use. Applies to what is generated from now on.

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.
urlrequiredbodystringmax 500 charsMust be in our public bucket. This becomes photoOverride in GET /projects/{id}/dna; the one in use right now is photoUrl there. Any image URL this API hands you (a post's mediaUrls, a slide render) is already in the bucket.

Response

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "url": "https://.../post-images/posts/c85848ba/ee1e8a72_slide_1_render.png"
}