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

# Schedule a campaign

Schedule an SMS campaign for a later date and time, in a time zone you pick.

**Where:** SMS → Campaigns → **Create Campaign** → **When to send** → **Send later** · `/projects/<project>/sms/campaigns/new`

## Before you start

* Everything a campaign sent now needs — see [Create a campaign and send it now](/codemash/cloud/sms/campaigns/new.md#before-you-start).
* Decide the moment and the time zone. A scheduled campaign goes out to everyone at that one moment; it is not "09:00 in each recipient's own zone".
* For a send that repeats (every Monday, every night), use a scheduler task in [Tasks](/codemash/cloud/tasks/tasks.md) instead.

## Steps

1. Fill the audience, the template and its tokens as in [Create a campaign and send it now](/codemash/cloud/sms/campaigns/new.md#steps). The example sends `Appointment reminder` to the user `Grace Hopper` (**Specified Users**) with `Time` = `09:30`.
2. Under **Advanced settings → When to send**, choose **Send later** (*Postpone the campaign: it waits as Scheduled and is sent at the date and time you pick. You can stop it until then.*).
3. Fill the two new fields and press **Schedule** (the **Send** button is renamed):

   | Field         | Required | What it does                                                                                                                                    | Example               |
   | ------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
   | Date and time | yes      | When the campaign starts. A time in the past is refused.                                                                                        | `11/15/2026 12:00 AM` |
   | Time zone     | yes      | The zone the date and time are read in; your browser's zone is picked for you. 09:00 with Europe/Vilnius is 09:00 in Vilnius, wherever you are. | `Europe/Vilnius`      |

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-72578a233b6f4d8fa18eddfc3e77fc7f1e6273d2%2Fcampaigns-schedule-1.png?alt=media" alt="When to send with Send later selected, Date and time 11/15/2026 12:00 AM, Time zone Europe/Vilnius UTC+03:00, and the Schedule button"><figcaption><p>Send later with a date, a time and a time zone.</p></figcaption></figure>

## Result

The new row in the [campaigns list](/codemash/cloud/sms/campaigns.md) has the status **Scheduled**.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-314a2d5a233004b8cf64f0e01b03616ff59cc661%2Fcampaigns-list-1.png?alt=media" alt="SMS Campaigns list with Appointment reminder Scheduled at the top and three Completed campaigns"><figcaption><p>The scheduled campaign in the list.</p></figcaption></figure>

Its [details page](/codemash/cloud/sms/campaigns/details.md) shows the planned time in its zone under **Initiated**, for example `Deliver 15 Nov 2026, 00:00 (Europe/Vilnius)`, and a red **Stop campaign** button.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-1a9a1881da1f41480f2f5fd2ac2c52c7c6adf2bf%2Fcampaigns-stop-1.png?alt=media" alt="SMS Campaign of the scheduled campaign: Scheduled badge, Initiated ... Deliver 15 Nov 2026, 00:00 (Europe/Vilnius), Created by, Status Scheduled, Template Appointment reminder, Deliver strategy Specified users, and the Stop campaign button"><figcaption><p>The details of a scheduled campaign.</p></figcaption></figure>

At the planned time the campaign starts by itself after one more check: the provider is still on, the template still has every project language, and the person who created it still has the permissions it needs. If a check fails, the campaign becomes **Failed** with the reason (for a lost permission `CM-ERRORS-SMS-010`) and nothing is sent.

## Change or remove it later

* **Change the time** — a scheduled campaign cannot be edited. [Stop it](/codemash/cloud/sms/campaigns/stop.md) and create a new one.
* **Stop** — **Stop campaign** on its details page; a stopped campaign is never sent. Turning the SMS module off in [Settings](/codemash/cloud/sms/settings.md) stops it too.
* **Delete** — after it is stopped, from the **Actions** menu of its [details page](/codemash/cloud/sms/campaigns/details.md#change-or-remove-it-later).

## Do it from code

`campaignTime` goes into the audience block, in Unix **seconds** (UTC). The TypeScript SDK 4.13.0 has no field for the time zone, so give the time in UTC.

```ts
const sendAt = Date.UTC(2026, 10, 15, 7, 30) / 1000; // 15 Nov 2026, 07:30 UTC, in seconds
const { id } = await norbix.hub.notifications.createSmsCampaign({
  templateId: 'tmpl_6n1SznAeSWQ2eu1kg8yLup', // Appointment reminder
  integrationId: 'int_6owP11oF9ZZAt9szkqy99S',
  deliveryType: 'PhoneNumbers',
  phoneNumbers: {
    recipientsSourceType: 'PhoneNumbers',
    phoneNumbers: ['+37060000003'],
    campaignTime: sendAt,
    mappedTokens: [{ key: 'Time', value: '09:30', resolver: 'Custom' }],
  },
});
```

```sh
norbix hub notifications sms campaign create --templateId tmpl_6n1SznAeSWQ2eu1kg8yLup --integrationId int_6owP11oF9ZZAt9szkqy99S --deliveryType PhoneNumbers --phoneNumbers '{"recipientsSourceType":"PhoneNumbers","phoneNumbers":["+37060000003"],"campaignTime":1794727800,"mappedTokens":[{"key":"Time","value":"09:30","resolver":"Custom"}]}'
```

The client setup is on the [SMS page](/codemash/cloud/sms.md#use-it-from-code). API: [Create Sms Campaign](/codemash/api-reference/notifications/sms/create-sms-campaign.md)
