CreateCampaign

Creates a campaign

This method can be used to create a new campaign within your account. You are able to create both HTML and plain text versions of the campaign.

If you don't specify a reply action, then 'Unset' is the default setting that you'll see in the result. If you're using a 'reply to address', then replies will get stored both in-app and will also go to the 'reply to address' specified. This is also true of the 'WebMailForward' and 'WebMail' settings and thus you will not need to set these.

If you don't want replies to be stored in-app then set the reply action to 'Delete' (thus they will be deleted). If you're using a 'reply to address' then replies will still go there.

SOAP action: http://apiconnector.com/v2/ApiService/CreateCampaign

πŸ“˜

Input and output parameters

The input and output parameters for this method are:

Input parameters

  • Name - required; string
  • Subject - required; string
  • FromName - required; string
  • FromAddress - optional
    • Email - string
  • HtmlContent - required; string
  • PlainTextContent - required; string
  • ReplyAction - optional; string ('Unset', 'WebMailForward', 'Webmail', 'Delete')
  • ReplyToAddress - optional; string

Output parameters

  • CreateCampaignResult
    • Id - integer
    • Name - string
    • Subject - string
    • FromName - string
    • FromAddress
      • Id - integer
      • Email - string
    • HtmlContent - string
    • PlainTextContent - string
    • ReplyAction - string ('Unset', 'WebMailForward', 'Webmail', 'Delete')
    • ReplyToAddress - string
    • IsSplitTest - boolean
    • Status - string ('Unsent', 'Sending', 'Sent', 'Paused', 'Cancelled', 'RequiresSystemApproval', 'RequiresSMSApproval', 'RequiresWorkflowApproval', 'Triggered')

Example

using (var client = new ApiServiceClient())
{
	client.ClientCredentials.UserName.UserName = "username";
	client.ClientCredentials.UserName.Password = "password";

	var campaign = new ApiCampaign
	{
	    FromName = "TestFromName",
	    FromAddress = new ApiCampaignFromAddress { Email = "[email protected]" },
	    HtmlContent = "<h1>TestHtmlContent</h1>",
	    PlainTextContent = "TestPlainTextContent",
	    Name = "TestCampaign",
	    Subject = "TestSubject"
	};
	var createdCampaign = client.CreateCampaign(campaign);
}