Tuti APIDocs

List collections

List the docs' collections in order: by tab, each top-level one, then the ones in it

GET/collections

Authorization Bearer token

Responses

  • 200The docs' collections

    application/json · object

    The docs' collections

    • collectionsarray of Collectionrequired

      Every collection, in order

      Show 11 properties
      • slugstringrequired

        Its slug, from its name

      • namestringrequired

        Its name

      • descriptionstringrequired

        The line under its name; empty for none

      • iconstring · nullablerequired

        Its Lucide icon's name, or null for none

      • accessstringrequired

        Who may read it, on top of the levels above it: inherit, signed_in or groups (readers in one of groups)

        One of"inherit""signed_in""groups"

      • groupsarray of stringrequired

        With groups access, the keys of the reader groups that may read it

      • noAccessstringrequired

        What people it isn't for see of it: inherit, lock (listed with a lock) or hide

        One of"inherit""lock""hide"

      • parentstring · nullablerequired

        The slug of the collection it's in, or null at the top level

      • tabstring · nullablerequired

        The slug of the tab it's in (a collection in another is in its top-level one's), or null if the docs have no tabs

      • orderintegerrequired

        Its place among its siblings, 0 first: readers list collections in this order

      • articlesintegerrequired

        How many articles are in it, drafts included (not those in the collections in it)

  • 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

  • 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/collections' \
  --header 'Authorization: Bearer YOUR_API_KEY'
const response = await fetch("https://tuti.so/api/v1/collections", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY"
  },
});
const text = await response.text();
import requests

response = requests.get(
    "https://tuti.so/api/v1/collections",
    headers={
        "Authorization": "Bearer YOUR_API_KEY"
    },
)
print(response.text)
{
  "collections": [
    {
      "slug": "getting-started",
      "name": "Getting started",
      "description": "The basics, in five minutes.",
      "icon": "rocket",
      "access": "inherit",
      "groups": [],
      "noAccess": "inherit",
      "parent": null,
      "tab": "guides",
      "order": 0,
      "articles": 4
    }
  ]
}
{
  "error": {
    "code": "unauthorized",
    "message": "This API key isn't valid or was revoked"
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Up to 600 requests a minute per key"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "Something went wrong"
  }
}