# Update push notification message status

### Description

This service updates the status of a specific push notification message for a logged-in consumer. Its primary use case is marking an inbox message as "read" or "opened" to keep engagement metrics accurate.

***

### Request

#### Restrictions

This service requires an authenticated user and can only be called after a successful consumer login.

#### Endpoint

```
PUT https://<server-url>/api/v4/communications/push-notifications/{appId}/messages/{messageId}/status
```

#### Path Parameters

| **Parameter** | **Type** | **Description**                                               |
| ------------- | -------- | ------------------------------------------------------------- |
| `appId`       | String   | The unique identifier for the push notification application.  |
| `messageId`   | String   | The unique identifier for the specific message being updated. |

#### Parameters

| **Parameter**  | **Location**   | **Description**                                                                    |
| -------------- | -------------- | ---------------------------------------------------------------------------------- |
| `touchpoint`   | Query / Header | The identifier for the touchpoint. Use `Thalamus-Touchpoint` for the header.       |
| `token`        | Query / Header | The authentication token for the API session. Use `Thalamus-Token` for the header. |
| `Content-Type` | Header         | Must be `application/json`.                                                        |

#### Full URL Example

```
https://<server-url>/api/v4/communications/push-notifications/f7d95316-198f-4f4f-a5b4-5fda8d77b9bb/messages/c26feb62-f00b-4d6e-950c-a336a3a06d28/status?touchpoint=test&token=...
```

#### Request Body

The request body specifies the new status for the message.

| **Field** | **Type** | **Description**                                                      |
| --------- | -------- | -------------------------------------------------------------------- |
| `status`  | String   | The new status of the notification. Commonly used value: `"opened"`. |

JSON

```
{
   "status": "opened"
}
```

***

### Response

#### ✅ Successful Response: `200 OK`

Indicates the message status was successfully updated in the system.

JSON

```
{
   "OK"
}
```

#### ❌ Unsuccessful Response: `400 Bad Request`

Returned if the provided status value is not recognized by Thalamus.

JSON

```
{
    "Invalid push notification status"
}
```
