---
title: "Update notification"
description: "Update an existing notification"
---

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

Path: Channel Automation API › Notifications

`PUT /api/notifications/{workspaceId}/{notificationId}`

Update an existing notification

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Path parameters

- `workspaceId` (`put/api/notifications/workspaceId/notificationId.path.workspaceId`; string, required) — Workspace ID
- `notificationId` (`put/api/notifications/workspaceId/notificationId.path.notificationId`; string, required) — Notification ID

## Request body

_Required._

- `title` (`put/api/notifications/workspaceId/notificationId.title`; string, optional) — Updated notification title
- `message` (`put/api/notifications/workspaceId/notificationId.message`; string, optional) — Updated notification message
- `type` (`put/api/notifications/workspaceId/notificationId.type`; string, optional) — Updated notification type
  - one of `"info"`, `"success"`, `"warning"`, `"error"`
- `priority` (`put/api/notifications/workspaceId/notificationId.priority`; string, optional) — Updated priority level
  - one of `"low"`, `"medium"`, `"high"`, `"urgent"`
- `read` (`put/api/notifications/workspaceId/notificationId.read`; boolean, optional) — Mark notification as read/unread

## Example request

```json
{
  "title": "string",
  "message": "string",
  "type": "info",
  "priority": "low",
  "read": true
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.channelautomation.com/api/notifications/<workspaceId>/<notificationId>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "string",
  "message": "string",
  "type": "info",
  "priority": "low",
  "read": true
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/notifications/<workspaceId>/<notificationId>';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({title: 'string', message: 'string', type: 'info', priority: 'low', read: true})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/notifications/<workspaceId>/<notificationId>"

payload = {
    "title": "string",
    "message": "string",
    "type": "info",
    "priority": "low",
    "read": True
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Notification updated successfully

#### Example

```json
{
  "success": true,
  "notification": {
    "id": "string",
    "workspace_id": "string",
    "title": "New Message Received",
    "message": "You have received a new message from John Doe",
    "type": "info",
    "priority": "medium",
    "read": false,
    "dismissed": false,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  },
  "message": "string"
}
```

- `success` (`put/api/notifications/workspaceId/notificationId.response.200.success`; boolean, optional)
- `notification` (`put/api/notifications/workspaceId/notificationId.response.200.notification`; object, optional)
  - `id` (`put/api/notifications/workspaceId/notificationId.response.200.notification.id`; string, optional) — Unique notification identifier
  - `workspace_id` (`put/api/notifications/workspaceId/notificationId.response.200.notification.workspace_id`; string, optional) — Workspace ID
  - `title` (`put/api/notifications/workspaceId/notificationId.response.200.notification.title`; string, optional) — Notification title
    - example `"New Message Received"`
  - `message` (`put/api/notifications/workspaceId/notificationId.response.200.notification.message`; string, optional) — Notification message content
    - example `"You have received a new message from John Doe"`
  - `type` (`put/api/notifications/workspaceId/notificationId.response.200.notification.type`; string, optional) — Notification type
    - one of `"info"`, `"success"`, `"warning"`, `"error"`; example `"info"`
  - `priority` (`put/api/notifications/workspaceId/notificationId.response.200.notification.priority`; string, optional) — Notification priority level
    - one of `"low"`, `"medium"`, `"high"`, `"urgent"`; example `"medium"`
  - `read` (`put/api/notifications/workspaceId/notificationId.response.200.notification.read`; boolean, optional) — Whether notification has been read
    - default `false`
  - `dismissed` (`put/api/notifications/workspaceId/notificationId.response.200.notification.dismissed`; boolean, optional) — Whether notification has been dismissed
    - default `false`
  - `created_at` (`put/api/notifications/workspaceId/notificationId.response.200.notification.created_at`; string, optional) — Notification creation timestamp
    - format `date-time`
  - `updated_at` (`put/api/notifications/workspaceId/notificationId.response.200.notification.updated_at`; string, optional) — Last update timestamp
    - format `date-time`
- `message` (`put/api/notifications/workspaceId/notificationId.response.200.message`; string, optional)

### 404

Notification not found

### 500

Server error


Source: https://developer.channelautomations.com/api/put-api-notifications-workspace-id-notification-id/index.md
