> 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-beta/api-reference/models.md).

# Models

## The ApiV2CollectionResponse\_GroupResponseSchema\_ object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"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"},"is_all_users":{"type":"boolean","title":"Is All Users","description":"Whether this is the built-in group containing every workspace member; its membership always tracks the roster and can't be edited directly."},"user_attribute_precedence":{"type":"integer","title":"User Attribute Precedence","description":"Determines which group's value wins when a member is in several groups that set the same user attribute; higher wins."},"users":{"items":{"type":"string"},"type":"array","title":"Users","description":"IDs of the group's members."}},"type":"object","required":["id","workspace_id","name","is_all_users","user_attribute_precedence","users"],"title":"GroupResponseSchema"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The ApiV2CollectionResponse\_UserAttributeDefinitionSchema\_ object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"ApiV2CollectionResponse_UserAttributeDefinitionSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UserAttributeDefinitionSchema"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2CollectionResponse[UserAttributeDefinitionSchema]"},"UserAttributeDefinitionSchema":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name","description":"A stable, unique key for this definition within the workspace, referenced by the data model - unlike `label`, it can't be changed after creation."},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType","description":"Determines the format required in `value` wherever this definition is used: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"label":{"type":"string","title":"Label","description":"The human-facing display text for this definition; unlike `name`, this can be changed at any time."}},"type":"object","required":["id","workspace_id","name","data_type","label"],"title":"UserAttributeDefinitionSchema"},"UserAttributeDataType":{"type":"string","enum":["string","number","date"],"title":"UserAttributeDataType"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The ApiV2CollectionResponse\_UserAttributeSchema\_ object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"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","description":"Formatted per `data_type`: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType","description":"Determines `value`'s format: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"name":{"type":"string","title":"Name","description":"The referenced `user_attribute_definition_id`'s `name`."},"source":{"$ref":"#/components/schemas/UserAttributeSource","description":"Whether this value is set directly on the member (\"user\") or inherited from a group (\"group\")."},"source_id":{"type":"string","title":"Source Id","description":"ID of the group or member (matching `source`) this value comes from."},"user_attribute_precedence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Attribute Precedence","description":"The source group's precedence; null when `source` is \"user\" - only groups carry a precedence."},"is_overridden":{"type":"boolean","title":"Is Overridden","description":"True if a higher-precedence group value, or a directly-set member value, takes effect instead of this one."}},"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","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The ApiV2CollectionResponse\_WorkspaceSchema\_ object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"ApiV2CollectionResponse_WorkspaceSchema_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WorkspaceSchema"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2CollectionResponse[WorkspaceSchema]"},"WorkspaceSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"provision_by_default":{"type":"boolean","title":"Provision By Default","description":"When true, new users signing in via SSO are automatically granted access to this workspace; when false, they need an explicit invite."},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When this workspace was archived; null while active."}},"type":"object","required":["id","name","provision_by_default"],"title":"WorkspaceSchema"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The ApiV2ErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"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","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The ApiV2Response\_CreateWorkspaceResponseSchema\_ object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"ApiV2Response_CreateWorkspaceResponseSchema_":{"properties":{"data":{"$ref":"#/components/schemas/CreateWorkspaceResponseSchema"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2Response[CreateWorkspaceResponseSchema]"},"CreateWorkspaceResponseSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"provision_by_default":{"type":"boolean","title":"Provision By Default","description":"When true, new users signing in via SSO are automatically granted access to this workspace; when false, they need an explicit invite."}},"type":"object","required":["id","name","provision_by_default"],"title":"CreateWorkspaceResponseSchema"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The ApiV2Response\_GroupResponseSchema\_ object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"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"},"is_all_users":{"type":"boolean","title":"Is All Users","description":"Whether this is the built-in group containing every workspace member; its membership always tracks the roster and can't be edited directly."},"user_attribute_precedence":{"type":"integer","title":"User Attribute Precedence","description":"Determines which group's value wins when a member is in several groups that set the same user attribute; higher wins."},"users":{"items":{"type":"string"},"type":"array","title":"Users","description":"IDs of the group's members."}},"type":"object","required":["id","workspace_id","name","is_all_users","user_attribute_precedence","users"],"title":"GroupResponseSchema"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The ApiV2Response\_MeSchema\_ object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"ApiV2Response_MeSchema_":{"properties":{"data":{"$ref":"#/components/schemas/MeSchema"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2Response[MeSchema]"},"MeSchema":{"properties":{"organization":{"$ref":"#/components/schemas/MyOrganizationSchema"},"workspaces":{"items":{"$ref":"#/components/schemas/MyWorkspaceSchema"},"type":"array","title":"Workspaces","description":"Workspaces in your organization that you're a member of and, for a PAT scoped to specific workspaces, within the token's scope. Archived workspaces are excluded."}},"type":"object","required":["organization","workspaces"],"title":"MeSchema"},"MyOrganizationSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"MyOrganizationSchema"},"MyWorkspaceSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"MyWorkspaceSchema"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The ApiV2Response\_UserAttributeDefinitionSchema\_ object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"ApiV2Response_UserAttributeDefinitionSchema_":{"properties":{"data":{"$ref":"#/components/schemas/UserAttributeDefinitionSchema"},"meta":{"$ref":"#/components/schemas/MetaSchema"}},"type":"object","required":["data","meta"],"title":"ApiV2Response[UserAttributeDefinitionSchema]"},"UserAttributeDefinitionSchema":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name","description":"A stable, unique key for this definition within the workspace, referenced by the data model - unlike `label`, it can't be changed after creation."},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType","description":"Determines the format required in `value` wherever this definition is used: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"label":{"type":"string","title":"Label","description":"The human-facing display text for this definition; unlike `name`, this can be changed at any time."}},"type":"object","required":["id","workspace_id","name","data_type","label"],"title":"UserAttributeDefinitionSchema"},"UserAttributeDataType":{"type":"string","enum":["string","number","date"],"title":"UserAttributeDataType"},"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The ApiV2Response\_UserAttributeSchema\_ object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"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","description":"Formatted per `data_type`: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType","description":"Determines `value`'s format: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"name":{"type":"string","title":"Name","description":"The referenced `user_attribute_definition_id`'s `name`."},"source":{"$ref":"#/components/schemas/UserAttributeSource","description":"Whether this value is set directly on the member (\"user\") or inherited from a group (\"group\")."},"source_id":{"type":"string","title":"Source Id","description":"ID of the group or member (matching `source`) this value comes from."},"user_attribute_precedence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Attribute Precedence","description":"The source group's precedence; null when `source` is \"user\" - only groups carry a precedence."},"is_overridden":{"type":"boolean","title":"Is Overridden","description":"True if a higher-precedence group value, or a directly-set member value, takes effect instead of this one."}},"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","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The BaseErrorMetadata object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"}}}}
```

## The CreateGroupSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"CreateGroupSchema":{"properties":{"name":{"type":"string","title":"Name"},"user_attribute_precedence":{"type":"integer","title":"User Attribute Precedence","description":"Must be greater than 0; 0 is reserved for the all_users group."}},"type":"object","required":["name","user_attribute_precedence"],"title":"CreateGroupSchema"}}}}
```

## The CreateUserAttributeDefinitionSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"CreateUserAttributeDefinitionSchema":{"properties":{"name":{"type":"string","title":"Name","description":"A stable, unique key for this definition within the workspace, referenced by the data model - unlike `label`, it can't be changed after creation."},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType","description":"Determines the format required in `value` wherever this definition is used: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"label":{"type":"string","title":"Label","description":"The human-facing display text for this definition; unlike `name`, this can be changed at any time."}},"type":"object","required":["name","data_type","label"],"title":"CreateUserAttributeDefinitionSchema"},"UserAttributeDataType":{"type":"string","enum":["string","number","date"],"title":"UserAttributeDataType"}}}}
```

## The CreateUserAttributeSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"CreateUserAttributeSchema":{"properties":{"user_attribute_definition_id":{"type":"string","title":"User Attribute Definition Id","description":"ID of an existing definition in this workspace - see `GET .../user_attribute_definitions`."},"value":{"type":"string","title":"Value","description":"Must match the referenced definition's `data_type` format: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."}},"type":"object","required":["user_attribute_definition_id","value"],"title":"CreateUserAttributeSchema"}}}}
```

## The CreateWorkspaceResponseSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"CreateWorkspaceResponseSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"provision_by_default":{"type":"boolean","title":"Provision By Default","description":"When true, new users signing in via SSO are automatically granted access to this workspace; when false, they need an explicit invite."}},"type":"object","required":["id","name","provision_by_default"],"title":"CreateWorkspaceResponseSchema"}}}}
```

## The CreateWorkspaceSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"CreateWorkspaceSchema":{"properties":{"name":{"type":"string","title":"Name"},"provision_by_default":{"type":"boolean","title":"Provision By Default","description":"When true, new users signing in via SSO are automatically granted access to this workspace; when false, they need an explicit invite.","default":false}},"type":"object","required":["name"],"title":"CreateWorkspaceSchema"}}}}
```

