> For the complete documentation index, see [llms.txt](https://docs.zenlytic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zenlytic.com/developers/groups.md).

# Groups

## GET /workspaces/{workspace\_id}/groups

> Get Groups

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"ApiV2CollectionResponse_GroupResponseSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/GroupResponseSchema"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2CollectionResponse[GroupResponseSchema]"},"GroupResponseSchema":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"user_attribute_precedence":{"type":"integer","title":"User Attribute Precedence"},"users":{"items":{"type":"string"},"type":"array","title":"Users"}},"type":"object","required":["id","workspace_id","name","user_attribute_precedence","users"],"title":"GroupResponseSchema"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors"},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings"},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source"}},"type":"object","required":["status"],"title":"MetaSchema"},"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"},"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/FieldAlreadyExistsErrorMetadata"},{"type":"null"}]}},"type":"object","required":["message"],"title":"ErrorSchema"},"FieldAlreadyExistsErrorMetadata":{"properties":{"existing_column_ids":{"items":{"type":"string"},"type":"array","title":"Existing Column Ids"}},"type":"object","required":["existing_column_ids"],"title":"FieldAlreadyExistsErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"},"ApiV2ErrorResponse":{"properties":{"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["meta"],"title":"ApiV2ErrorResponse"}}},"paths":{"/workspaces/{workspace_id}/groups":{"get":{"tags":["Groups"],"summary":"Get Groups","operationId":"get_groups_workspaces__workspace_id__groups_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2CollectionResponse_GroupResponseSchema_"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Server Error"}}}}}}
```

## POST /workspaces/{workspace\_id}/groups

> Create Group

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"CreateGroupSchema":{"properties":{"name":{"type":"string","title":"Name"},"user_attribute_precedence":{"type":"integer","title":"User Attribute Precedence"}},"type":"object","required":["name","user_attribute_precedence"],"title":"CreateGroupSchema"},"ApiV2Response_GroupResponseSchema_":{"properties":{"data":{"$ref":"#/components/schemas/GroupResponseSchema"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2Response[GroupResponseSchema]"},"GroupResponseSchema":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"user_attribute_precedence":{"type":"integer","title":"User Attribute Precedence"},"users":{"items":{"type":"string"},"type":"array","title":"Users"}},"type":"object","required":["id","workspace_id","name","user_attribute_precedence","users"],"title":"GroupResponseSchema"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors"},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings"},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source"}},"type":"object","required":["status"],"title":"MetaSchema"},"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"},"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/FieldAlreadyExistsErrorMetadata"},{"type":"null"}]}},"type":"object","required":["message"],"title":"ErrorSchema"},"FieldAlreadyExistsErrorMetadata":{"properties":{"existing_column_ids":{"items":{"type":"string"},"type":"array","title":"Existing Column Ids"}},"type":"object","required":["existing_column_ids"],"title":"FieldAlreadyExistsErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"},"ApiV2ErrorResponse":{"properties":{"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["meta"],"title":"ApiV2ErrorResponse"}}},"paths":{"/workspaces/{workspace_id}/groups":{"post":{"tags":["Groups"],"summary":"Create Group","operationId":"create_group_workspaces__workspace_id__groups_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2Response_GroupResponseSchema_"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Server Error"}}}}}}
```

## GET /workspaces/{workspace\_id}/groups/{group\_id}

