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 (true/false)</string>
   </value>
  </param>
  <param>
   <value>
    <struct>
     <member>
      <name>name</name>
      <value>
       <string>bmFtZQ==</string>
      </value>
     </member>
     <member>
      <name>subject</name>
      <value>
       <string>c3ViamVjdA==</string>
      </value>
     </member>
     <member>
      <name>ID_allow_email</name>
      <value>
       <string>MTIzNDU2</string>
      </value>
     </member>
     <member>
      <name>type_send</name>
      <value>
       <string>dHh0aHRtbA==</string>
      </value>
     </member>
     <member>
      <name>generate_txt</name>
      <value>
       <string>dHJ1ZQ==</string>
      </value>
     </member>
     <member>
      <name>ID_mailing_list</name>
      <value>
       <string>MTIzNDU2</string>
      </value>
     </member>
     <member>
      <name>ID_delivery_feed</name>
      <value>
       <string></string>
      </value>
     </member>
     <member>
      <name>ID_query</name>
      <value>
       <string>MTIzNDU2</string>
      </value>
     </member>
     <member>
      <name>ID_template</name>
      <value>
       <string>MTIzNDU2</string>
      </value>
     </member>
     <member>
      <name>google_analytics</name>
      <value>
       <string>VFJVRQ==</string>
      </value>
     </member>
     <member>
      <name>analytic_name</name>
      <value>
       <string>bmFtZQ==</string>
      </value>
     </member>
     <member>
      <name>content</name>
      <value>
       <string>CjwhRE9DVFlQRSBodG1sIFBVQkxJQyAiLS8vVzNDLy9EVEQgWEhUTUwgMS4wIFRyYW5zaXRpb25h 
        bC8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9UUi94aHRtbDEvRFREL3hodG1sMS10cmFuc2l0aW9u 
        YWwuZHRkIj4KPGh0bWw+CjxoZWFkPgo8L2hlYWQ+Cjxib2R5PgpKbWVubzogW0ZJUlNUX05BTUVd 
        PGJyPgpQcmlqbWVuaTogW0xBU1RfTkFNRV0KPC9ib2R5Pgo8L2h0bWw+ICAgIAo=</string>
      </value>
     </member>
     <member>
      <name>content2</name>
      <value>
       <string>CjwhRE9DVFlQRSBodG1sIFBVQkxJQyAiLS8vVzNDLy9EVEQgWEhUTUwgMS4wIFRyYW5zaXRpb25h 
        bC8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9UUi94aHRtbDEvRFREL3hodG1sMS10cmFuc2l0aW9u 
        YWwuZHRkIj4KPGh0bWw+CjxoZWFkPgo8L2hlYWQ+Cjxib2R5PgpKbWVubzogW0ZJUlNUX05BTUVd 
        PGJyPgpQcmlqbWVuaTogW0xBU1RfTkFNRV0KPC9ib2R5Pgo8L2h0bWw+ICAgIAo=</string>
      </value>
     </member>
     <member>
      <name>content_txt</name>
      <value>
       <string></string>
      </value>
     </member>
     <member>
      <name>reply_to</name>
      <value>
       <string>ZW1haWxAZW1haWwuY3o=</string>
      </value>
     </member>
     <member>
      <name>unsubscribe_email</name>
      <value>
       <string>ZW1haWxAZW1haWwuY3o=</string>
      </value>
     </member>
     <member>
      <name>web_template</name>
      <value>
       <string>ZmFsc2U=</string>
      </value>
     </member>
     <member>
      <name>style_inline</name>
      <value>
       <string>ZmFsc2U=</string>
      </value>
     </member>
     <member>
      <name>ID_unsubscribe_group</name>
      <value>
       <string></string>
      </value>
     </member>
    </struct>
   </value>
  </param>
  ---AB test settings, campaign B version---
  <param>
   <value>
    <struct>
     <member>
      <name>generate_txt</name>
      <value>
       <string>dHJ1ZQ==</string>
      </value>
     </member>
     <member>
      <name>subject</name>
      <value>
       <string>c3ViamVjdA==</string>
      </value>
     </member>
     <member>
      <name>content</name>
      <value>
       <string></string>
      </value>
     </member>
     <member>
      <name>content2</name>
      <value>
       <string></string>
      </value>
     </member>
     <member>
      <name>ID_allow_email</name>
      <value>
       <string>MTIzNDU2</string>
      </value>
     </member>
     <member>
      <name>ab_percentage</name>
      <value>
       <string>MjA=</string>
      </value>
     </member>
     <member>
      <name>ab_evalution</name>
      <value>
       <string>b3Blbg==</string>
      </value>
     </member>
     <member>
      <name>ab_evalution_time</name>
      <value>
       <string>NGg=</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_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

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

ID_delivery_feed = ID of the data source (delivery feed). Campaign can use either mailing lists or a single delivery feed.

ID_template (Base64) = ID of template

ID_query (v base64) = ID of a query (only in combination with mailing list)

google_analytics (v base64) = automatic link utm tagging for Google Analytics

  • true = enabled​​
  • false = disabled

analytics_name (v base64) = campaign name for Google Analytics reporting

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

Wrong ID_message = invalid ID of campaign

Missing subject of campaign = subject of campaign is missing

Wrong ID_template = invalid template

Confused parameters = it is not possible to combine mailing lists and delivery feeds

Invalid ID_query = invalid ID query

Invalid ID_delivery_feed = invalid data source ID