---
sidebar:
  label: roboto.notifications.http_resources
  order: 1
title: roboto.notifications.http_resources
---
## Module Contents

### UpdateNotificationRequest

```python
class roboto.notifications.http_resources.UpdateNotificationRequest(/, **data: Any)
```

`from roboto.notifications import UpdateNotificationRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/notifications/http_resources.py#L18-L46)

Bases: `pydantic.BaseModel`, [`roboto.notifications.validator.LifecycleStatusValidator`](/docs/reference/python-sdk/roboto/notifications/validator#roboto.notifications.validator.LifecycleStatusValidator)

Request body for `PUT /v1/notifications/{notification_id}`.

Updates one notification's read or delivery status. It is also an item of `requests` in the request body of `PUT /v1/notifications/batch`. A field left `None` is unchanged. Building the request raises `RobotoConditionException` when a `lifecycle_status` value is not a status of its channel.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateNotificationRequest.lifecycle_status** (`dict[roboto.notifications.record.NotificationChannel, str] | None`) = `None`: Delivery status to set on each channel, keyed by channel.

  Channels left out keep their status. Each value is a status of its channel, as in [`lifecycle_status`](/docs/reference/python-sdk/roboto/notifications/record#roboto.notifications.record.NotificationRecord.lifecycle_status).

  Leaving it at its default of `None` leaves every channel unchanged, but building the request with `None` passed explicitly raises `AttributeError`. Roboto fails the same way on a `null` value in a request body, and [`batch_update_notifications()`](/docs/reference/python-sdk/roboto/notifications/http_client#roboto.notifications.http_client.NotificationsClient.batch_update_notifications) sends `null` for each update that leaves it unset.

- **UpdateNotificationRequest.notification_id** (`str`): ID of the notification to update.

  As the body of `PUT /v1/notifications/{notification_id}`, an ID that differs from the path's raises `RobotoInvalidRequestException`.

- **UpdateNotificationRequest.read_status** (`roboto.notifications.record.ReadStatus | None`) = `None`: Read status to set.
