Using this API call, you can either schedule an email distribution using the Qualtrics email server, or generate distribution links that you can then use to share the link to your survey using your own email solution.

create_email_distribution(
  survey_id,
  library_id,
  message_id,
  mailing_list_id,
  from_email = "noreply@qualtrics.com",
  from_name = "Qualtrics",
  subject = "Participate in this survey",
  send_date = paste0(Sys.Date() + 2, "T00:00:00Z"),
  transaction_batch_id = NULL,
  contact_id = NULL,
  reply_to_email = "noreply@qualtrics.com",
  type = NULL,
  expiration_date = NULL
)

Arguments

survey_id

the survey id

library_id

the library id where the message is saved (see 'list_libraries')

message_id

id of the message item

mailing_list_id

optional, mailing list is, or set transaction_batch_id

from_email

sender email, default is noreply@qualtrics.com

from_name

appearing sender name, default is Qualtrics

subject

email subject, default is "Survey Distribution"

send_date

date for distribution to be sent (if not supplied will be set to +1 day)

transaction_batch_id

optional, transaction batch, or set mailing_list_id

contact_id

optional, optional contact lookup ID for individual distribution

reply_to_email

optional, reply email, default is noreply@qualtrics.com

type

optional, allowed values: Individual, Multiple, Anonymous

expiration_date

expiration date

Value

The created distribution id

Details

In order to create a new email distribution using the API, you need to have the body of your email already created as a message in your Qualtrics message library (see 'list_messages'). If you want to send the distribution to only one contact in the mailing list, specific the contact_id field in addition to the mailing_list_id (see 'list_contacts').

Note that your Qualtrics account may be set with a different time zone than your local environment. Make sure to specificy your date fields accordingly.

Examples

if (FALSE) { create_email_distribution( "SV_erkBAsHrvoJyeYB", "UR_0NXtl92JJWqfWcJ", "MS_0fddN2xI3J0nGQZ", "ML_7aoriSKinHh8MfP", "john.doe@qualtrics.com", "John Doe", "Participate in this awesome survey") }