> Get Group

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"ApiV2Response_GroupResponseSchema_":{"properties":{"data":{"$ref":"#/components/schemas/GroupResponseSchema"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2Response[GroupResponseSchema]"},"GroupResponseSchema":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"user_attribute_precedence":{"type":"integer","title":"User Attribute Precedence"},"users":{"items":{"type":"string"},"type":"array","title":"Users"}},"type":"object","required":["id","workspace_id","name","user_attribute_precedence","users"],"title":"GroupResponseSchema"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors"},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings"},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source"}},"type":"object","required":["status"],"title":"MetaSchema"},"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"},"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/FieldAlreadyExistsErrorMetadata"},{"type":"null"}]}},"type":"object","required":["message"],"title":"ErrorSchema"},"FieldAlreadyExistsErrorMetadata":{"properties":{"existing_column_ids":{"items":{"type":"string"},"type":"array","title":"Existing Column Ids"}},"type":"object","required":["existing_column_ids"],"title":"FieldAlreadyExistsErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"},"ApiV2ErrorResponse":{"properties":{"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["meta"],"title":"ApiV2ErrorResponse"}}},"paths":{"/workspaces/{workspace_id}/groups/{group_id}":{"get":{"tags":["Groups"],"summary":"Get Group","operationId":"get_group_workspaces__workspace_id__groups__group_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2Response_GroupResponseSchema_"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Server Error"}}}}}}
```

## DELETE /workspaces/{workspace\_id}/groups/{group\_id}

> Delete Group

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"ApiV2ErrorResponse":{"properties":{"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["meta"],"title":"ApiV2ErrorResponse"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors"},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings"},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source"}},"type":"object","required":["status"],"title":"MetaSchema"},"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"},"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/FieldAlreadyExistsErrorMetadata"},{"type":"null"}]}},"type":"object","required":["message"],"title":"ErrorSchema"},"FieldAlreadyExistsErrorMetadata":{"properties":{"existing_column_ids":{"items":{"type":"string"},"type":"array","title":"Existing Column Ids"}},"type":"object","required":["existing_column_ids"],"title":"FieldAlreadyExistsErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}},"paths":{"/workspaces/{workspace_id}/groups/{group_id}":{"delete":{"tags":["Groups"],"summary":"Delete Group","operationId":"delete_group_workspaces__workspace_id__groups__group_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Server Error"}}}}}}
```

## PATCH /workspaces/{workspace\_id}/groups/{group\_id}

> Update Group

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"UpdateGroupSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"user_attribute_precedence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Attribute Precedence"}},"type":"object","title":"UpdateGroupSchema"},"ApiV2Response_GroupResponseSchema_":{"properties":{"data":{"$ref":"#/components/schemas/GroupResponseSchema"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2Response[GroupResponseSchema]"},"GroupResponseSchema":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"user_attribute_precedence":{"type":"integer","title":"User Attribute Precedence"},"users":{"items":{"type":"string"},"type":"array","title":"Users"}},"type":"object","required":["id","workspace_id","name","user_attribute_precedence","users"],"title":"GroupResponseSchema"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors"},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings"},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source"}},"type":"object","required":["status"],"title":"MetaSchema"},"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"},"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/FieldAlreadyExistsErrorMetadata"},{"type":"null"}]}},"type":"object","required":["message"],"title":"ErrorSchema"},"FieldAlreadyExistsErrorMetadata":{"properties":{"existing_column_ids":{"items":{"type":"string"},"type":"array","title":"Existing Column Ids"}},"type":"object","required":["existing_column_ids"],"title":"FieldAlreadyExistsErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"},"ApiV2ErrorResponse":{"properties":{"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["meta"],"title":"ApiV2ErrorResponse"}}},"paths":{"/workspaces/{workspace_id}/groups/{group_id}":{"patch":{"tags":["Groups"],"summary":"Update Group","operationId":"update_group_workspaces__workspace_id__groups__group_id__patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroupSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2Response_GroupResponseSchema_"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Server Error"}}}}}}
```

## GET /workspaces/{workspace\_id}/groups/{group\_id}/user\_attributes

> Get Group User Attributes

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"ApiV2CollectionResponse_UserAttributeSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserAttributeSchema"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2CollectionResponse[UserAttributeSchema]"},"UserAttributeSchema":{"properties":{"id":{"type":"string","title":"Id"},"user_attribute_definition_id":{"type":"string","title":"User Attribute Definition Id"},"value":{"type":"string","title":"Value"},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType"},"name":{"type":"string","title":"Name"},"source":{"$ref":"#/components/schemas/UserAttributeSource"},"source_id":{"type":"string","title":"Source Id"},"user_attribute_precedence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Attribute Precedence"},"is_overridden":{"type":"boolean","title":"Is Overridden"}},"type":"object","required":["id","user_attribute_definition_id","value","data_type","name","source","source_id","user_attribute_precedence","is_overridden"],"title":"UserAttributeSchema"},"UserAttributeDataType":{"type":"string","enum":["string","number","date"],"title":"UserAttributeDataType"},"UserAttributeSource":{"type":"string","enum":["user","group"],"title":"UserAttributeSource"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors"},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings"},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source"}},"type":"object","required":["status"],"title":"MetaSchema"},"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"},"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/FieldAlreadyExistsErrorMetadata"},{"type":"null"}]}},"type":"object","required":["message"],"title":"ErrorSchema"},"FieldAlreadyExistsErrorMetadata":{"properties":{"existing_column_ids":{"items":{"type":"string"},"type":"array","title":"Existing Column Ids"}},"type":"object","required":["existing_column_ids"],"title":"FieldAlreadyExistsErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"},"ApiV2ErrorResponse":{"properties":{"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["meta"],"title":"ApiV2ErrorResponse"}}},"paths":{"/workspaces/{workspace_id}/groups/{group_id}/user_attributes":{"get":{"tags":["Groups"],"summary":"Get Group User Attributes","operationId":"get_group_user_attributes_workspaces__workspace_id__groups__group_id__user_attributes_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2CollectionResponse_UserAttributeSchema_"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Server Error"}}}}}}
```

