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

# Users

## GET /v1/users

> Get all users in the tenant

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Users","description":""}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.User.UserModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique identifier for the user","nullable":true},"Email":{"type":"string","description":"Email address for the user","nullable":true},"Firstname":{"type":"string","description":"Firstname of the user","nullable":true},"Lastname":{"type":"string","description":"Lastname of the user","nullable":true},"Status":{"$ref":"#/components/schemas/Struct.App.Api.Models.User.UserStatus"},"UserGroups":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Groups the user is a member of","nullable":true},"Roles":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Roles the user is a member of","nullable":true}},"additionalProperties":false,"description":"Represents a user in the tenant"},"Struct.App.Api.Models.User.UserStatus":{"enum":[0,1,2],"type":"integer","description":"Represents a status for a user \n\n- `0` = **Invited**: User has been invited but not yet activated\n- `1` = **Active**: User is active and can log in\n- `2` = **Disabled**: User is disabled and cannot log in","format":"int32"},"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/users":{"get":{"tags":["Users"],"summary":"Get all users in the tenant","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.User.UserModel"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## POST /v1/users

> Invites a user to the tenant

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Users","description":""}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.User.InviteUserModel":{"type":"object","properties":{"UserEmail":{"type":"string","description":"Email of the user to invite","nullable":true},"TenantRoleUids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Roles to assign to the user","nullable":true},"TenantUserGroupUids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"User groups to assign to the user","nullable":true},"Message":{"type":"string","description":"Message to include in the invitation","nullable":true}},"additionalProperties":false,"description":"Model for inviting a user to a tenant"},"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/users":{"post":{"tags":["Users"],"summary":"Invites a user to the tenant","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.User.InviteUserModel"}}}},"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## PUT /v1/users

>

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Users","description":""}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.User.UpdateUserModel":{"type":"object","properties":{"UserUid":{"type":"string","description":"The unique identifier of the user","nullable":true},"Roles":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The roles to assign to the user","nullable":true},"UserGroups":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The user groups to assign to the user","nullable":true}},"additionalProperties":false,"description":"Represents a model for updating a user"},"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/users":{"put":{"tags":["Users"],"summary":"","requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.User.UpdateUserModel"}}}},"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## GET /v1/users/{uid}

> Returns a single user from the tenant

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Users","description":""}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","description":"","name":"Authorization","in":"header"}},"schemas":{"Struct.App.Api.Models.User.UserModel":{"type":"object","properties":{"Uid":{"type":"string","description":"Unique identifier for the user","nullable":true},"Email":{"type":"string","description":"Email address for the user","nullable":true},"Firstname":{"type":"string","description":"Firstname of the user","nullable":true},"Lastname":{"type":"string","description":"Lastname of the user","nullable":true},"Status":{"$ref":"#/components/schemas/Struct.App.Api.Models.User.UserStatus"},"UserGroups":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Groups the user is a member of","nullable":true},"Roles":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Roles the user is a member of","nullable":true}},"additionalProperties":false,"description":"Represents a user in the tenant"},"Struct.App.Api.Models.User.UserStatus":{"enum":[0,1,2],"type":"integer","description":"Represents a status for a user \n\n- `0` = **Invited**: User has been invited but not yet activated\n- `1` = **Active**: User is active and can log in\n- `2` = **Disabled**: User is disabled and cannot log in","format":"int32"},"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/users/{uid}":{"get":{"tags":["Users"],"summary":"Returns a single user from the tenant","parameters":[{"name":"uid","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Struct.App.Api.Models.User.UserModel"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## DELETE /v1/users/{uid}

>

```json
{"openapi":"3.0.1","info":{"title":"Struct PIM Public API","version":"1.0"},"tags":[{"name":"Users","description":""}],"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/users/{uid}":{"delete":{"tags":["Users"],"summary":"","parameters":[{"name":"uid","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
