> 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/api-reference/notifications/sms/create-sms-campaign.md).

# Create Sms Campaign

Create an SMS campaign.

The **SMS** channel delivers text messages — templates, campaigns, and provider integrations — for OTPs, alerts, and bulk sends.

This endpoint creates an SMS campaign from a saved template and returns its id. It is sent at once; a `campaignTime` is stored as **Scheduled**, but nothing starts a scheduled campaign at its time yet (S135). The audience is one of five: all users, specified users, account users (the account owner and team members), phone numbers, or the records of a collection. `integrationId` — the SMS integration that sends it — is required.

{% openapi src="/files/0gOkqzp7kyziG9XPpCBy" path="/{version}/notifications/sms/campaigns" method="post" %}
[norbix-hub-swagger.json](https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-7c7445e68689b62620e59cb01a3523deb46b865b%2Fnorbix-hub-swagger.json?alt=media)
{% endopenapi %}

{% hint style="warning" %}
**Good to know.** `integrationId` is required and the server never falls back to the project default: a request without it → `CM-ERRORS-PROPERTY-001` (no provider at the create rule → `CM-ERRORS-INTEGRATIONS-003`), unknown → `CM-ERRORS-INTEGRATIONS-001`, disabled → `CM-ERRORS-INTEGRATIONS-005`; the integration's number or sender ID is what recipients see (templates have no sender). Languages come from Project settings: the template needs a translation for every project language (`CM-ERRORS-LANGUAGES-004`); `language` forces one language on everyone and must be a project language (`CM-ERRORS-LANGUAGES-003`); leave it out and each recipient gets their own language when it is a project language, otherwise the project default. Both rules run again when the campaign is sent; a campaign that fails then is marked Failed and sends nothing. `initiatorId` names the project user whose details fill the `@Model.Initiator.User.…` tokens (must exist; empty = the caller). The caller needs every permission the campaign needs — create, project settings read, SMS module and integration read, and read on the recipients — or the create is refused with `CM-ERRORS-MEMBERSHIP-039`, which lists the missing ones. For `AccountUsers`, team members without a saved phone are skipped. The request block above may not show `integrationId` and `accountUsers` until the Hub spec is uploaded again.
{% endhint %}

## In Cloud

Manage this visually in Cloud — see [SMS → Create a Campaign](/codemash/cloud/sms/campaigns/new.md).

## Use it from code

Every Norbix SDK exposes this endpoint as a method — see [Create Sms Campaign](/codemash/sdks/notifications/sms/create-sms-campaign.md) in the SDK reference, with examples in every language.
