Campaign topics allow for campaign differentiation into different groups by their topic. Based on this grouping the recipients can make their choice of prefered topics and select the type of messages they want to receive. Using the mailkit.email.unsubscribe.getstatus function you can get the list of unsubscribed topics.
API call example:
XML
<?xml version="1.0"?>
<methodCall>
<methodName>mailkit.email.topics</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<struct>
<member>
<name>ID_topics</name>
<value>
<array>
<data>
<value>
<i4>123</i4>
</value>
<value>
<i4>124</i4>
</value>
</data>
</array>
</value>
</member>
<member>
<name>email</name>
<value>
<string>mail@mailkit.eu</string>
</value>
</member>
<member>
<name>activate_all</name>
<value>
<boolean>FALSE</boolean>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
Values
client_id * = client ID can be found in your Mailkit account's menu Profile/Integration.
client_md5 * = MD5 code can be found in your Mailkit account's menu Profile/Integration.
ID_topics** = IDs of topics
email* = recipient's email address
activate_all** = TRUE / FALSE (TRUE will activate all topics)
* required value
** by combining parameters and their values, different topics settings can be achieved:
- if activate_all = TRUE, all topics used (enabled) in the account will be activated/subscribed. If you also enter a value(s) for ID_topics in the API request, these will be ignored and all used (enabled) topics are activated/subscribed.
- if activate_all = FALSE (or no value is set for this parameter (FALSE is set as default)) and you do not enter any value(s) for ID_topics in the API request, all topics used (enabled) in the account will be unsubscribed.
- if activate_all = FALSE (or no value is set for this parameter (FALSE is set as default)) and you enter value(s) for ID_topics at the same time, topics whose ID was used in the API request will be activated/subscribed, other topics (whose ID was not used in the request) will be unsubscribed.
Successful call response:
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>names_inactive</name>
<value>
<array>
<data></data>
</array>
</value>
</member>
<member>
<name>email</name>
<value>
<string>email@example.eu</string>
</value>
</member>
<member>
<name>status</name>
<value>
<string>OK</string>
</value>
</member>
<member>
<name>names_active</name>
<value>
<array>
<data>
<value>
<string>Topic 1(123)</string>
</value>
<value>
<string>Topic 2(124)</string>
</value>
</data>
</array>
</value>
</member>
<member>
<name>ID_topic_inactive</name>
<value>
<array>
<data></data>
</array>
</value>
</member>
<member>
<name>ID_topic_active</name>
<value>
<array>
<data>
<value>
<i4>123</i4>
</value>
<value>
<i4>124</i4>
</value>
</data>
</array>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Values
status = OK
email = e-mail address of which the topics were updated
ID_topic_active = list of active campaign topcis
ID_topic_inactive = list of inactive campaign topics
names_active = names of active campaign topcis
names_inactive = names of inactive campaign topics
Email is unsubscribed = the email specified in the API request is unsubscribed (it is in the list of unsubscribed recipients) - topics cannot be set for such an e-mail address