## The ErrorSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"ErrorSchema":{"properties":{"message":{"type":"string","title":"Message"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"}}}}
```

## The GroupResponseSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"GroupResponseSchema":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"is_all_users":{"type":"boolean","title":"Is All Users","description":"Whether this is the built-in group containing every workspace member; its membership always tracks the roster and can't be edited directly."},"user_attribute_precedence":{"type":"integer","title":"User Attribute Precedence","description":"Determines which group's value wins when a member is in several groups that set the same user attribute; higher wins."},"users":{"items":{"type":"string"},"type":"array","title":"Users","description":"IDs of the group's members."}},"type":"object","required":["id","workspace_id","name","is_all_users","user_attribute_precedence","users"],"title":"GroupResponseSchema"}}}}
```

## The MeSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"MeSchema":{"properties":{"organization":{"$ref":"#/components/schemas/MyOrganizationSchema"},"workspaces":{"items":{"$ref":"#/components/schemas/MyWorkspaceSchema"},"type":"array","title":"Workspaces","description":"Workspaces in your organization that you're a member of and, for a PAT scoped to specific workspaces, within the token's scope. Archived workspaces are excluded."}},"type":"object","required":["organization","workspaces"],"title":"MeSchema"},"MyOrganizationSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"MyOrganizationSchema"},"MyWorkspaceSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"MyWorkspaceSchema"}}}}
```

## The MetaSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"MetaSchema":{"properties":{"status":{"$ref":"#/components/schemas/ResponseStatus"},"errors":{"items":{"$ref":"#/components/schemas/ErrorSchema"},"type":"array","title":"Errors","description":"Non-empty exactly when `status` is \"error\"."},"warnings":{"items":{"$ref":"#/components/schemas/WarningSchema"},"type":"array","title":"Warnings","description":"Can be non-empty even when `status` is \"success\" - a non-fatal issue with an otherwise-successful request."},"request_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Source","description":"Which auth mechanism served this request (e.g. \"api_key\", \"pat\"); null when not tracked for this endpoint."}},"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","description":"Matches this response's actual HTTP status code."},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Occurred At","description":"ISO 8601 UTC timestamp."},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Machine-readable code for errors that need special handling (e.g. \"SSO_REQUIRED\") rather than being shown generically; null for most errors."},"error_metadata":{"anyOf":[{"$ref":"#/components/schemas/BaseErrorMetadata"},{"type":"null"}],"description":"Additional structured detail for specific error conditions; usually null."}},"type":"object","required":["message"],"title":"ErrorSchema"},"BaseErrorMetadata":{"properties":{},"type":"object","title":"BaseErrorMetadata"},"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The MyOrganizationSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"MyOrganizationSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"MyOrganizationSchema"}}}}
```

