List teams of a user

List the teams a user belongs to, with member counts and which ones they lead.

GET https://cotlet.dev/api/v1/lichess/user-teams

read

Returns each team with its ID, name, member count and the leaders, which tells the agent which teams the account can manage. Other team tools take the team_id from here. It reads only.

Parameters

Parameters: list_user_teams
NameTypeDescription
username string string Lichess username. Defaults to the signed-in account.

Request

cURL
curl https://cotlet.dev/api/v1/lichess/user-teams \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("lichess", "list_user_teams")
Node.js
const result = await cotlet.call('lichess', 'list_user_teams');
CLI
cotlet call lichess list_user_teams

Example response

JSON

{
  "teams": [
    {
      "team_id": "riverside-chess",
      "name": "Riverside Chess Club",
      "members": 148,
      "leaders": [
        "club_captain",
        "treasurer_anna"
      ]
    },
    {
      "team_id": "weekend-blitz",
      "name": "Weekend Blitz",
      "members": 2310,
      "leaders": [
        "blitz_host"
      ]
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.