| POST | /unsubscribe | Unsubscribe an email from onboarding and similar campaign messages. | No authentication required. |
|---|
import 'package:servicestack/servicestack.dart';
class UnsubscribeEmailTopicResponse implements IConvertible
{
String? Email;
String? ConfigurationSet;
String? Topic;
bool? Unsubscribed;
UnsubscribeEmailTopicResponse({this.Email,this.ConfigurationSet,this.Topic,this.Unsubscribed});
UnsubscribeEmailTopicResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Email = json['Email'];
ConfigurationSet = json['ConfigurationSet'];
Topic = json['Topic'];
Unsubscribed = json['Unsubscribed'];
return this;
}
Map<String, dynamic> toJson() => {
'Email': Email,
'ConfigurationSet': ConfigurationSet,
'Topic': Topic,
'Unsubscribed': Unsubscribed
};
getTypeName() => "UnsubscribeEmailTopicResponse";
TypeContext? context = _ctx;
}
class UnsubscribeEmailTopic implements IConvertible
{
/**
* The email address to unsubscribe.
*/
// @ApiMember(Description="The email address to unsubscribe.", IsRequired=true)
String? Email;
/**
* Configuration set identifier used when sending the email.
*/
// @ApiMember(Description="Configuration set identifier used when sending the email.", IsRequired=true)
String? ConfigurationSet;
/**
* Topic identifier used when sending the email.
*/
// @ApiMember(Description="Topic identifier used when sending the email.", IsRequired=true)
String? Topic;
/**
* Verification token from the unsubscribe link.
*/
// @ApiMember(Description="Verification token from the unsubscribe link.", IsRequired=true)
String? Token;
UnsubscribeEmailTopic({this.Email,this.ConfigurationSet,this.Topic,this.Token});
UnsubscribeEmailTopic.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Email = json['Email'];
ConfigurationSet = json['ConfigurationSet'];
Topic = json['Topic'];
Token = json['Token'];
return this;
}
Map<String, dynamic> toJson() => {
'Email': Email,
'ConfigurationSet': ConfigurationSet,
'Topic': Topic,
'Token': Token
};
getTypeName() => "UnsubscribeEmailTopic";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'UnsubscribeEmailTopicResponse': TypeInfo(TypeOf.Class, create:() => UnsubscribeEmailTopicResponse()),
'UnsubscribeEmailTopic': TypeInfo(TypeOf.Class, create:() => UnsubscribeEmailTopic()),
});
Dart UnsubscribeEmailTopic DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
Content-Type: text/csv
Content-Length: length
{"Email":"String","ConfigurationSet":"String","Topic":"String","Token":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Email":"String","ConfigurationSet":"String","Topic":"String","Unsubscribed":false}