---
sidebar:
  hidden: true
title: roboto.domain.users.operations
---
## Module Contents

### CreateUserRequest

```python
class roboto.domain.users.operations.CreateUserRequest(/, **data: Any)
```

`from roboto import CreateUserRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/users/operations.py#L17-L57)

Bases: `pydantic.BaseModel`

Request body for [`create()`](/docs/reference/python-sdk/roboto/domain/users/user#roboto.domain.users.user.User.create).

Only Roboto administrators may send it.

A `user_id` that already belongs to a user raises `RobotoConflictException`. `is_system_user` set to `True` by any caller other than Roboto's own services raises `RobotoUnauthorizedException`.

**Parameters**

- **data** (`Any`)

**Attributes**

- **CreateUserRequest.default_notification_channels** (`list[roboto.notifications.NotificationChannel] | None`): Notification channels to enable for the user.

  Every other channel starts disabled. `None` or an empty list enables none.

- **CreateUserRequest.default_notification_types** (`list[roboto.notifications.NotificationType] | None`): Notification types to enable for the user.

  Every other type starts disabled. `None` or an empty list enables none.

- **CreateUserRequest.is_service_user** (`bool`) = `False`: Whether the user is a service user: an account that acts for an organization rather than a person.

  A trigger, for example, can invoke its action as a service user.

- **CreateUserRequest.is_system_user** (`bool`) = `False`: Whether to create the user as Roboto staff, such as a Roboto administrator.

- **CreateUserRequest.name** (`str | None`) = `None`: Human-readable name of the user.

- **CreateUserRequest.picture_url** (`str | None`) = `None`: URL of the user's profile picture.

- **CreateUserRequest.user_id** (`str`): Unique ID of the user, which for a person is their email address.

  Roboto stores it lowercased, after Unicode NFKC normalization.

### UpdateUserRequest

```python
class roboto.domain.users.operations.UpdateUserRequest(/, **data: Any)
```

`from roboto import UpdateUserRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/users/operations.py#L60-L101)

Bases: `pydantic.BaseModel`

Request body for [`update()`](/docs/reference/python-sdk/roboto/domain/users/user#roboto.domain.users.user.User.update).

A field left `None` is unchanged. Constructing the model raises `pydantic.ValidationError` when `name` or `picture_url` is an empty string.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateUserRequest.name** (`str | None`) = `None`: Human-readable name to set on the user.

- **UpdateUserRequest.notification_channels_enabled** (`dict[roboto.notifications.NotificationChannel, bool] | None`) = `None`: Whether each notification channel is enabled for the user.

  Replaces the user's whole mapping, so a channel left out is disabled. An empty mapping, like `None`, leaves it unchanged.

- **UpdateUserRequest.notification_types_enabled** (`dict[roboto.notifications.NotificationType, bool] | None`) = `None`: Whether each notification type is enabled for the user.

  Replaces the user's whole mapping, so a type left out is disabled. An empty mapping, like `None`, leaves it unchanged.

- **UpdateUserRequest.picture_url** (`str | None`) = `None`: URL of the profile picture to set on the user.

#### UpdateUserRequest.validate_non_empty_string()

```python
@classmethod
def validate_non_empty_string(
    value: Optional[str],
    info: pydantic.ValidationInfo,
) -> Optional[str]
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/users/operations.py#L89-L101)

Reject an empty `name` or `picture_url`.

Pydantic calls this while it builds the request.

**Parameters**

- **value** (`Optional[str]`)
- **info** (`pydantic.ValidationInfo`)

**Returns**

- `Optional[str]`
