List SMS campaigns
GET/api/partner-gateway/campaigns
Returns the campaigns of your account, one page at a time, newest first by creation date.
- Confirmed campaigns by default: without a status filter only confirmed campaigns are listed (
PRE_BILLEDonwards). Drafts are left out. - Status filters:
isDraft,isProgrammedandreadyToSendchoose the stage to list.readyToSendwins over the other two, andisDraft=truewins overisProgrammed. - SMS campaigns only: send
sendingMode=SMS. WithoutsendingModethe list holds the campaigns of every channel. The mode is matched exactly, soSMSdoes not includeRCS_SMSorWHATSAPP_SMS. - Sender:
channel=SMSandchannelIdgo together, and keep the campaigns of one SMS sender:channelIdis the sender name. - Search:
searchis a case-insensitive partial match on the campaign name and on the SMS text. The description is never searched. - Date window:
startDateandendDate(yyyy-MM-dd) keep the campaigns scheduled in that window, or created in it when they have noscheduledDate.endDateincludes the whole day. - Keys scoped by channel: a key without
CAMPAIGNSlists only the campaigns whose channels it holds (SMS,RCS,WHATSAPP). AsendingModefilter with a channel the key lacks answers401.
What each status filter lists
| Filter | Campaigns listed |
|---|---|
isDraft=true | Not yet confirmed, including those marked ready to send, which come back with status DRAFT and readyToSend true. |
isDraft=false | Same as leaving it out: confirmed campaigns only. |
isProgrammed=true | Confirmed and not yet fully sent (PRE_BILLED through STARTED), whether scheduled for later or sending now. |
isProgrammed=false | Sent, ended or archived. |
readyToSend=true | Drafts marked ready to send. |
readyToSend=false | The other drafts. |
GET /campaigns is one endpoint for SMS, RCS and WhatsApp: this page describes it for SMS. See it for RCS or WhatsApp.
Request
Responses
- 200
- 400
- 401
The campaigns that match the filters, one page at a time.
channel or channelId is sent without the other, channel is unknown, channelId is not numeric with channel=WHATSAPP, startDate or endDate is not a valid date, sendingMode is not a valid value, page is negative, or limit is negative or above 1000.
The API key is missing or invalid, or holds neither CAMPAIGNS nor the operation of every channel of the campaign's sendingMode.