> For the complete documentation index, see [llms.txt](https://synap.ac/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://synap.ac/docs/api/reference/user-groups/list-usergroups.md).

# List UserGroups

```json
{"openapi":"3.0.1","info":{"title":"Synap API","version":"3.0.0"},"tags":[{"name":"User Groups","description":"Endpoints related to the creation and management of User Groups."}],"servers":[{"url":"https://api.synap.ac/v3","description":"Production"},{"url":"https://api-stage.synap.ac/v3","description":"Staging"}],"security":[],"paths":{"/user-groups":{"get":{"summary":"List UserGroups","tags":["User Groups"],"parameters":[{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["_created_at","-_created_at"]}},{"name":"filter","in":"query","required":false,"schema":{"type":"object","properties":{"name":{"type":"object","properties":{"search":{"description":"The partial name to search for.","type":"string"},"eq":{"description":"The exact name to fetch.","type":"string"}}},"userType":{"oneOf":[{"type":"array","items":{"type":"string","enum":["admin","manager","educator","marker","student","guest"]}},{"type":"string"}]},"subPortals":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]}}}},{"name":"page","in":"query","required":false,"schema":{"type":"object","required":["limit","offset"],"properties":{"limit":{"type":"number","minimum":1},"offset":{"type":"number","minimum":0}}}},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Success","content":{"application/vnd.api+json":{"schema":{"required":["data"],"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserGroup"}},"included":{"type":"array","items":{"$ref":"#/components/schemas/GenericResource"}},"meta":{"type":"object","required":["total","pages","page","offset","limit"],"properties":{"total":{"type":"integer"},"totalWithoutFilters":{"type":"integer"},"pages":{"type":"integer"},"page":{"type":"integer"},"offset":{"type":"integer"},"limit":{"type":"integer"},"totalCount":{"type":"integer","deprecated":true},"resultCount":{"type":"integer","deprecated":true},"totalPages":{"type":"integer","deprecated":true},"currentPage":{"type":"integer","deprecated":true}}}}}}}},"400":{"description":"Bad Request","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/BadRequestApiError"}}}}}}},"401":{"description":"Unauthorized","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/UnauthorizedApiError"}}}}}}},"403":{"description":"Forbidden","content":{"application/vnd.api+json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ForbiddenApiError"}}}}}}}}}}},"components":{"schemas":{"UserGroup":{"type":"object","required":["id","type"],"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"type":{"type":"string","description":"Identifies the Resource.","enum":["UserGroup"]},"attributes":{"type":"object","additionalProperties":false,"properties":{"createdAt":{"type":"string","readOnly":true},"updatedAt":{"type":"string","readOnly":true},"name":{"type":"string","readOnly":false},"description":{"type":"string","readOnly":false},"attr":{"type":"object","readOnly":false,"additionalProperties":true},"isDefaultGroup":{"type":"boolean","readOnly":true},"defaultGroupType":{"type":"string","readOnly":true},"type":{"type":"string","readOnly":true},"isArchived":{"type":"boolean","readOnly":false},"totalUsers":{"type":"number","readOnly":true},"parentId":{"type":"string","readOnly":true,"nullable":true},"internal":{"type":"boolean","readOnly":true},"membershipExpiryEnabled":{"type":"boolean","readOnly":false},"membershipExpiryTimeToExpireInMs":{"type":"number","readOnly":false,"nullable":true}}},"relationships":{"type":"object","properties":{"owner":{"type":"object","description":"This is a resource linkage for a to-one relationship. It is like a Parse Pointer.","readOnly":false,"properties":{"data":{"type":"object","required":["id","type"],"nullable":true,"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"type":{"type":"string","description":"Identifies the Resource.","enum":["User"]}}}}},"userType":{"type":"object","description":"This is a resource linkage for a to-one relationship. It is like a Parse Pointer.","readOnly":false,"properties":{"data":{"type":"object","required":["id","type"],"nullable":true,"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"type":{"type":"string","description":"Identifies the Resource.","enum":["UserType"]}}}}},"subPortal":{"type":"object","description":"This is a resource linkage for a to-one relationship. It is like a Parse Pointer.","readOnly":false,"properties":{"data":{"type":"object","required":["id","type"],"nullable":true,"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"type":{"type":"string","description":"Identifies the Resource.","enum":["SubPortal"]}}}}}}}}},"ObjectId":{"type":"string","description":"The primary key for each resource."},"GenericResource":{"type":"object","description":"The structure of a any Resource returned by, or expected in, all requests.","properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"type":{"$ref":"#/components/schemas/ResourceType"},"attributes":{"type":"object","additionalProperties":true},"relationships":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Relationship"}}}},"ResourceType":{"type":"string","description":"Identifies the Resource."},"Relationship":{"type":"object","description":"Describes a relationship object that references the related resource.","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/ResourceIdentifierObject"},{"$ref":"#/components/schemas/ResourceIdentifierArray"}]},"links":{"$ref":"#/components/schemas/RelationLink"},"meta":{"type":"object","additionalProperties":true}}},"ResourceIdentifierObject":{"type":"object","description":"This is a resource linkage for a to-one relationship. It is like a Parse Pointer.","nullable":true,"properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"type":{"$ref":"#/components/schemas/ResourceType"}}},"ResourceIdentifierArray":{"type":"array","description":"This is a resource linkage for a to-many relationship. It is like a list of Parse Pointers.","nullable":true,"items":{"$ref":"#/components/schemas/ResourceIdentifierObject"}},"RelationLink":{"type":"object","properties":{"self":{"type":"string"},"related":{"type":"string"}}},"BadRequestApiError":{"type":"object","description":"The request was invalid.","properties":{"id":{"type":"string","description":"Unique ID of this error occurrence."},"status":{"type":"string","description":"HTTP status code."},"code":{"type":"string","description":"Synap internal error code."},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","properties":{"pointer":{"type":"string"},"parameter":{"type":"string"}}}}},"UnauthorizedApiError":{"type":"object","description":"Unauthorized request.","properties":{"id":{"type":"string","description":"Unique ID of this error occurrence."},"status":{"type":"string","description":"HTTP status code."},"code":{"type":"string","description":"Synap internal error code."},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","properties":{"pointer":{"type":"string"},"parameter":{"type":"string"}}}}},"ForbiddenApiError":{"type":"object","description":"Forbidden request.","properties":{"id":{"type":"string","description":"Unique ID of this error occurrence."},"status":{"type":"string","description":"HTTP status code."},"code":{"type":"string","description":"Synap internal error code."},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","properties":{"pointer":{"type":"string"},"parameter":{"type":"string"}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://synap.ac/docs/api/reference/user-groups/list-usergroups.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
