Message2Give Logo
Message2Give DocsVersion 1.2.8

Campaigns

Send out a message automatically to hundreds of thousands of people all at once. Campaigns can be sent across SMS, Phone (Voice), Email, or MMS. A Validation Campaign is used to validate the status of a group of phone numbers.

A campaign is created, then started, then becomes active under certain conditions.

Learn more about campaigns at /guides/campaigns/general.


POST Campaign

https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/campaigns

Authentication Required: Yes

Description

Creates a campaign and sends it during a specified time period to a specified list of contacts. The campaign can be for SMS, Voice, Email, MMS, or Validation. The campaign message is sent to each contact individually, not all at once. The program will run through the list of contacts and finish when it reaches the end.

Path Parameters

PropertyDescription
workspace_idThe ID of the workspace to create the campaign in.

Body Properties

PropertyRequiredTypeDefaultValid Campaign TypeDescription
nameYesStringsms, mms, pstn, email, washThe name of the campaign.
typeYesStringsms, mms, pstn, email, washThe type of campaign. Valid values:
sms (SMS)
pstn (Voice)
email (Email)
mms (MMS)
wash (Validation).
dataYesArraysms, mms, pstn, email, washInformation about your list of contacts. This is an array of Data Objects. Each object is for a different list of contacts.
messageYesStringsms, mms, pstn, emailThe message sent to your contact list. Will be played as a text-to-speech message when a voice call is picked up.
Placeholders can be included by using {{Data Column Header}}. Contact records with a blank placeholder will be skipped.
senderIdYesStringsms, mms, pstn, email, washA valid Sender ID, configured as a Virtual Number (SMS, MMS, Voice campaigns), Sender ID (SMS Campaigns) or Email Alias (Email campaigns) in the Message2Give Portal.
timesYesArraysms, mms, pstn, email, washArray of Times Objects that specify the campaigns active time periods. The campaign will only process messages while it is active.
timezoneNoStringEtc/UTCsms, mms, pstn, email, washSpecifies the timezone the Message2Give Portal will display times in. Formatted as Country/City.
timeLimitHoursYesNumbersms, mms, pstn, email, washWhen set to 24, it will restrict the Message2Give Portal to only allow users to enter sending times restricted to the next 24 hours.
rateYesNumbersms, mms, pstn, email, washThe number of messages that will be processed per hour.
deduplicateYesStringsms, mms, pstn, email, washSpecifies the strategy used to deduplicate the contact file. Valid values:
none - no deduplication
destinations - only send messages to unique destinations
messages - send only unique messages to a destination
approvedYesBooleanfalsesms, mms, pstn, email, washWhen set to true, campaign issues will be automatically approved.
When set to false, campaign issues will require a user login to the Message2Give Portal to manually approve the campaign before it can go live.
liveYesBooleanfalsesms, mms, pstn, email, washWhen set to true, the campaign will go live as soon as it is created.
When set to false, the campaign will require a user login to the Message2Give Portal to manually set the campaign to go live.

