Tuti APIPortal

Update the branding

Set the portal's and its docs' look. Fields left out stay as they are; a list sent replaces the list.

Needs a read + write key.

PATCH/branding

Authorization Bearer token

Body

application/json · object · required

  • logostring · nullable · at least 1 character

    The portal's logo: the id of one of the images uploaded in the app, null to remove

  • logoDarkstring · nullable · at least 1 character

    Shown instead of the logo in dark mode; without it the logo shows in both: the id of one of the images uploaded in the app, null to remove

  • faviconstring · nullable · at least 1 character

    The portal's favicon: the id of one of the images uploaded in the app, null to remove

  • colorstring · nullable · matches ^#[0-9a-f]{6}$

    The accent colour, #rrggbb; null for the brand green

  • headerLinksarray of object · at most 5 items

    Links in the portal's header, up to 5 https links (replaces the list)

    Show 2 properties
    • labelstring · 1–40 charactersrequired

      What it says, up to 40 characters

    • urlstring · at most 500 charactersrequired

      Where it goes: a full https:// address

  • footerLinksarray of object · at most 5 items

    Links in the portal's footer, up to 5 https links (replaces the list)

    Show 2 properties
    • labelstring · 1–40 charactersrequired

      What it says, up to 40 characters

    • urlstring · at most 500 charactersrequired

      Where it goes: a full https:// address

  • poweredByboolean

    Whether the footer says "Powered by tuti". false needs a licence for the project; where plans are sold, as on tuti.so, the "Powered by tuti" add-on on its paid plan instead

  • contentActionsobject

    What readers can do with an article: each true or false

    Show 5 properties
    • menuboolean

      The “Copy page” menu at all

    • copyMarkdownboolean

      Copy as Markdown, in the menu

    • chatGptboolean

      Open in ChatGPT, in the menu

    • claudeboolean

      Open in Claude, in the menu

    • updatedDateboolean

      The article's “Updated” date

  • docsHomeobject

    The docs' home: a title and subtitle at its top, empty for the defaults, and its popular articles

    Show 3 properties
    • titlestring · at most 80 characters

      The title at its top; empty for the default; up to 80 characters

    • subtitlestring · at most 200 characters

      The subtitle under it; empty for the default; up to 200 characters

    • popularboolean

      Whether each tab's overview lists its most-read articles, once there are three (on for new projects)

  • colorSchemestring

    Light or dark mode for readers who haven't picked one; system is their device's

    One of"system""light""dark"

  • themeSwitchboolean

    Whether readers get a light/dark switch in the portal's footer; off, every reader gets colorScheme, except under a path of your site, where a theme the site keeps stays

  • logoTextstring · at most 40 characters

    Text beside the logo (empty: none; without a logo, the project's name shows); up to 40 characters

  • logoLinkstring · nullable · at most 500 characters

    Where the logo goes, an https address; null for the portal's home

  • sidebarLinksarray of object · at most 5 items

    Links above the docs' tree, up to 5 (replaces the list)

    Show 2 properties
    • labelstring · 1–40 charactersrequired

      What it says, up to 40 characters

    • urlstring · at most 500 charactersrequired

      Where it goes: a full https:// address

  • seoobject

    The portal's search listing, and how it shows where it's shared

    Show 2 properties
    • titlestring · at most 70 characters

      Its title; empty for the project's name; up to 70 characters

    • descriptionstring · at most 160 characters

      Its description; up to 160 characters

  • seoImagestring · nullable · at least 1 character

    The image a link to the portal shows: the id of one of the images uploaded in the app, null to remove

  • fontsobject

    Fonts for headings and for text, from the portal fonts; null for the page's own

    Show 2 properties
    • headingstring · nullable

      For headings

      One of"inter""roboto""open-sans""lato""montserrat""poppins""source-sans-3""nunito""work-sans""dm-sans""manrope""ibm-plex-sans""space-grotesk""merriweather""lora""playfair-display"

    • bodystring · nullable

      For text

      One of"inter""roboto""open-sans""lato""montserrat""poppins""source-sans-3""nunito""work-sans""dm-sans""manrope""ibm-plex-sans""space-grotesk""merriweather""lora""playfair-display"

  • customCssstring · at most 50000 characters

    The team's CSS, on every portal page; up to 50000 characters

  • customHtmlstring · at most 50000 characters

    The team's HTML, scripts too, at the end of each page, only where the portal is on your own domain or a path of your site: never on its Tuti address, in the widget or on the app's own domain; up to 50000 characters

Responses

  • 200The portal's branding, as changed

    application/json · Branding

    The portal's branding, as changed

    • logoUploadedImage · nullablerequired

      The portal's logo

      Show 4 properties
      • idstringrequired

        The upload's id

      • urlstringrequired

        A lasting link to the image

      • widthintegerrequired

        Its width in pixels

      • heightintegerrequired

        Its height in pixels

    • logoDarkUploadedImage · nullablerequired

      Shown instead of the logo in dark mode; without it the logo shows in both

      Show 4 properties
      • idstringrequired

        The upload's id

      • urlstringrequired

        A lasting link to the image

      • widthintegerrequired

        Its width in pixels

      • heightintegerrequired

        Its height in pixels

    • faviconUploadedImage · nullablerequired

      The portal's favicon

      Show 4 properties
      • idstringrequired

        The upload's id

      • urlstringrequired

        A lasting link to the image

      • widthintegerrequired

        Its width in pixels

      • heightintegerrequired

        Its height in pixels

    • colorstring · nullablerequired

      The accent colour, #rrggbb; null for the brand green

    • headerLinksarray of PortalLinkrequired

      Links in the portal's header

      Show 2 properties
      • labelstringrequired

        What it says

      • urlstringrequired

        Where it goes: a full https:// address

    • footerLinksarray of PortalLinkrequired

      Links in the portal's footer

      Show 2 properties
      • labelstringrequired

        What it says

      • urlstringrequired

        Where it goes: a full https:// address

    • poweredBybooleanrequired

      Whether the footer says "Powered by tuti": always, unless it was turned off (poweredBy false) on a project with a licence or the add-on

    • contentActionsobjectrequired

      What readers can do with an article

      Show 5 properties
      • menubooleanrequired

        The “Copy page” menu at all

      • copyMarkdownbooleanrequired

        Copy as Markdown, in the menu

      • chatGptbooleanrequired

        Open in ChatGPT, in the menu

      • claudebooleanrequired

        Open in Claude, in the menu

      • updatedDatebooleanrequired

        The article's “Updated” date

    • docsHomeobjectrequired

      The docs' home

      Show 3 properties
      • titlestring · at most 80 charactersrequired

        The title at its top; empty for the default; up to 80 characters

      • subtitlestring · at most 200 charactersrequired

        The subtitle under it; empty for the default; up to 200 characters

      • popularbooleanrequired

        Whether each tab's overview lists its most-read articles, once there are three (on for new projects)

    • colorSchemestringrequired

      Light or dark mode for readers who haven't picked one; system is their device's

      One of"system""light""dark"

    • themeSwitchbooleanrequired

      Whether readers get a light/dark switch in the portal's footer; off, every reader gets colorScheme, except under a path of your site, where a theme the site keeps stays

    • logoTextstringrequired

      Text beside the logo (empty: none; without a logo, the project's name shows)

    • logoLinkstring · nullablerequired

      Where the logo goes, an https address; null for the portal's home

    • sidebarLinksarray of PortalLinkrequired

      Links above the docs' tree

      Show 2 properties
      • labelstringrequired

        What it says

      • urlstringrequired

        Where it goes: a full https:// address

    • seoobjectrequired

      The portal's search listing, and how it shows where it's shared

      Show 2 properties
      • titlestring · at most 70 charactersrequired

        Its title; empty for the project's name; up to 70 characters

      • descriptionstring · at most 160 charactersrequired

        Its description; up to 160 characters

    • seoImageUploadedImage · nullablerequired

      The image a link to the portal shows

      Show 4 properties
      • idstringrequired

        The upload's id

      • urlstringrequired

        A lasting link to the image

      • widthintegerrequired

        Its width in pixels

      • heightintegerrequired

        Its height in pixels

    • fontsobjectrequired

      Fonts for headings and for text, from the portal fonts; null for the page's own

      Show 2 properties
      • headingstring · nullablerequired

        For headings

        One of"inter""roboto""open-sans""lato""montserrat""poppins""source-sans-3""nunito""work-sans""dm-sans""manrope""ibm-plex-sans""space-grotesk""merriweather""lora""playfair-display"

      • bodystring · nullablerequired

        For text

        One of"inter""roboto""open-sans""lato""montserrat""poppins""source-sans-3""nunito""work-sans""dm-sans""manrope""ibm-plex-sans""space-grotesk""merriweather""lora""playfair-display"

    • customCssstringrequired

      The team's CSS, on every portal page

    • customHtmlstringrequired

      The team's HTML, scripts too, at the end of each page, only where the portal is on your own domain or a path of your site: never on its Tuti address, in the widget or on the app's own domain

  • 400The request isn't valid: a field is missing, has the wrong type or is out of range, or the body isn't a JSON object. The message names the field.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 401No API key was sent, or it isn't valid: it was revoked, or whoever created it left the team.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 403It isn't allowed: the key is read-only, its creator isn't a project owner or admin where only they may, only a person can do it in the app, a setting is off, or someone's address isn't confirmed. The code says which.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 409It can't be done as things are now: for example the post was merged, or someone changed it meanwhile. The code says which.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 429Too many requests: past 600 a minute per key, try again after the seconds in the Retry-After header. Some operations have limits of their own (their description gives them), whose 429 has no Retry-After.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

  • 500Something went wrong on Tuti's side. Try again in a moment.

    application/json · Error

    • errorobjectrequired
      Show 2 properties
      • codestringrequired

        What went wrong, for code to check: stays the same

      • messagestringrequired

        What went wrong, for a person: may change

curl 'https://tuti.so/api/v1/branding' \
  --request PATCH \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "color": "#5b21b6",
  "headerLinks": [
    {
      "label": "Docs",
      "url": "https://docs.example.com"
    }
  ],
  "footerLinks": [
    {
      "label": "Privacy",
      "url": "https://example.com/privacy"
    }
  ],
  "poweredBy": false
}'
const response = await fetch("https://tuti.so/api/v1/branding", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "color": "#5b21b6",
    "headerLinks": [
      {
        "label": "Docs",
        "url": "https://docs.example.com"
      }
    ],
    "footerLinks": [
      {
        "label": "Privacy",
        "url": "https://example.com/privacy"
      }
    ],
    "poweredBy": false
  }),
});
const text = await response.text();
import requests

