List teams

List teams the caller is a member of, or all teams (staff only).

Endpoint

GET /api/v1/teams

Request

Query parameters: page, per_page, all.

By default, returns teams the authenticated user is a member of. Pass all=true to list all teams (Staff only).

Usage

List your teams:

curl \
  --header "Authorization: Bearer $PEARING_API_TOKEN" \
  "$PEARING_API_URL/v1/teams"

List all teams (staff only):

curl \
  --header "Authorization: Bearer $PEARING_API_TOKEN" \
  "$PEARING_API_URL/v1/teams?all=true"

Success

200 OK with paginated teams.

Each team includes a member_role field: "owner", "member", or null (when using all=true and the caller is not a member of that team).

{
  "results": [
    {
      "uuid": "...",
      "slug": "platform",
      "name": "Platform",
      "member_role": "owner"
    }
  ],
  "next": null,
  "previous": null
}

Errors

403 Forbidden if all=true is used by a non-staff user. Common auth errors are documented on the API overview page.