Note: Issues such as invalid numbers or missing placeholders will reset live to false unless the campaign is approved.
shortenUrlsYesStringBooleansms, mms, pstn, email, washAutomatically shortens any URLs in the message.
exclusionListNoArraysms, mms, pstn, email, washArray of List IDs. Contacts in these List's will be excluded from the campaign.
optOutListNoStringsms, mms, pstn, email, washList ID. Contacts in this list will be excluded from the campaign. Opt-Outs from this campaign will automatically be added to this list.
keywordRepliesNoArraysms,mms,pstnArray of [Keyword Replies Objects](#Keyword Replies) specifying how to automatically respond to incoming SMS replies based on keywords. Learn more about this at Keyword Replies.
keywordRepliesTtlNoNumbersms,mms,pstnDuration in minutes after a message is sent before all configured keyword replies expire.
optOutKeywordsNoArraysms,mmsList of keywords to look for in reply SMS that will add the contact to the configured Opt-Out list.
optOutMessageNoStringsms,mmsAn automated message sent to the contact after a successful opt-out.
targetLanguageColumnNoStringsms, mmsColumn index in the contact file containing the language to deliver the message in.
Contact a Message2Give Admin to enable on your workspace.
subjectYesStringemailThe subject of the message.
attachmentsmms: Yes
email: No
Arrayemail, mmsArray of Attachments Objects to include in the message.
MMS only support a single attachment, with a maximum size of 20MB for videos, 10MB for images, and 1.2MB for all other types.
Email attachments must have a combined file size no greater than 20MB.
audioFileNoStringpstnID of the Audio File that will be played when a contact picks up a call. Overrides message. Uploading an aud file.
voicemailMessageNoStringpstnText-to-speech message that will be used when a call detects voicemail.
voicemailAudioFileNoStringpstnID of the Audio File that will be played when a call detects voicemail. Overrides voicemailMessage. Uploading an aud file.
attemptsNoNumber1pstnMaximum number of calls to make to a number. Only calls that weren't picked up by a human will be reattempted.
attemptsRingTimeoutNoNumber1pstnMaximum number of call attempts that are allowed to ring out.
attemptsVoicemailNoNumber1pstnMaximum number of call attempts that are allowed to go to voicemail.
attemptIntervalNoNumber15pstnTime between attempts in minutes. Cannot be less than 5.
ringTimeoutNoNumber900pstnMaximum number of seconds a call will ring for.
lastAttemptVoicemailNoBooleanfalsepstnWhen true, voicemail will only be left on the final call attempt.
witholdCallerIdNoBooleanfalsepstnWhen true, the campaign's caller ID will be hidden from campaign recipients.
surveyNoStringpstnID of a Message2Give Survey that will run after the message has played.
ttsGenderNoStringfemalepstnThe gender of the text-to-speech voice. Can be either male or female.
inboundSurveyNoStringpstnID of a Message2Give Survey that will run if the contact call's back.
inboundTtlNoNumberpstnDuration in minutes after the outbound call is sent before the inbound survey expires.
surveyMinCompletionsRequiredNoNumberpstnWhen the connected surveys have reached this many completions, the campaing will automatically be paused.
humanSmsNoStringpstnSMS message that will be sent after the call is picked up.
voicemailSmsNoStringpstnSMS message that will be sent after a voicemail has been left.
failSmsNoStringpstnSMS message that will be sent after all call attempts have failed.
Data
PropertyRequiredTypeDefaultDescription
fileYesStringThe ID for the file that containing your list of contacts. The file needs to be uploaded as a tgts type and must be a csv. This file will usually contain a column for contacts, and then adjacent columns for information about the contacts. You may also choose to add headers to the columns. Uploading a tgts file.
fieldsYesArrayArray containing all column headers.
firstDataRowYesNumberThe index of the first row containing contact records.
destinationIndexYesNumberThe column index containing the contact destination.
fieldMapNoObjectObject that specifies how to load contact data into Message2Give Chat Contact Attributes.
Formatted as {"[columnIndex]": "Contact Attribute Name"}
Times

Times must be formatted in the UTC timezone.

PropertyRequiredTypeDefaultDescription
startTimeYesStringStarting time of the active period "HH:mm"
endTimeYesStringEnding time of the active period "HH:mm"
fromDateNoStringStarting date of the active period
toDateNoStringEnding date of the active period
weekdaysNoArrayDays of the week when the campaign is active. An array of numbers from 0-6, with 0 representing Sunday.
Keyword Replies
PropertyRequiredTypeDefaultDescription
keywordYesArrayAn array of strings to detect for in the reply.
operatorYesStringComparator used to evaluate keywords. Valid values:
eq - reply is exactly equal to a keyword
inc - reply contains a keyword
sw - reply starts with a keyword
ew - reply ends with a keyword
ne - reply does not equal a keyword
lt - reply is less than a keyword
gt - reply is greater than a keyword.
caseSensitiveNoBooleanfalseCase sensitivity of the keyword strings.
contentNoStringAutomated SMS message sent after successfully matching a keyword.
timesNoArrayArray of Times Objects that specify the time periods when the keyword is active. No specified times will enable the keyword reply at all times.
enabledNoBooleantrueEnables keyword detection.
callMeDestinationNoStringA phone number that will be connected with the contact via a voice call when the keyword is triggered
callMeAttemptsNoNumber1Maximum number of calls to be made to the callMeDestination number. Failed calls will result in reattempts.
callMeWhisperTextNoStringA text-to-speech message played to the callMeDestination number to provide context about the call.
callMeWhisperAudioFileNoStringID of the Audio File that will be played to the callMeDestination number to provide context about the call. Overrides callMeWhisperText. Uploading an aud file.
callMeWhisperAttemptsNoNumber1Number of times the whisper will be played to the callMeDestination number.
callMeFailSmsNoStringSMS message that will be sent if all call-me attempts have failed.
Attachments
PropertyRequiredTypeDefaultDescription
idYesStringThe ID of the file attachment. Uploading an oa file.
filenameYesStringThe name of the file.
contentTypeYesStringThe files MIME type.
sizeYesNumberThe size, in bytes, of the file (integer).
contentDispositionYesStringOnly accepts "attachment".

Code Snippet


GET Campaign

https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/campaigns/{campaign_id}

Authentication Required: Yes

Description

Retrieves the details of a campaign from your workspace.

Path Parameters

PropertyDescription
workspace_idThe workspace ID the campaign belongs to.
campaign_idThe ID of the campaign being retrieved.

Code Snippet


POST Update Campaign

https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/campaigns/{campaign_id}

Authentication Required: Yes

Description

Updates the details of a campaign in your workspace.

Path Parameters

PropertyDescription
workspace_idThe ID of the workspace the campaign belongs to.
campaign_idThe ID of the campaign you are updating.

Body Properties

To update any property of the campaign, include the property and its new value in the body of this request. To terminate the campaign, add a "terminate" property set to true. The campaign will not run again. To archive the campaign, add an "archive" property set to true. The campaign will be moved to an inactive archive, but you can unarchive these campaigns whenever desired.

Code Snippet

How is this guide?

On this page