Tuti APIUsers

List reader groups

List the reader groups by name, with who's in each now (readers counts them, sample names up to 3). Tabs, collections and articles can be for some groups only (access groups, with groups naming them by key).

GET/groups

Authorization Bearer token

Responses

  • 200The reader groups

    application/json · object

    The reader groups

    • groupsarray of ReaderGrouprequired

      The project's reader groups, by name

      Show 7 properties
      • keystringrequired

        Its key: from its name when made, it never changes, and names it in these paths and on tabs, collections and articles (groups)

      • namestringrequired

        Its name

      • descriptionstringrequired

        What it's for, for the team; empty if none

      • conditionsarray of GroupConditionrequired

        Who's in it: one of your app's users is when their properties match all of these, or any one (match)

        Show 3 properties
        • propertystringrequired

          The user property it looks at, by name

        • opstringrequired

          How it compares the property with value

          One of"is""is_not""is_any_of""is_none_of""contains""excludes""is_set""is_not_set"

        • valuestring or array of string

          The text it compares with, or a list for is_any_of and is_none_of; none for is_set and is_not_set

          Show 2 options
          • Option 1string
          • Option 2array of string
      • matchstringrequired

        all of the conditions must match, or any one

        One of"all""any"

      • readersintegerrequired

        How many of your users are in it now

      • samplearray of stringrequired

        The names of the first 3 of them, by name

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

response = requests.get(
    "https://tuti.so/api/v1/groups",
    headers={
        "Authorization": "Bearer YOUR_API_KEY"
    },
)
print(response.text)
{
  "groups": [
    {
      "key": "pro-customers",
      "name": "Pro customers",
      "description": "Customers on a paid plan",
      "conditions": [
        {
          "property": "plan",
          "op": "is_any_of",
          "value": [
            "pro",
            "enterprise"
          ]
        }
      ],
      "match": "all",
      "readers": 42,
      "sample": [
        "Sam from Acme"
      ]
    }
  ]
}
{
  "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"
  }
}