> 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.md).

# Campaigns

Every push send of the project — sent now, scheduled, a template test, or fired by a trigger — with its audience, status, template and provider.

**Where:** Push → **Campaigns** · `/projects/<project>/push/campaigns`

A **campaign** is one send of one template to one audience. The list shows every push campaign of the project: the ones you sent now, the ones that wait for a later time, the one-recipient campaigns of a template's **Test** panel, and the campaigns a trigger created. The rules that are the same in every channel (statuses, no edit after create, the project database) are on the [Campaigns concept](/codemash/cloud/concepts/campaigns.md) page.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-f188344f4b64a04edbc89498e67354af6981150c%2Fcampaigns-list-2.png?alt=media" alt="Push Campaigns list with the Template ID, Date From and Date To filters and five rows: Specified users Stopped Appointment reminder, Specific devices Completed Weekend sale, Specified users Completed Order shipped, All users Completed Weekend sale, Specified users Completed Password changed, each sent through Test Me (Default) with a View link"><figcaption><p>Push Campaigns with five campaigns.</p></figcaption></figure>

## Columns, search and filters

| Column      | What it shows                                                                                                                                                                    |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Recipients  | The audience: **All users**, **Specified users**, **Account owner or team members**, **Recipients from a collection** or **Specific devices**. Press it to open the campaign.    |
| Status      | The last status: Pending, Registered, Scheduled, Started, Processing, Completed, Stopped or Failed — see [Campaigns → Statuses](/codemash/cloud/concepts/campaigns.md#statuses). |
| Integration | The integration that sends it, e.g. `Test Me`; `(Default)` is added when it is the project's default integration.                                                                |
| Template    | The template the campaign sends, e.g. `Weekend sale`.                                                                                                                            |
| Created On  | When the campaign was created, in your time zone.                                                                                                                                |
| View        | Opens the [campaign details](/codemash/cloud/push/campaigns/details.md).                                                                                                         |

Narrow the list with **Template ID** (e.g. `tmpl_5IStKcssvWDLtEJLJdFKvJ`) and a **Date From** / **Date To** range, then press **Search**; **Clear** empties the filters. The list refreshes itself every 15 seconds, so a running send moves on its own. While the project database is still being set up, a banner says so instead of the list.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-8250681ef8d26b7db39467d365b023fce2f01458%2Fcampaigns-list-3.png?alt=media" alt="Push Campaigns filtered by Template ID tmpl_5IStKcssvWDLtEJLJdFKvJ: two Weekend sale campaigns, Specific devices and All users"><figcaption><p>The list filtered by one template.</p></figcaption></figure>

## What you can do here

* [Create a campaign and send it now](/codemash/cloud/push/campaigns/new.md) — **Create Campaign**
* [Schedule a campaign for later](/codemash/cloud/push/campaigns/schedule.md)
* [Stop a campaign](/codemash/cloud/push/campaigns/stop.md)
* [Read a campaign's details](/codemash/cloud/push/campaigns/details.md) — **View**
* [Read the message log](/codemash/cloud/push/campaigns/log.md)

Deleting a finished campaign is on its [details page](/codemash/cloud/push/campaigns/details.md#change-or-remove-it-later).

## Do it from code

```ts
const { list } = await norbix.hub.notifications.getPushCampaigns({ pageSize: 20 });
console.log(list.items.map((c) => `${c.viewId} ${c.template?.templateName} ${c.statusHistory?.at(-1)?.status}`));
// [ 'cmp_5Gss9JG8XXgGc0v9PIAgRd Weekend sale Completed', 'cmp_7LX6kndj6fMBX3ZbsiATog Order shipped Completed', … ]
```

```sh
norbix hub notifications push campaigns get --pageSize 3
```

The client setup is on the [Push page](/codemash/cloud/push.md#use-it-from-code). `templateId` filters by template; `from` and `to` filter by creation time in Unix seconds. API: [Get Push Campaigns](/codemash/api-reference/notifications/push/get-push-campaigns.md)
