---
updatedAt: 2026-05-28T09:43:07.000Z
agentTools:
  projectIndex: https://developers.piwik.pro/llms.txt
---

# List user groups

Lists user groups

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Web API",
    "version": "master"
  },
  "servers": [
    {
      "url": "https://{account}.piwik.pro",
      "variables": {
        "account": {
          "default": "example"
        }
      }
    }
  ],
  "security": [
    {
      "OAuth2ClientCredentials": []
    }
  ],
  "paths": {
    "/api/user-groups/v1": {
      "get": {
        "summary": "List user groups",
        "description": "Lists user groups",
        "operationId": "list_user_group_v1",
        "parameters": [
          {
            "in": "query",
            "name": "search",
            "description": "Search phrase - search for user group name, ID or external ID",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "description": "Sort field - can be reversed by adding dash before field name e.g (-name)",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "created_at",
                "updated_at",
                "-name",
                "-created_at",
                "-updated_at"
              ],
              "default": "name"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "description": "Limits the number of returned user groups in response",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "default": 10
            }
          },
          {
            "in": "query",
            "name": "offset",
            "description": "Sets offset for list of items",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/vnd.api+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "description": "Metadata of a listing",
                      "required": [
                        "total"
                      ],
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "Total number of items",
                          "example": 1
                        }
                      }
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "type": "object",
                            "required": [
                              "id",
                              "type",
                              "attributes"
                            ],
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "ppms/user-group"
                                ]
                              },
                              "id": {
                                "allOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid",
                                    "description": "UUIDv4 identifier of an object",
                                    "example": "6edb1e3c-4c43-4760-ab76-682ad83146be"
                                  },
                                  {
                                    "readOnly": true
                                  }
                                ]
                              },
                              "attributes": {
                                "type": "object",
                                "required": [
                                  "name",
                                  "created_at",
                                  "updated_at"
                                ],
                                "properties": {
                                  "name": {
                                    "description": "User group name",
                                    "type": "string",
                                    "example": "Managers"
                                  },
                                  "created_at": {
                                    "allOf": [
                                      {
                                        "type": "string",
                                        "format": "date-time",
                                        "description": "Timestamp of object's creation",
                                        "readOnly": true
                                      },
                                      {
                                        "readOnly": true
                                      }
                                    ]
                                  },
                                  "updated_at": {
                                    "allOf": [
                                      {
                                        "type": "string",
                                        "format": "date-time",
                                        "description": "Timestamp of object's last modification",
                                        "readOnly": true
                                      },
                                      {
                                        "readOnly": true
                                      }
                                    ]
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "attributes": {
                                "type": "object",
                                "properties": {
                                  "external_id": {
                                    "type": "string",
                                    "nullable": true,
                                    "description": "External (IDP) identifier of user group",
                                    "example": "external group id"
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          }
        },
        "tags": [
          "User Groups"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2ClientCredentials": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/auth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "x-api-checksum": "f30b118d8e5a9d203105c80d9cf4000e1fd797fefe12353beea7e379e41e6e6c"
}
```