Broadcasts

Create broadcast (API)

Requires authentication — see Authentication.

Creates a new Broadcast depending on the type of communication channel you want to send (SMS, WhatsApp, Email, RCS). Certain factors must be considered when you want to send Broadcasts: the Broadcast scheduler configures the Broadcast sending depending on the communication channel and the delivery date. The deliveryMethod parameter allows us to differentiate the type of communication channel between SMS, WhatsApp, Email or RCS. That's why only this endpoint is used for the creation of Broadcasts because the deliveryMethod help us to send each type of communication channel, but there are several variations in the request body depending on the delivery type. See the Scheduling status section below for how the delivery date parameters determine when a Broadcast is sent.

This endpoint is used by the channel-specific broadcast tutorials: Creating and Sending SMS Broadcast, Creating and Sending Email Broadcast, and Creating and Sending WhatsApp Broadcast.

post/v2/broadcasts

Request

  • Base URL
    https://elastic.messangi.me/thenightswatch
  • URL
    https://elastic.messangi.me/thenightswatch/v2/broadcasts
  • Auth
    HTTP bearer

Request body

OR
OR
OR

Example request

{
  "deliveryMethod": "SMS",
  "campaignName": "Billing notice",
  "description": "Payment notification to users subscribed to the service",
  "listId": 1,
  "listField": "mobile",
  "filters": "mobile%5B%24like%5D%3D%2B",
  "filterName": "only sms users",
  "segmentId": "5fa14d7689ad7743152b0cf0",
  "message": "Payment notification to users subscribed to the service",
  "origin": "8888",
  "broadcastDate": "2020-08-08T19:43:36.278949Z",
  "throttle": 120,
  "callbacks": [
    "http://www.mycalbackk.com?id=1",
    "http://www.mycalbackk.com?id=2"
  ],
  "emailField": "email",
  "clientId": "cpf",
  "fallback": {
    "fallback": {
      "channels": [
        {
          "type": "SMS",
          "from": "4242"
        }
      ]
    }
  },
  "requestDR": true
}

Response

Broadcast creation request accepted

Example response

{
  "meta": {
    "timestamp": 1597166699457,
    "transactionId": "70169d77-c165-4795-9932-35b8a3af96fb",
    "explain": "a descriptive text"
  },
  "data": {
    "id": 1,
    "beginDate": "2020-08-08T19:43:36.278949Z",
    "endDate": "2020-08-08T19:46:36.278949Z",
    "deliveryMethod": "SMS",
    "campaignName": "Billing notice",
    "createdBy": "root",
    "operator": "root",
    "description": "Payment notification to users subscribed to the service",
    "listId": 1,
    "listSize": 1000,
    "listField": "mobile",
    "filters": "mobile%5B%24like%5D%3D%2B",
    "filterName": "only sms users",
    "segmentId": "5fa14d7689ad7743152b0cf0",
    "message": "Payment notification to users subscribed to the service",
    "origin": "8888",
    "broadcastDate": "2020-08-08T19:43:36.278949Z",
    "broadcastStatus": "DONE",
    "createdAt": "2020-08-08T19:43:36.278949Z",
    "throttle": 120,
    "callbacks": [
      "http://www.mycalbackk.com?id=1",
      "http://www.mycalbackk.com?id=2",
      "http://www.mycalbackk.com?id=3"
    ],
    "notSentCounter": 120,
    "messagesSentCounter": 880,
    "smsField": "mobile",
    "emailField": "email",
    "clientId": "cpf",
    "fallback": {
      "fallback": {
        "channels": [
          {
            "type": "SMS",
            "from": "4242"
          }
        ]
      }
    },
    "multimediaFileName": "filename",
    "requestDR": true,
    "subject": "Updates to our Terms of Service",
    "draftId": "149",
    "attachmentName": "dummy.pdf",
    "rcsConfig": {
      "rcsMessage": {
        "title": "Demo",
        "description": "Hi [[mobile]]",
        "cardImageUrl": "https://branding-logos.s3.amazonaws.com/spaces/162/sidebarLogo.png",
        "mediaHeight": "short",
        "cardOrientation": "horizontal",
        "thumbnailAlignment": "right"
      },
      "rcsMessageType": "standalonecard"
    },
    "whatsappConfig": {
      "whatsappTemplateName": "template-name"
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.