Tuti APIAPI references

Create an API reference

Add an API reference to the docs, published, with a page per operation. A spec that can't be read or fetched, or has no operations, is refused with the reason. Fetches the team asks for (from a URL or GitHub, syncs) are limited: 10 a minute per member across projects, 120 an hour per project (429).

Needs a read + write key.

POST/api-references

Authorization Bearer token

Body

application/json · object · required

  • namestring · 1–80 charactersrequired

    Its name in the docs' tree; its slug comes from it, one no tab, collection or article has

  • specstring · at most 5242880 characters

    The spec's text, 5 MB at most: OpenAPI 3.0 or 3.1 in JSON or YAML, a GraphQL schema file, or a GraphQL endpoint's introspection result

  • urlstring · 1–2000 characters

    The address the spec is at instead: https, a public address, 5 MB at most. Its relative servers are on the address that served it

  • githubobject

    Adding from GitHub instead: a file in a repository the project added, 5 MB at most; also read again when a pull request into the branch that changes the file merges

    Show 3 properties
    • repoIdinteger · at most 2147483647, more than 0required

      GitHub's id for the repository, as githubRepositories.list gives it

    • pathstringrequired

      The file's path in the repository

    • refstring · 1–255 characters, matches ^[^\s~^:?*[\\\x00-\x1f\x7f]+$

      A branch; left out, the repository's default branch

  • tabstring · 1–80 characters

    The tab it goes in, last, by slug; left out, the first one, if the docs have tabs

Responses

  • 200The API reference added

    application/json · object

    The API reference added

    • slugstringrequired

      Its address in the docs (/docs/<slug>): from its name when it was added, and kept when it's renamed

    • namestringrequired

      Its name in the docs' tree

    • tabstring · nullablerequired

      Its tab's slug; null when the docs have no tabs

    • formatstringrequired

      What the spec is: OpenAPI, or a GraphQL schema

      One of"openapi""graphql"

    • sourcestringrequired

      Where the spec is read from: text uploaded and replaced by hand (apiReferences.replace), an address (sourceUrl) or a file on GitHub (repoId, path, ref), read again every 6 hours and on apiReferences.sync

      One of"upload""url""github"

    • sourceUrlstring · nullablerequired

      The address a url reference's spec is read from, as a URL parser writes it; null otherwise

    • repoIdinteger · nullablerequired

      GitHub's id for a github reference's repository (githubRepositories.list); null otherwise

    • pathstring · nullablerequired

      The file's path in that repository; null otherwise

    • refstring · nullablerequired

      The branch the file is read on; null otherwise

    • baseUrlstring · nullablerequired

      Where requests go when the spec's servers have no host; null when none is set

    • treeStylestringrequired

      How it sits in the docs' tree: each group a folder (folders) or a heading (headings), or one entry that lists the operations

      One of"folders""headings""entry"

    • tryItbooleanrequired

      Whether readers can send requests from its pages

    • countsobjectrequired

      Its operations, counted

      Show 3 properties
      • operationsintegerrequired

        How many operations the spec has

      • onHelpCenterintegerrequired

        How many of them are on the help center

      • newintegerrequired

        How many a read added since the team last looked

    • publishedbooleanrequired

      Whether it's on the help center: a draft is on it nowhere

    • syncedAtstringrequired

      When the spec was last read successfully

    • syncTriedAtstringrequired

      When its source was last read, whether that worked or not

    • changedAtstringrequired

      When a read last changed what the spec has

    • syncErrorstring · nullablerequired

      Why the last read failed, or found no operations, so the pages stayed as they were; null once one works

  • 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

  • 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/api-references' \
  --request POST \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "name": "API reference",
  "spec": "openapi: 3.1.0\ninfo:\n  title: Acme\n  version: '\''1'\''\npaths:\n  /posts:\n    get:\n      summary: List posts\n"
}'
const response = await fetch("https://tuti.so/api/v1/api-references", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "name": "API reference",
    "spec": "openapi: 3.1.0\ninfo:\n  title: Acme\n  version: '1'\npaths:\n  /posts:\n    get:\n      summary: List posts\n"
  }),
});
const text = await response.text();
import requests

response = requests.post(
    "https://tuti.so/api/v1/api-references",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    data="{\n  \"name\": \"API reference\",\n  \"spec\": \"openapi: 3.1.0\\ninfo:\\n  title: Acme\\n  version: '1'\\npaths:\\n  /posts:\\n    get:\\n      summary: List posts\\n\"\n}",
)
print(response.text)
{
  "slug": "public-api",
  "name": "Public API",
  "tab": "developers",
  "format": "openapi",
  "source": "url",
  "sourceUrl": "https://api.example.com/openapi.json",
  "repoId": null,
  "path": null,
  "ref": null,
  "baseUrl": "https://api.example.com",
  "treeStyle": "folders",
  "tryIt": true,
  "counts": {
    "operations": 24,
    "onHelpCenter": 22,
    "new": 2
  },
  "published": true,
  "syncedAt": "2026-11-19T09:00:00.000Z",
  "syncTriedAt": "2026-11-19T09:00:00.000Z",
  "changedAt": "2026-11-18T16:30:00.000Z",
  "syncError": null
}
{
  "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": "rate_limited",
    "message": "Up to 600 requests a minute per key"
  }
}
{
  "error": {
    "code": "internal_error",
    "message": "Something went wrong"
  }
}