1MSG
ReferenceCampaigns API

Create a campaign draft

POST
/api/v1/campaigns

name is the campaign title. channelId is the channel that will send. segmentId is the audience. content.mode is template or text. For a template set content.templateName, content.language, and content.params (the sendTemplate array). content.messageSendTtlSeconds is optional, in seconds, and sits beside params. For text set content.text. status, if sent, must be draft.

Authorization

bearer
headerAuthorizationBearer <token>

Key issued in Settings → Developer → API key. Inbox methods need the Inbox scope. Campaigns methods need the Campaigns scope.

Request Body

application/json
  1. body
name*string

Campaign title shown in the list.

channelId*string

Id of the channel that sends. The key must be allowed to use this channel.

segmentId*string

Segment id from POST /campaigns/segments. Members are copied when you send.

content*

template or text. For a template set templateName, language, and params.

status?"draft"

Only draft is accepted. Omit to store draft.

Value in"draft"

Response Body

application/json
  1. response
id*string

Campaign id.

name*string

Campaign title.

channelId*string

Channel that sends the campaign.

segmentId*string

Segment used as the audience.

status*string

Campaign status.

Value in"draft""sending""pause""completed""failed""scheduled"
content*||

Template or session text stored on the campaign.

sentAt*|

When sending started, or null if it has not started.

Formatdate-time
scheduledAt*|

UTC instant for a scheduled send, or null.

Formatdate-time
queuedRemaining*number

Recipients still waiting to be sent.

sentThisPortion*number

Template sends already started in the current tier window.

dailyLimit*|

How many template sends this channel may start in a rolling 24 hours. Taken from the channel tier (waba_info.current_limit), not from a campaign setting. Null when the tier is unknown or unlimited. Session text is not counted.

nextPortionAt*|

When the next template portion can start after the tier window is full. Null when a portion is not waiting.

Formatdate-time
createdAt*string

When the campaign was created.

Formatdate-time
updatedAt*string

When the campaign was last updated.

Formatdate-time
curl -X POST 'https://api.1msg.io/api/v1/campaigns' \  -H 'Content-Type: application/json' \  -d '{  "name": "Spring promo",  "channelId": "string",  "segmentId": "string",  "content": {    "mode": "template"  }}'
{  "id": "cm3campaign01",  "name": "April restock",  "channelId": "cm3channel01",  "segmentId": "cm3segment01",  "status": "draft",  "content": {    "mode": "text",    "text": "Hello"  },  "sentAt": "2026-11-01T09:00:00.000Z",  "scheduledAt": "2026-11-01T09:00:00.000Z",  "queuedRemaining": 0,  "sentThisPortion": 0,  "dailyLimit": 1000,  "nextPortionAt": null,  "createdAt": "2026-11-01T09:00:00.000Z",  "updatedAt": "2026-11-01T09:00:00.000Z"}