## POST /workspaces/{workspace\_id}/groups/{group\_id}/user\_attributes

> Create Group User Attribute

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"CreateUserAttributeSchema":{"properties":{"user_attribute_definition_id":{"type":"string","title":"User Attribute Definition Id"},"value":{"type":"string","title":"Value"}},"type":"object","required":["user_attribute_definition_id","value"],"title":"CreateUserAttributeSchema"},"ApiV2Response_UserAttributeSchema_":{"properties":{"data":{"$ref":"#/components/schemas/UserAttributeSchema"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2Response[UserAttributeSchema]"},"UserAttributeSchema":{"properties":{"id":{"type":"string","title":"Id"},"user_attribute_definition_id":{"type":"string","title":"User Attribute Definition Id"},"value":{"type":"string","title":"Value"},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType"},"name":{"type":"string","title":"Name"},"source":{"$ref":"#/components/schemas/UserAttributeSource"},"source_id":{"type":"string","title":"Source Id"},"user_attribute_precedence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Attribute Precedence"},"is_overridden":{"type":"boolean","title":"Is Overridden"}},"type":"object","required":["id","user_attribute_definition_id","value","data_type","name","source","source_id","user_attribute_precedence","is_overridden"],"title":"UserAttributeSchema"},"UserAttributeDataType":{"type":"string","enum":["string","number","date"],"title":"UserAttributeDataType"},"UserAttributeSource":{"type":"string","enum":["user","group"],"title":"UserAttributeSource"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors"},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings"},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source"}},"type":"object","required":["status"],"title":"MetaSchema"},"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"},"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/FieldAlreadyExistsErrorMetadata"},{"type":"null"}]}},"type":"object","required":["message"],"title":"ErrorSchema"},"FieldAlreadyExistsErrorMetadata":{"properties":{"existing_column_ids":{"items":{"type":"string"},"type":"array","title":"Existing Column Ids"}},"type":"object","required":["existing_column_ids"],"title":"FieldAlreadyExistsErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"},"ApiV2ErrorResponse":{"properties":{"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["meta"],"title":"ApiV2ErrorResponse"}}},"paths":{"/workspaces/{workspace_id}/groups/{group_id}/user_attributes":{"post":{"tags":["Groups"],"summary":"Create Group User Attribute","operationId":"create_group_user_attribute_workspaces__workspace_id__groups__group_id__user_attributes_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAttributeSchema"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2Response_UserAttributeSchema_"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Server Error"}}}}}}
```

## DELETE /workspaces/{workspace\_id}/groups/{group\_id}/user\_attributes/{user\_attribute\_id}

> Delete Group User Attributes

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"ApiV2ErrorResponse":{"properties":{"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["meta"],"title":"ApiV2ErrorResponse"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors"},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings"},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source"}},"type":"object","required":["status"],"title":"MetaSchema"},"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"},"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/FieldAlreadyExistsErrorMetadata"},{"type":"null"}]}},"type":"object","required":["message"],"title":"ErrorSchema"},"FieldAlreadyExistsErrorMetadata":{"properties":{"existing_column_ids":{"items":{"type":"string"},"type":"array","title":"Existing Column Ids"}},"type":"object","required":["existing_column_ids"],"title":"FieldAlreadyExistsErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}},"paths":{"/workspaces/{workspace_id}/groups/{group_id}/user_attributes/{user_attribute_id}":{"delete":{"tags":["Groups"],"summary":"Delete Group User Attributes","operationId":"delete_group_user_attributes_workspaces__workspace_id__groups__group_id__user_attributes__user_attribute_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"user_attribute_id","in":"path","required":true,"schema":{"type":"string","title":"User Attribute Id"}}],"responses":{"204":{"description":"Successful Response"},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Server Error"}}}}}}
```

