> 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/sms/campaigns.md).

# Campaigns

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

**Where:** SMS → **Campaigns** · `/projects/<project>/sms/campaigns`

A **campaign** is one send of one template to one audience. The list shows every SMS campaign of the project: the ones you sent now, the ones that wait for a later time, the one-number 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-61c4e3bf1441d8fc175b922c1a7fe4dcfe7cb592%2Fcampaigns-list-2.png?alt=media" alt="SMS Campaigns list with the Campaign ID, Template ID, Date From and Date To filters and four rows: Appointment reminder Stopped, Login code Completed, Winter sale Completed, Login code Completed, each sent through Test Me (Default) with a View link"><figcaption><p>SMS Campaigns with four campaigns.</p></figcaption></figure>

## Columns, search and filters

| Column      | What it shows                                                                                                                                                                    |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Created On  | When the campaign was created, in your time zone.                                                                                                                                |
| Status      | The last status: Pending, Registered, Scheduled, Started, Processing, Completed, Stopped or Failed — see [Campaigns → Statuses](/codemash/cloud/concepts/campaigns.md#statuses). |
| Template    | The template the campaign sends, e.g. `Winter sale`.                                                                                                                             |
| Integration | The integration that sends it, e.g. `Test Me`; `(Default)` is added when it is the project's default integration.                                                                |
| View        | Opens the [campaign details](/codemash/cloud/sms/campaigns/details.md).                                                                                                          |

Narrow the list with **Campaign ID** (e.g. `cmp_2lIlYHe8UpSd9mz1fv0Bw9`), **Template ID** (e.g. `tmpl_6ITDztVHBZQujSUOtLIZvy`) 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.

## What you can do here

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

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

## Do it from code

```ts
const { list } = await norbix.hub.notifications.getSmsCampaigns({ pageSize: 20 });
console.log(list.items.map((c) => `${c.viewId} ${c.template?.templateName} ${c.statusHistory.at(-1).status}`));
// [ 'cmp_3kDPsRAnZnOkbzC54OwJ9B Login code Completed', 'cmp_72j172GM3OP61tDSQBRqFy Appointment reminder Stopped', … ]
```

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

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