New campaign

triangle-exclamation
circle-exclamation

Campaigns are a feature that allows you to schedule bulk messaging to a list of contacts. This method will adhere to all necessary rules and intervals to ensure successful delivery. This method supports two approaches:

  • Sending the same text to an array of contacts

  • An array of requests where the message can be individualized for each contact.

circle-info

You can only use this method to send messages to contacts who have already communicated with your sender name.

You CAN'T use this method to initiate a conversation with a new contact (i.e., cold messaging).

Schedule a campaign for an array of contacts

POST https://a.loopmessage.com/api/v1/campaigns/new/

Request body

Name
Type
Description

name*

String

New name for the campaign.

contacts*

Array

An array of strings.

text*

String

A webpage where your users can get support related to your services.

attachments

Array

Optional. An array of strings. The string must be a full URL of your image. URL should start with https://. HTTP links (without SSL) are not supported. This must be a publicly accessible file URL: we will not be able to reach any URLs that are hidden or that require authentication. Max length of each URL: 256 characters, max elements in the array: 3.

JSON payload example

{
  "name": "My new campaign",
  "text": "Hello",
  "contacts": ["+13231112233", "+13232112233", "+13233112233"]
}

Response

Schedule a campaign with an array of requests

This API works in the same way, but you need to pass the same parameters as an array.

POST https://a.loopmessage.com/api/v1/campaigns/new/

JSON payload example

Response

Additional schdule parameters

Use these parameters to specify the schedule for your campaign.

Name
Type
Description

from_date

String

Date when will need to begin the campaign.

YYYY-MM-DD format date. For example: 2010-12-31. Default: today.

from_time

String

From what time will we need to start sendings.

HH:mm format time. For example: 13:30.

Default: 10:00.

to_time

String

Until what time will we need to end sendings.

HH:mm format time. For example: 23:59.

Default: 22:00.

timezone

String

In which time zone should from_time and to_time be considered.

TZ identifiedarrow-up-right format, eg: America/Los_Angeles.

Default: America/New_York.

JSON payload example

Array of contacts

Array of messages

Additional message parameters

All these parameters are optional.

Name
Type
Description

effect

String

Add effect to your message. Possible values: slam, loud, gentle, invisibleInk, echo, spotlight, balloons, confetti, love, lasers, fireworks, shootingStar, celebration.

You can check the Apple guidearrow-up-right about expressive messages.

subject

String

Your message subject. A recipient will see this subject as a bold title before the text. Only for iMessage.

JSON payload example

Array of contacts

Array of messages

Last updated