# UserGroup

Endpoint for managing user groups

## GET /v1/usergroups

> Get all usersgroups in the tenant

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"UserGroup","description":"Endpoint for managing user groups"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.UserGroup.UserGroupModel":{"type":"object","properties":{"Created":{"type":"string","description":"Date and time when the user group was created","format":"date-time"},"LastModified":{"type":"string","description":"Date and time when the user group was last modified","format":"date-time"},"CreatedBy":{"type":"string","description":"User that created the user group","nullable":true},"LastModifiedBy":{"type":"string","description":"User that last modified the user group","nullable":true},"Uid":{"type":"string","description":"Unique identifier for the user group","format":"uuid"},"Name":{"type":"string","description":"Name of the user group","nullable":true},"Languages":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupLanguageReference"},"description":"Languages that the user group has access to","nullable":true},"Segments":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupDimensionSegmentReference"},"description":"Segments that the user group has access to","nullable":true},"BusinessUnits":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupBusinessUnitReference"},"description":"Business units that the user group has access to","nullable":true}},"additionalProperties":false,"description":"Model used for UserGroups"},"Struct.App.Api.Models.UserGroup.UserGroupLanguageReference":{"type":"object","properties":{"LanguageId":{"type":"integer","description":"Id of the language the user group has access to","format":"int32"},"ReadOnly":{"type":"boolean","description":"Indicate whether the user group has read access to the language"}},"additionalProperties":false,"description":"Representation of a user groups language access"},"Struct.App.Api.Models.UserGroup.UserGroupDimensionSegmentReference":{"type":"object","properties":{"SegmentUid":{"type":"string","description":"Unique identifier of the dimension segment","format":"uuid"},"ReadOnly":{"type":"boolean","description":"Whether the user group has read access to the dimension segment"}},"additionalProperties":false,"description":"Representation of a dimension segment a user group has access to"},"Struct.App.Api.Models.UserGroup.UserGroupBusinessUnitReference":{"type":"object","properties":{"BusinessUnitUid":{"type":"string","description":"Unique identifier of the business unit","format":"uuid"},"ReadOnly":{"type":"boolean","description":"If this user group only has readonly access to this business unit"}},"additionalProperties":false,"description":"Represents a business unit reference for a user group"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/usergroups":{"get":{"tags":["UserGroup"],"summary":"Get all usersgroups in the tenant","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupModel"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## POST /v1/usergroups

> Creates a new user group

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"UserGroup","description":"Endpoint for managing user groups"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.UserGroup.CreateUserGroupModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique identifier for the user group","format":"uuid"},"Name":{"type":"string","description":"Name of the user group","nullable":true},"Languages":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupLanguageReference"},"description":"Languages that the user group has access to","nullable":true},"Segments":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupDimensionSegmentReference"},"description":"Segments that the user group has access to","nullable":true},"BusinessUnits":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupBusinessUnitReference"},"description":"Business units that the user group has access to","nullable":true}},"additionalProperties":false,"description":"Model for creating a user group"},"Struct.App.Api.Models.UserGroup.UserGroupLanguageReference":{"type":"object","properties":{"LanguageId":{"type":"integer","description":"Id of the language the user group has access to","format":"int32"},"ReadOnly":{"type":"boolean","description":"Indicate whether the user group has read access to the language"}},"additionalProperties":false,"description":"Representation of a user groups language access"},"Struct.App.Api.Models.UserGroup.UserGroupDimensionSegmentReference":{"type":"object","properties":{"SegmentUid":{"type":"string","description":"Unique identifier of the dimension segment","format":"uuid"},"ReadOnly":{"type":"boolean","description":"Whether the user group has read access to the dimension segment"}},"additionalProperties":false,"description":"Representation of a dimension segment a user group has access to"},"Struct.App.Api.Models.UserGroup.UserGroupBusinessUnitReference":{"type":"object","properties":{"BusinessUnitUid":{"type":"string","description":"Unique identifier of the business unit","format":"uuid"},"ReadOnly":{"type":"boolean","description":"If this user group only has readonly access to this business unit"}},"additionalProperties":false,"description":"Represents a business unit reference for a user group"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/usergroups":{"post":{"tags":["UserGroup"],"summary":"Creates a new user group","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.CreateUserGroupModel"}}}},"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## PUT /v1/usergroups

> Updates a existing usergroup

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"UserGroup","description":"Endpoint for managing user groups"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.UserGroup.UpdateUserGroupModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique identifier for the user group","format":"uuid"},"Name":{"type":"string","description":"Name of the user group","nullable":true},"Languages":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupLanguageReference"},"description":"Languages that the user group has access to","nullable":true},"Segments":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupDimensionSegmentReference"},"description":"Segments that the user group has access to","nullable":true},"BusinessUnits":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupBusinessUnitReference"},"description":"Business units that the user group has access to","nullable":true}},"additionalProperties":false,"description":"Update model for a user group"},"Struct.App.Api.Models.UserGroup.UserGroupLanguageReference":{"type":"object","properties":{"LanguageId":{"type":"integer","description":"Id of the language the user group has access to","format":"int32"},"ReadOnly":{"type":"boolean","description":"Indicate whether the user group has read access to the language"}},"additionalProperties":false,"description":"Representation of a user groups language access"},"Struct.App.Api.Models.UserGroup.UserGroupDimensionSegmentReference":{"type":"object","properties":{"SegmentUid":{"type":"string","description":"Unique identifier of the dimension segment","format":"uuid"},"ReadOnly":{"type":"boolean","description":"Whether the user group has read access to the dimension segment"}},"additionalProperties":false,"description":"Representation of a dimension segment a user group has access to"},"Struct.App.Api.Models.UserGroup.UserGroupBusinessUnitReference":{"type":"object","properties":{"BusinessUnitUid":{"type":"string","description":"Unique identifier of the business unit","format":"uuid"},"ReadOnly":{"type":"boolean","description":"If this user group only has readonly access to this business unit"}},"additionalProperties":false,"description":"Represents a business unit reference for a user group"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/usergroups":{"put":{"tags":["UserGroup"],"summary":"Updates a existing usergroup","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UpdateUserGroupModel"}}}},"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## GET /v1/usergroups/{uid}

> Returns a single usergroup from the tenant

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"UserGroup","description":"Endpoint for managing user groups"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.UserGroup.UserGroupModel":{"type":"object","properties":{"Created":{"type":"string","description":"Date and time when the user group was created","format":"date-time"},"LastModified":{"type":"string","description":"Date and time when the user group was last modified","format":"date-time"},"CreatedBy":{"type":"string","description":"User that created the user group","nullable":true},"LastModifiedBy":{"type":"string","description":"User that last modified the user group","nullable":true},"Uid":{"type":"string","description":"Unique identifier for the user group","format":"uuid"},"Name":{"type":"string","description":"Name of the user group","nullable":true},"Languages":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupLanguageReference"},"description":"Languages that the user group has access to","nullable":true},"Segments":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupDimensionSegmentReference"},"description":"Segments that the user group has access to","nullable":true},"BusinessUnits":{"type":"array","items":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupBusinessUnitReference"},"description":"Business units that the user group has access to","nullable":true}},"additionalProperties":false,"description":"Model used for UserGroups"},"Struct.App.Api.Models.UserGroup.UserGroupLanguageReference":{"type":"object","properties":{"LanguageId":{"type":"integer","description":"Id of the language the user group has access to","format":"int32"},"ReadOnly":{"type":"boolean","description":"Indicate whether the user group has read access to the language"}},"additionalProperties":false,"description":"Representation of a user groups language access"},"Struct.App.Api.Models.UserGroup.UserGroupDimensionSegmentReference":{"type":"object","properties":{"SegmentUid":{"type":"string","description":"Unique identifier of the dimension segment","format":"uuid"},"ReadOnly":{"type":"boolean","description":"Whether the user group has read access to the dimension segment"}},"additionalProperties":false,"description":"Representation of a dimension segment a user group has access to"},"Struct.App.Api.Models.UserGroup.UserGroupBusinessUnitReference":{"type":"object","properties":{"BusinessUnitUid":{"type":"string","description":"Unique identifier of the business unit","format":"uuid"},"ReadOnly":{"type":"boolean","description":"If this user group only has readonly access to this business unit"}},"additionalProperties":false,"description":"Represents a business unit reference for a user group"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/usergroups/{uid}":{"get":{"tags":["UserGroup"],"summary":"Returns a single usergroup from the tenant","parameters":[{"name":"uid","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.UserGroup.UserGroupModel"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## DELETE /v1/usergroups/{uid}

> Deletes an existing usergroup

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"UserGroup","description":"Endpoint for managing user groups"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"Type":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Status":{"type":"integer","format":"int32","nullable":true},"Detail":{"type":"string","nullable":true},"Instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/v1/usergroups/{uid}":{"delete":{"tags":["UserGroup"],"summary":"Deletes an existing usergroup","parameters":[{"name":"uid","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.struct.com/api-reference/endpoints/usergroup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
