Need An Email Marketing Solution For All Of Your Customers?

Partner With VerticalResponse!

setEmailCampaignContent

DEPRECATED: This method is not compatible with campaigns created with createEmail. Use updateEmailContents instead. If you are still using the deprecated createEmailCampaign, we’ve posted a guide to help you update your code quickly: Letting Go of createEmailCampaign and Embracing createEmail.The setEmailCampaignContent() method is used to add or change a block of copy for an email campaign.
The content type must be valid for the specified campaign’s type, and the number of bytes in the copy must not exceed the freeform upload limit for your company.

Valid content types for template (wizard) campaigns are:

  • subject
  • salutation
  • greeting
  • closing
  • unsub_message
  • unsub_link_text
  • postal_address
  • custom_color

Valid content types for freeform and canvas campaigns are:

  • subject
  • freeform_html
  • freeform_text
  • unsub_message
  • unsub_link_text
  • postal_address

Valid content types for freeform_text campaigns are:

  • subject
  • freeform_text
  • unsub_message
  • unsub_link_text
  • postal_address

Input

[vrtypens:setEmailCampaignContentArgs]

session_id [xsd:string] (required)
Your API session id.
campaign_id [xsd:int] (required)
The id of the campaign whose content is being set.
content [vrtypens:EmailCampaignContent] (required)
The type and copy of the content being set

Output

[xsd:boolean]
The output is always true.

Examples

Perl

# set the subject of this campaign to "summer sale starts tomorrow"
$api->setEmailCampaignContent( {
    session_id  => $sid
    campaign_id => 42,
    content     => {
        type => 'subject',
        copy => 'summer sale starts tomorrow',
    },
} );

PHP

# set the subject of this campaign to "summer sale starts tomorrow"
$vrapi->setEmailCampaignContent( array(
    'session_id'  => $sid
    'campaign_id' => 42,
    'content'     => array(
        'type' => 'subject',
        'copy' => 'summer sale starts tomorrow',
    ),
) );

Ruby

# set the subject of this campaign to "summer sale starts tomorrow"
vr.setEmailCampaignContent({
    'session_id'  => sid,
    'campaign_id' => 42,
    'content'     => {
        'type' => 'subject',
        'copy' => 'summer sale starts tomorrow',
    },
})