## The MyWorkspaceSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"MyWorkspaceSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"MyWorkspaceSchema"}}}}
```

## The ResponseStatus object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"ResponseStatus":{"type":"string","enum":["success","error"],"title":"ResponseStatus"}}}}
```

## The UpdateGroupSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"UpdateGroupSchema":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"user_attribute_precedence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Attribute Precedence","description":"Must be greater than 0; 0 is reserved for the all_users group."}},"type":"object","title":"UpdateGroupSchema"}}}}
```

## The UpdateUserAttributeDefinitionSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"UpdateUserAttributeDefinitionSchema":{"properties":{"label":{"type":"string","title":"Label","description":"The human-facing display text for this definition; unlike `name`, this can be changed at any time."}},"type":"object","required":["label"],"title":"UpdateUserAttributeDefinitionSchema"}}}}
```

## The UpdateUserAttributeSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"UpdateUserAttributeSchema":{"properties":{"value":{"type":"string","title":"Value","description":"Must match the existing definition's `data_type` format: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."}},"type":"object","required":["value"],"title":"UpdateUserAttributeSchema"}}}}
```

## The UserAttributeDataType object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"UserAttributeDataType":{"type":"string","enum":["string","number","date"],"title":"UserAttributeDataType"}}}}
```

## The UserAttributeDefinitionSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"UserAttributeDefinitionSchema":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name","description":"A stable, unique key for this definition within the workspace, referenced by the data model - unlike `label`, it can't be changed after creation."},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType","description":"Determines the format required in `value` wherever this definition is used: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"label":{"type":"string","title":"Label","description":"The human-facing display text for this definition; unlike `name`, this can be changed at any time."}},"type":"object","required":["id","workspace_id","name","data_type","label"],"title":"UserAttributeDefinitionSchema"},"UserAttributeDataType":{"type":"string","enum":["string","number","date"],"title":"UserAttributeDataType"}}}}
```

## The UserAttributeSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"UserAttributeSchema":{"properties":{"id":{"type":"string","title":"Id"},"user_attribute_definition_id":{"type":"string","title":"User Attribute Definition Id"},"value":{"type":"string","title":"Value","description":"Formatted per `data_type`: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"data_type":{"$ref":"#/components/schemas/UserAttributeDataType","description":"Determines `value`'s format: \"string\" allows free text, \"number\" requires a parseable number, \"date\" requires `YYYY-MM-DD`."},"name":{"type":"string","title":"Name","description":"The referenced `user_attribute_definition_id`'s `name`."},"source":{"$ref":"#/components/schemas/UserAttributeSource","description":"Whether this value is set directly on the member (\"user\") or inherited from a group (\"group\")."},"source_id":{"type":"string","title":"Source Id","description":"ID of the group or member (matching `source`) this value comes from."},"user_attribute_precedence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Attribute Precedence","description":"The source group's precedence; null when `source` is \"user\" - only groups carry a precedence."},"is_overridden":{"type":"boolean","title":"Is Overridden","description":"True if a higher-precedence group value, or a directly-set member value, takes effect instead of this one."}},"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"}}}}
```

## The UserAttributeSource object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"UserAttributeSource":{"type":"string","enum":["user","group"],"title":"UserAttributeSource"}}}}
```

## The WarningSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"WarningSchema":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"WarningSchema"}}}}
```

## The WorkspaceSchema object

```json
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"2.0.0"},"components":{"schemas":{"WorkspaceSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"provision_by_default":{"type":"boolean","title":"Provision By Default","description":"When true, new users signing in via SSO are automatically granted access to this workspace; when false, they need an explicit invite."},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At","description":"When this workspace was archived; null while active."}},"type":"object","required":["id","name","provision_by_default"],"title":"WorkspaceSchema"}}}}
```


---

# 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-beta/api-reference/models.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.
