ResourcesAPI documentation

mailkit.campaigns.update

Function mailkit.campaigns.update is used to update or alter an existing campaign.

XML-RPC request must be sent in the format displayed below. 

NOTICE: Data must be Base64 encoded.

API call example:

XML

<?xml version="1.0"?>
<methodCall>
  <methodName>mailkit.campaigns.update</methodName>
  <params>
    <param>
      <value>
        <int>client_id</int>
      </value>
    </param>
    <param>
      <value>
        <string>client_md5</string>
      </value>
    </param>
    <param>
      <value>
        <string>ID_message</string>
      </value>
    </param>
    <param>
      <value>
        <string>update</string>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>name</name>
            <value>
              <string>name</string>
            </value>
          </member>
          <member>
            <name>subject</name>
            <value>
              <string>subject</string>
            </value>
          </member>
          <member>
            <name>ID_allow_email</name>
            <value>
              <string>ID of sender address</string>
            </value>
          </member>
          <member>
            <name>type_message</name>
            <value>
              <string>email|sms</string>
            </value>
          </member>
          <member>
            <name>type_send</name>
            <value>
              <string>html|txthtml|txt</string>
            </value>
          </member>
          <member>
            <name>generate_txt</name>
            <value>
              <string>true|false</string>
            </value>
          </member>
          <member>
            <name>img_attach</name>
            <value>
              <string>true|false</string>
            </value>
          </member>
          <member>
            <name>ID_mailing_list</name>
            <value>
              <string>ID of mailing list</string>
            </value>
          </member>
          <member>
            <name>ID_template</name>
            <value>
              <string>ID of template</string>
            </value>
          </member>
          <member>
            <name>content</name>
            <value>
              <string>content 1</string>
            </value>
          </member>
          <member>
            <name>content2</name>
            <value>
              <string>content 2</string>
            </value>
          </member>
          <member>
            <name>content10</name>
            <value>
              <string>obsah 10</string>
            </value>
          </member>
          <member>
            <name>content_txt</name>
            <value>
              <string>txt content</string>
            </value>
          </member>
          <member>
            <name>files</name>
            <value>
              <string>ID of attachment/string>
            </value>
          </member>
          <member>
            <name>reply_to</name>
            <value>
              <string>email@email.cz</string>
            </value>
          </member>
          <member>
            <name>unsubscribe_email</name>
            <value>
              <string>email@email.cz</string>
            </value>
          </member>
          <member>
            <name>web_template</name>
            <value>
              <string>true|false</string>
            </value>
          </member>
          <member>
            <name>style_inline</name>
            <value>
              <string>true|false</string>
            </value>
          </member>
          <member>
            <name>ID_unsubscribe_group</name>
            <value>
              <string>ID of unsubscribe group</string>
            </value>
          </member>
        </struct>
      </value>
    </param>
---AB test settings, B version of the campaign---
   <param>
     <value>
       <struct>
         <member>
           <name>generate_txt</name>
           <value>
             <string>true|false</string>
           </value>
         </member>
         <member>
           <name>subject</name>
           <value>
             <string>subject</string>
           </value>
         </member>
         <member>
           <name>content</name>
           <value>
             <string>content 1</string>
           </value>
         </member>
         <member>
           <name>content2</name>
           <value>
             <string>content 2</string>
           </value>
         </member>         
         <member>
           <name>ID_allow_email</name>
           <value>
             <string>ID</string>
           </value>
         </member>
         <member>
           <name>ID_template</name>
           <value>
             <string>ID template</string>
           </value>
         </member>
         <member>
           <name>ab_percentage</name>
           <value>
             <string>1 - 99</string>
           </value>
         </member>
         <member>
           <name>ab_evalution</name>
           <value>
             <string>open|click|conversion|ctr</string>
           </value>
         </member>
         <member>
           <name>ab_evalution_time</name>
           <value>
             <string>1h - 4d</string>
           </value>
         </member>
       </struct>
     </value>
   </param>
------
  </params>
</methodCall>

Values

client_id * = client ID can be found in your Mailkit account's menu Profile / Integration / API settings.

client_md5 * = MD5 code can be found in your Mailkit account's menu Profile / Integration / API settings.

ID_message * = ID of campaign

update * = update settings

  • true = empty parameters will be set to default
  • false = empty parameters will not change

name (Base64) = name of campaign

subject (Base64) = subject of campaign

ID_allow_email (Base64) * = ID of sender address

type_message (Base64) = type of message

  • email = e-mail campaign
  • sms = SMS campaign

type_send (Base64) = format of message

  • html = HTML format
  • txthtml = HTML and plain text combination
  • txt = TXT format

generate_txt (Base64) = autogenerate plain text from HTML:

  • true = yes
  • false = no

img_attach (Base64) = include images inline:

  • true = yes
  • false = no

ID_mailing_list (Base64) = ID of mailing list / lists. (ID of mailing lists are comma separated)

ID_template (Base64) = ID of template

content (Base64) = content 1

content2 (Base64) = content 2. Total number of contents is 10.

content_txt (Base64) = content in TXT format. (When autogenerating plain text from HTML is off).

files (Base64) = ID of attachments (ID of attachments are comma separated)

reply_to (Base64) = e-mail address for reply-to

unsubscribe_email (Base64) = e-mail address for sending unsubscribes

web_template (Base64) = use microsite:

  • true = yes
  • false = no

style_inline (Base64) = convert CSS styles to inline:

  • true = yes
  • false = no

ID_unsubscribe_group (Base64) = ID of unsubscribes group

ab_percentage (v base64) = AB test group size as percentage (1 - 99)

ab_evalution (v base64) = AB test evaluation criteria (open|click|conversion|ctr)

ab_evalution_time (v base64) = AB test evaluation time (1h - 23h, 1d - 4d)

* required value

Successful call response:

XML

<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <i4>123456789</i4>
      </value>
    </param>
  </params>
</methodResponse>

Values

ID of updated campaign

Unsuccessful call response:

XML

<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <string>Missing allow email</string>
      </value>
    </param>
  </params>
</methodResponse>

Values

Missing allow email = sender address is missing

error: status, (xxx) = sender address is not verified | has wrong format

Missing name of campaign = name of campaign is missing

Missing subject of campaign = subject of campaign is missing