## PATCH /workspaces/{workspace\_id}/groups/{group\_id}/user\_attributes/{user\_attribute\_id}

> Update Group User Attribute

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"security":[{"HTTPBearer":[]},{"APIKeyHeader":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"UpdateUserAttributeSchema":{"properties":{"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"UpdateUserAttributeSchema"},"ApiV2Response_UserAttributeSchema_":{"properties":{"data":{"$ref":"#/components/schemas/UserAttributeSchema"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2Response[UserAttributeSchema]"},"UserAttributeSchema":{"properties":{"id":{"type":"string","title":"Id"},"user_attribute_definition_id":{"type":"string","title":"User Attribute Definition Id"},"value":{"type":"string","title":"Value"},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType"},"name":{"type":"string","title":"Name"},"source":{"$ref":"#/components/schemas/UserAttributeSource"},"source_id":{"type":"string","title":"Source Id"},"user_attribute_precedence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Attribute Precedence"},"is_overridden":{"type":"boolean","title":"Is Overridden"}},"type":"object","required":["id","user_attribute_definition_id","value","data_type","name","source","source_id","user_attribute_precedence","is_overridden"],"title":"UserAttributeSchema"},"UserAttributeDataType":{"type":"string","enum":["string","number","date"],"title":"UserAttributeDataType"},"UserAttributeSource":{"type":"string","enum":["user","group"],"title":"UserAttributeSource"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors"},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings"},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source"}},"type":"object","required":["status"],"title":"MetaSchema"},"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"},"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/FieldAlreadyExistsErrorMetadata"},{"type":"null"}]}},"type":"object","required":["message"],"title":"ErrorSchema"},"FieldAlreadyExistsErrorMetadata":{"properties":{"existing_column_ids":{"items":{"type":"string"},"type":"array","title":"Existing Column Ids"}},"type":"object","required":["existing_column_ids"],"title":"FieldAlreadyExistsErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"},"ApiV2ErrorResponse":{"properties":{"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["meta"],"title":"ApiV2ErrorResponse"}}},"paths":{"/workspaces/{workspace_id}/groups/{group_id}/user_attributes/{user_attribute_id}":{"patch":{"tags":["Groups"],"summary":"Update Group User Attribute","operationId":"update_group_user_attribute_workspaces__workspace_id__groups__group_id__user_attributes__user_attribute_id__patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"user_attribute_id","in":"path","required":true,"schema":{"type":"string","title":"User Attribute Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAttributeSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2Response_UserAttributeSchema_"}}}},"4XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Client Error"},"5XX":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiV2ErrorResponse"}}},"description":"Server Error"}}}}}}
```


---

# 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://docs.zenlytic.com/developers/groups.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.
