BokaMera.API.Host

<back to all web services

UnsubscribeEmailTopic

The following routes are available for this service:
POST/unsubscribeUnsubscribe an email from onboarding and similar campaign messages.No authentication required.
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class UnsubscribeEmailTopic
    {
        /**
        * The email address to unsubscribe.
        */
        @ApiMember(Description="The email address to unsubscribe.", IsRequired=true)
        public String Email = null;

        /**
        * Configuration set identifier used when sending the email.
        */
        @ApiMember(Description="Configuration set identifier used when sending the email.", IsRequired=true)
        public String ConfigurationSet = null;

        /**
        * Topic identifier used when sending the email.
        */
        @ApiMember(Description="Topic identifier used when sending the email.", IsRequired=true)
        public String Topic = null;

        /**
        * Verification token from the unsubscribe link.
        */
        @ApiMember(Description="Verification token from the unsubscribe link.", IsRequired=true)
        public String Token = null;
        
        public String getEmail() { return Email; }
        public UnsubscribeEmailTopic setEmail(String value) { this.Email = value; return this; }
        public String getConfigurationSet() { return ConfigurationSet; }
        public UnsubscribeEmailTopic setConfigurationSet(String value) { this.ConfigurationSet = value; return this; }
        public String getTopic() { return Topic; }
        public UnsubscribeEmailTopic setTopic(String value) { this.Topic = value; return this; }
        public String getToken() { return Token; }
        public UnsubscribeEmailTopic setToken(String value) { this.Token = value; return this; }
    }

    public static class UnsubscribeEmailTopicResponse
    {
        public String Email = null;
        public String ConfigurationSet = null;
        public String Topic = null;
        public Boolean Unsubscribed = null;
        
        public String getEmail() { return Email; }
        public UnsubscribeEmailTopicResponse setEmail(String value) { this.Email = value; return this; }
        public String getConfigurationSet() { return ConfigurationSet; }
        public UnsubscribeEmailTopicResponse setConfigurationSet(String value) { this.ConfigurationSet = value; return this; }
        public String getTopic() { return Topic; }
        public UnsubscribeEmailTopicResponse setTopic(String value) { this.Topic = value; return this; }
        public Boolean isUnsubscribed() { return Unsubscribed; }
        public UnsubscribeEmailTopicResponse setUnsubscribed(Boolean value) { this.Unsubscribed = value; return this; }
    }

}

Java UnsubscribeEmailTopic DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /unsubscribe HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Email":"String","ConfigurationSet":"String","Topic":"String","Token":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Email":"String","ConfigurationSet":"String","Topic":"String","Unsubscribed":false}