> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siftstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# users

> sift/users/v2/users.proto

<a name="sift_users_v2_users-proto" />

<a name="sift_users_v2_users-proto-services" />

## Services

*RPC methods exposed by this API.*

### UserService

| Method                       | Request                                                                     | Response                                                                      | Description                                                      |
| :--------------------------- | :-------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | :--------------------------------------------------------------- |
| UpdateUserOrganizationActive | [UpdateUserOrganizationActiveRequest](#updateuserorganizationactiverequest) | [UpdateUserOrganizationActiveResponse](#updateuserorganizationactiveresponse) | Used to toggle a user's active status within their organization. |
| GetUser                      | [GetUserRequest](#getuserrequest)                                           | [GetUserResponse](#getuserresponse)                                           | Retrieves a user object.                                         |
| ListActiveUsers              | [ListActiveUsersRequest](#listactiveusersrequest)                           | [ListActiveUsersResponse](#listactiveusersresponse)                           | List active users.                                               |
| ListUsers                    | [ListUsersRequest](#listusersrequest)                                       | [ListUsersResponse](#listusersresponse)                                       | List users.                                                      |

<a name="sift_users_v2_users-proto-messages" />

## Messages

*Data models used across requests/responses.*

### GetUserRequest

The request for a call to retrieve a single existing user by its user\_id.

| Field    | Type   | Label | Description                                    |
| :------- | :----- | :---- | :--------------------------------------------- |
| user\_id | string |       | The id of the asset to be retrieved. Required. |

### GetUserResponse

| Field | Type                                                  | Label | Description |
| :---- | :---------------------------------------------------- | :---- | :---------- |
| user  | [sift.common.type.v1.User](#sift-common-type-v1-user) |       |             |

### ListActiveUsersRequest

The request for a call to `UserService_ListActiveUsers` to retrieve users.

| Field            | Type   | Label | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| :--------------- | :----- | :---- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| page\_size       | uint32 |       | The maximum number of users to return. The service may return fewer than this value. If unspecified, at most 50 users will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.                                                                                                                                                                                                                                             |
| page\_token      | string |       | A page token, received from a previous `ListActiveUsers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListActiveUsers` must match the call that provided the page token. Optional.                                                                                                                                                                                                                        |
| filter           | string |       | A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. Available fields to filter by are `user_id` and `name`. For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). For more information about the fields used for filtering, please refer to [this definition](/docs/api/grpc/protocol-buffers/users#user). Optional. |
| organization\_id | string |       | Optional. If provided, this will scope down the user search to just those in the organization ID provided.                                                                                                                                                                                                                                                                                                                                                          |
| order\_by        | string |       | How to order the retrieved users. Formatted as a comma-separated string i.e. "FIELD\_NAME\[ desc],...". Available fields to order\_by are `name`, `created_date`, and `modified_date`. If left empty, items are ordered by `name` in ascending order (A-Z). For more information about the format of this field, read [this](https://google.aip.dev/132#ordering) Example: "created\_date desc,modified\_date"                                                      |

### ListActiveUsersResponse

The response of a call to `UserService_ListActiveUsersResponse`.

| Field             | Type                                                  | Label    | Description |
| :---------------- | :---------------------------------------------------- | :------- | :---------- |
| users             | [sift.common.type.v1.User](#sift-common-type-v1-user) | repeated |             |
| next\_page\_token | string                                                |          |             |

### ListUsersRequest

The request for a call to `UserService_ListUsers` to retrieve users.

| Field       | Type   | Label | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| :---------- | :----- | :---- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| page\_size  | uint32 |       | The maximum number of users to return. The service may return fewer than this value. If unspecified, at most 50 users will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.                                                                                                                                                                                                                                             |
| page\_token | string |       | A page token, received from a previous `ListUsers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUsers` must match the call that provided the page token. Optional.                                                                                                                                                                                                                                    |
| filter      | string |       | A [Common Expression Language (CEL)](https://github.com/google/cel-spec) filter string. Available fields to filter by are `user_id` and `name`. For further information about how to use CELs, please refer to [this guide](https://github.com/google/cel-spec/blob/master/doc/langdef.md#standard-definitions). For more information about the fields used for filtering, please refer to [this definition](/docs/api/grpc/protocol-buffers/users#user). Optional. |
| order\_by   | string |       | How to order the retrieved users. Formatted as a comma-separated string i.e. "FIELD\_NAME\[ desc],...". Available fields to order\_by are: - created\_date - modified\_date                                                                                                                                                                                                                                                                                         |

### ListUsersResponse

The response of a call to `UserService_ListUsersResponse`.

| Field             | Type                                                  | Label    | Description |
| :---------------- | :---------------------------------------------------- | :------- | :---------- |
| users             | [sift.common.type.v1.User](#sift-common-type-v1-user) | repeated |             |
| next\_page\_token | string                                                |          |             |

### UpdateUserOrganizationActiveRequest

| Field            | Type   | Label | Description |
| :--------------- | :----- | :---- | :---------- |
| user\_id         | string |       |             |
| organization\_id | string |       |             |
| active           | bool   |       |             |

### UpdateUserOrganizationActiveResponse

*This message has no fields.*

<a name="sift_users_v2_users-proto-enums" />

## Enums

*Allowed constant values used in message fields.*