response = requests.patch(
    "https://tuti.so/api/v1/branding",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    data="{\n  \"color\": \"#5b21b6\",\n  \"headerLinks\": [\n    {\n      \"label\": \"Docs\",\n      \"url\": \"https://docs.example.com\"\n    }\n  ],\n  \"footerLinks\": [\n    {\n      \"label\": \"Privacy\",\n      \"url\": \"https://example.com/privacy\"\n    }\n  ],\n  \"poweredBy\": false\n}",
)
print(response.text)
{
  "logo": {
    "id": "cm3media0001",
    "url": "https://media.example.com/cm3media0001/480.webp",
    "width": 480,
    "height": 120
  },
  "logoDark": {
    "id": "cm3media0001",
    "url": "https://media.example.com/cm3media0001/480.webp",
    "width": 480,
    "height": 120
  },
  "favicon": {
    "id": "cm3media0001",
    "url": "https://media.example.com/cm3media0001/480.webp",
    "width": 480,
    "height": 120
  },
  "color": "#5b21b6",
  "headerLinks": [
    {
      "label": "Status",
      "url": "https://status.example.com"
    }
  ],
  "footerLinks": [
    {
      "label": "Status",
      "url": "https://status.example.com"
    }
  ],
  "poweredBy": true,
  "contentActions": {
    "menu": true,
    "copyMarkdown": true,
    "chatGpt": true,
    "claude": true,
    "updatedDate": true
  },
  "docsHome": {
    "title": "Acme Help Center",
    "subtitle": "Guides and answers for every part of Acme",
    "popular": true
  },
  "colorScheme": "system",
  "themeSwitch": true,
  "logoText": "Help",
  "logoLink": "https://example.com",
  "sidebarLinks": [
    {
      "label": "Status",
      "url": "https://status.example.com"
    }
  ],
  "seo": {
    "title": "Acme Help Center",
    "description": "Guides and answers for every part of Acme"
  },
  "seoImage": {
    "id": "cm3media0001",
    "url": "https://media.example.com/cm3media0001/480.webp",
    "width": 480,
    "height": 120
  },
  "fonts": {
    "heading": "inter",
    "body": null
  },
  "customCss": "",
  "customHtml": ""
}
{
  "error": {
    "code": "invalid_input",
    "message": "title: Title is too short"
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "This API key isn't valid or was revoked"
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "This key can only read. Create a read + write key to change things."
  }
}
{
  "error": {
    "code": "merged",
    "message": "This post was merged into another one; vote there instead"
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Up to 600 requests a minute per key"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "Something went wrong"
  }
}