For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
      • GETReturns the information for all your created SMS campaigns
      • POSTCreates an SMS campaign
      • GETGet an SMS campaign
      • PUTUpdate an SMS campaign
      • DELDelete an SMS campaign
      • POSTSend your SMS campaign immediately
      • PUTUpdate a campaign's status
      • POSTSend a test SMS campaign
      • POSTExport an SMS campaign's recipients
      • POSTSend an SMS campaign's report
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Marketing CampaignsSMS Campaigns

Creates an SMS campaign

POST
https://api.brevo.com/v3/smsCampaigns
POST
/v3/smsCampaigns
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.smsCampaigns.createSmsCampaign({
8 content: "Get a discount by visiting our NY store and saying : Happy Spring!",
9 name: "Spring Promo Code",
10 sender: "MyShop",
11 });
12}
13main();
1{
2 "id": 5
3}
Create a new SMS campaign with the required name, sender, and content fields. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the content should stay within 160 characters per SMS segment. If a scheduledAt date is provided, listIds in recipients become mandatory; accounts under validation are limited to 4 total campaigns and campaigns with more than 10 recipients will be saved as draft.
Was this page helpful?
Previous

Get an SMS campaign

Next
Built with

Create a new SMS campaign with the required name, sender, and content fields. The sender name is limited to 11 alphanumeric characters or 15 numeric characters, and the content should stay within 160 characters per SMS segment. If a scheduledAt date is provided, listIds in recipients become mandatory; accounts under validation are limited to 4 total campaigns and campaigns with more than 10 recipients will be saved as draft.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

Values to create an SMS Campaign
contentstringRequired

Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS.

namestringRequired
Name of the campaign
senderstringRequired<=15 characters

Name of the sender. The number of characters is limited to 11 for alphanumeric characters and 15 for numeric characters

organisationPrefixstringOptional

A recognizable prefix will ensure your audience knows who you are. Recommended by U.S. carriers. This will be added as your Brand Name before the message content. Prefer verifying maximum length of 160 characters including this prefix in message content to avoid multiple sending of same sms.

recipientsobjectOptional
scheduledAtstringOptional

UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.

unicodeEnabledbooleanOptionalDefaults to false
Format of the message. It indicates whether the content should be treated as unicode or not.
unsubscribeInstructionstringOptional
Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include **STOP** keyword. This will be added as instructions after the end of message content. **Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.**

Response

successfully created
idlong
ID of the object created

Errors

400
Bad Request Error

Instructions to unsubscribe from future communications. Recommended by U.S. carriers. Must include STOP keyword. This will be added as instructions after the end of message content. Prefer verifying maximum length of 160 characters including this instructions in message content to avoid multiple sending of same sms.