> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/push/campaigns/log.md).

# Message log

Read the notifications of one push campaign batch — who got them, their ids and status.

**Where:** Push → Campaigns → **View** → a batch · inside `/projects/<project>/push/campaigns/<id>/view`

## Before you start

* The campaign has at least one batch — see [Campaign details](/codemash/cloud/push/campaigns/details.md).

## Steps

1. Open the campaign's [details page](/codemash/cloud/push/campaigns/details.md) and press a batch card. The **Batch** view (with the batch id `cmpb_…` under the title) lists its notifications: the user ids it went to, the notification id (`ntf_…`), the time and the status (Completed, Failed, Viewed or Clicked).

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-431f59911a050b5ba17119e825d63af8e6fb55f6%2Fcampaigns-log-1.png?alt=media" alt="Batch cmpb_1qvxOJONfWEC5g6SYu3JLk with one notification to usr_4ZhLWK2e1iIQmK8KuYFYRL, usr_2ybNbF3I0Cdjt1RmNXkRVH, usr_5Us6T01VpYu3PgK6a1d4tv, id ntf_4GIYLkv1C44s2ubc5xiY0d, Completed"><figcaption><p>The notifications of one batch.</p></figcaption></figure>

   A batch without recipients shows a yellow box instead, for example *No recipients found for this batch: nobody in the audience has a registered device on the chosen platforms.*
2. To leave the batch, open the campaign again from **Push → Campaigns**.

{% hint style="warning" %}
Cloud has no screen for one notification yet: pressing a notification shows an empty page, and the **Back** button of the batch view does nothing. To read the title and body that were sent, use the SDK, the CLI or the API below.
{% endhint %}

## Result

You know which users a batch reached and whether the provider accepted it: **Completed** means the notification was handed to the provider. **Viewed** and **Clicked** appear only when your app reports them back. With the Fake provider the notification is recorded as sent and nothing reaches a device.

The batch view has no address of its own: the address bar keeps `…/campaigns/<id>/view`, so a reload opens the campaign again.

## Change or remove it later

* A single notification cannot be changed or deleted. Deleting the campaign on its [details page](/codemash/cloud/push/campaigns/details.md#change-or-remove-it-later) deletes its batches and message log with it.
* A notification can be shown without signing in through its signed **preview link** — see [Preview link](/codemash/cloud/concepts/message-templates/preview-link.md).

## Do it from code

You need the campaign id and the batch id. Each message carries the title (`subject`) and the body as they were sent, with the tokens filled in.

```ts
const { list } = await norbix.hub.notifications.getPushCampaignMessages({
  campaignId: 'cmp_7LX6kndj6fMBX3ZbsiATog',
  campaignBatchId: 'cmpb_3dDYvk2jPu9RngNLsl8QMt',
});
console.log(list.items.map((m) => `${m.subject}: ${m.body}`));
// [ 'Your order is on its way: Hi Ada, order A-10483 left our warehouse today.' ]
```

```sh
norbix hub notifications push campaign messages get --campaignId cmp_7LX6kndj6fMBX3ZbsiATog --campaignBatchId cmpb_3dDYvk2jPu9RngNLsl8QMt
```

The client setup is on the [Push page](/codemash/cloud/push.md#use-it-from-code). API: [Get Push Campaign Messages](/codemash/api-reference/notifications/push/get-push-campaign-messages.md) · [Get Push Campaign Batch Notifications](/codemash/api-reference/notifications/push/get-push-campaign-batch-notifications.md) · [Get Push Campaign Batch Notification](/codemash/api-reference/notifications/push/get-push-campaign-batch-notification.md) (one notification, by its `ntf_…` id)
