Skip to main content

CreateDistributionRequest

sendDatestring<date-time>required

Time to send the WhatsApp distribution. See Dates and Times for more information on the date and time format. If the date is in the past, the distribution will be sent out immediately. Please note that if you create too many distributions with the same or similar send date, they might be sent out with some delay.

Possible values: <= 20 characters

methodMethod (string)required

Determines how the survey will be sent out via WhatsApp. Can be either Invite Interactive Reminder or Thankyou. Interactive means the questions are presented to the user one at a time in an interactive ping-pong type interactive-type session.

Possible values: [Invite, Interactive, Reminder, Thankyou]

surveyIdSurveyId (string)required

ID of the survey to distribute to recipients.

Possible values: Value must match regular expression ^SV_[a-zA-Z0-9]{11,15}$

nameName (string)required

Name for the WhatsApp distribution.

Possible values: <= 100 characters

recipients object

This field will be ignored if "method" is "Reminder" or "Thankyou". You must provide either transactionBatchId or mailingListId. If you provide mailingListId, then you can optionally provide one of these fields: [contactId,sampleId,transactionId]

mailingListIdMailingListId (string)

Mailing List ID for a batch distribution

Possible values: Value must match regular expression ^[a-zA-Z0-9]{1,4}_[a-zA-Z0-9]{11,15}$

contactIdContactId (string)

Contact Lookup ID for an individual distribution. Contact Lookup ID can be obtained using Get Contact In Mailing List. See Get Contact In Mailing List

Possible values: Value must match regular expression ^(CTR|CGC|MLRP)_[a-zA-Z0-9]{11,15}$

sampleIdSampleId (string)

Sample ID for subgroup from the same Mailing List ID

Possible values: Value must match regular expression ^[0-9a-zA-Z]{1,4}_[0-9a-zA-Z]{11,15}$

transactionBatchIdTransactionBatchId (string)

Transaction Batch ID. Read more about transactions

Possible values: Value must match regular expression ^BT_[a-zA-Z0-9]{11,15}$

transactionIdTransactionId (string)

Transaction ID. Read more about transactions

Possible values: Value must match regular expression ^CTR_[a-zA-Z0-9]{11,15}$

message objectrequired
messageIdMessageId (string)required

ID of the message.

Possible values: Value must match regular expression ^MS_[a-zA-Z0-9]{11,15}$

libraryIdLibraryId (string)required

Library ID of the message.

Possible values: Value must match regular expression ^[a-zA-Z0-9]{1,4}_[a-zA-Z0-9]{11,15}$

parentDistributionIdParentDistributionId (string)

ID of the distribution to send a Reminder or Thankyou distribution. Can be used only with these two methods.

Possible values: Value must match regular expression ^WAD_[a-zA-Z0-9]{11,15}$

surveyLinkExpirationDatestring<date-time>

The date and time when the survey link expires

CreateDistributionRequest
{
"sendDate": "2024-07-29T15:51:28.071Z",
"method": "Invite",
"surveyId": "string",
"name": "string",
"recipients": {
"mailingListId": "string",
"contactId": "string",
"sampleId": "string",
"transactionBatchId": "string",
"transactionId": "string"
},
"message": {
"messageId": "string",
"libraryId": "string"
},
"parentDistributionId": "string",
"surveyLinkExpirationDate": "2024-07-29T15:51:28.071Z"
}