Empower your subscribers with Dowell’s Newsletter API
The Dowell Subscribe Newsletter API helps you manage your newsletter effortlessly. It lets you see who signed up, helps people subscribe easily, allows easy unsubscribing, and helps you send out newsletters to the right audience
Easily access and retrieve the list of subscribers who have joined your newsletter.
Allow users to subscribe to your newsletter with ease, simplifying the process for both you and your subscribers.
Give users the option to unsubscribe from your newsletter whenever they wish, ensuring a positive and respectful user experience.
Distribute your newsletters to all subscribed users or a specific set of subscribers, allowing you to reach your audience effectively and efficiently.
For detailed API documentation, including endpoint descriptions, request and response examples, and authentication details, please refer to the API documentation
In the following scenarios, Dowell will furnish comprehensive instructions on obtaining the Service key and guide you through the steps to use the Dowell Subscribe Newsletter API. You’ll find examples in various formats such as Python, PHP, React, Flutter, and WordPress in the tabs below. Feel free to explore the examples in each tab for practical insights.
Dive into the power of the Subscribe Newsletter API! Learn how to supercharge marketing campaigns, keep customers in the loop with exciting updates, and boost event attendance effortlessly. Join us for a journey into seamless communication that strengthens connections and drives engagement. Watch now!
To subscribe a user, send a POST request to the specified endpoint with the subscriber’s email, the topic of the newsletter, and the type of subscriber.
Users can unsubscribe by sending a POST request to the unsubscribe endpoint with their email, the newsletter topic, the type of subscriber, and the reason for unsubscribing.
Yes, you can distribute newsletters to either all subscribed users or a specific set of subscribers by utilizing the distribute endpoint.
The API uses API keys for authentication. You’ll receive your unique API key upon request from DoWell Services as we mentioned in ”How to Get API Key’ tab.
Yes, the API likely includes security measures to safeguard subscriber data. Ensure you follow best practices for data protection.
If you encounter any issues, have questions, or need assistance with Dowell Subscribe Newsletter API, you can contact the support team for prompt assistance. Contact us at Dowell@dowellresearch.uk
When distributing newsletters, you can provide the subscriber list in a JSON format, making it easy to specify the names and email addresses of recipients.
There is no specific limit mentioned for managing subscribers using the API, allowing you to scale your newsletter management according to your needs.
Yes, you can integrate the Dowell Subscribe Newsletter API with your existing systems to streamline your newsletter management processes.
Dowell UX Living Lab offers a wide range of APIs to enhance user experience and streamline various processes. To explore the full list of APIs available, including Dowell Email, Dowell Newsletter, Samanta Content Evaluator, and many more.
For more details and to explore the complete list of APIs provided by Dowell UX Living Lab, please visit our documentation page.
This Python script utilizes the `requests` library to make a POST request to the specified URL, expecting JSON data in response. If the request is successful (HTTP status code 200), it prints the retrieved JSON data; otherwise, it prints an error message along with the received status code. Ensure the URL is correct and the server supports the specified endpoint.
import requests
url = "https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=subscriberlist"
response = requests.post(url)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
This Python script utilizes the `requests` library to send a POST request to a specified URL for subscribing to a newsletter. It includes a JSON payload with subscriber information such as email, topic, and subscriber type. The script prints the response data if the request is successful (status code 200) or an error message otherwise.
import requests
url = "https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=subscribe"
payload = {
"topic": "Topic",
"subscriberEmail": "john@example.com",
"typeOfSubscriber": "type of subscriber",
}
response = requests.post(url, json=payload)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
This Python script utilizes the `requests` library to send a POST request to a specified URL for unsubscribing from a newsletter. The request includes JSON payload containing subscriber details such as email, topic, subscriber type, and reason for unsubscribing. The script prints the response data if the request is successful (status code 200) or displays an error message otherwise.
import requests
url = "https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=unsubscribe"
payload = {
"topic": "Topic",
"subscriberEmail": "john@example.com",
"typeOfSubscriber": "type of subscriber",
"reasonToUnsubscribe": "reason to unsubscriber",
}
response = requests.post(url, json=payload)
if response.status_code == 200:
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
This Python script utilizes the `requests` library to make a POST request to a specified API endpoint. It sends a JSON payload containing information about a user’s response to a scale, such as NPS (Net Promoter Score). The script handles the HTTP response, printing a success message if the resource is created (status code 201) and, if applicable, processes and prints the response data. Exception handling is implemented to capture and print any request-related exceptions.
import requests
url = "https://100035.pythonanywhere.com/api/scales/?scale_type=nps&type=response&api_key=c2636d98-4f43-4be1-9e3b-47cdfcbe832b"
payload = {
"username": "parth",
"scale_id": "6571f93d24d47ca1b5e90b2e",
"score": 5,
"instance_id": 3,
"process_id": "101",
"brand_name": "my brand",
"product_name": "my product",
}
try:
response = requests.post(url, json=payload)
if response.status_code == 201:
print("Resource created successfully")
# Optionally, you can also print or process the response data
data = response.json()
print(data)
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Request failed with an exception: {e}")
This PHP script retrieves data from a specified URL using the `file_get_contents` function and then attempts to decode the response as JSON. If the request is successful, it prints the decoded JSON data using `print_r`. In case of a failed request, it outputs “Request failed.” Documentation should include details on the purpose, usage, and potential response scenarios, emphasizing the need for error handling and proper validation.
This PHP script sends a POST request to a specified URL (`https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=subscribe`) with a JSON payload containing information such as the topic, subscriber email, and type of subscriber. It utilizes `file_get_contents` with a custom context to handle the HTTP request and then decodes the JSON response, printing the result if successful or indicating failure.
"Topic",
"subscriberEmail" => "john@example.com",
"typeOfSubscriber" => "type of subscriber",
);
$options = array(
'http' => array(
'header' => "Content-Type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($payload),
),
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response !== false) {
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed.";
}
?>
This PHP script performs an HTTP POST request to unsubscribe a user from a newsletter using JSON payload. The `$url` variable represents the API endpoint, and `$payload` contains unsubscribe details. The script uses `file_get_contents` with a stream context to send the POST request, and it prints the JSON response if successful, or outputs “Request failed” otherwise.
"Topic",
"subscriberEmail" => "john@example.com",
"typeOfSubscriber" => "type of subscriber",
"reasonToUnsubscribe" => "reason to unsubscribe",
);
$options = array(
'http' => array(
'header' => "Content-Type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($payload),
),
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response !== false) {
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed.";
}
?>
This PHP script sends a POST request to a specified URL using `file_get_contents` with a JSON payload. It expects a response, checks the HTTP status code, and prints the result. The payload includes user and product information, and the script handles success or failure accordingly.
"parth",
"scale_id" => "6571f93d24d47ca1b5e90b2e",
"score" => 5,
"instance_id" => 3,
"process_id" => "101",
"brand_name" => "my brand",
"product_name" => "my product",
];
$options = [
'http' => [
'header' => "Content-type: application/json",
'method' => 'POST',
'content' => json_encode($payload),
],
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response !== false) {
$http_response_header_parts = explode(' ', $http_response_header[0]);
$status_code = intval($http_response_header_parts[1]);
if ($status_code == 201) {
echo "Resource created successfully\n";
$data = json_decode($response, true);
print_r($data);
} else {
echo "Request failed with status code: $status_code\n";
echo $response;
}
} else {
echo "Request failed\n";
}
?>
This React component, `YourComponent`, utilizes the `useEffect` hook to fetch data from a specified URL (`https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=subscriberlist`) when the component mounts. The fetched data is logged to the console, and you can replace the `console.log(data)` statement with your custom logic for handling the response data. The component renders a basic `<div>` placeholder for your React component JSX.
import React, { useEffect } from 'react';
const YourComponent = () => {
useEffect(() => {
const url = "https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=subscriberlist";
const fetchData = async () => {
try {
const response = await fetch(url);
if (response.ok) {
const data = await response.json();
console.log(data); // Replace with your logic for handling the response data
} else {
console.error(`Request failed with status code: ${response.status}`);
}
} catch (error) {
console.error('An error occurred:', error);
}
};
fetchData();
}, []); // This ensures that the fetchData function is called when the component mounts
return (
{/* Your React component JSX */}
);
};
export default YourComponent;
This React component, named `YourComponent`, provides a subscription feature through a button click. It utilizes the `fetch` API to send a POST request to a specified URL for subscription, handling success and error responses. The subscription status or any encountered errors are displayed in the component’s UI.
import React, { useState } from 'react';
const YourComponent = () => {
const [responseMessage, setResponseMessage] = useState('');
const handleSubscribe = async () => {
const url = "https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=subscribe";
const payload = {
"topic": "Topic",
"subscriberEmail": "john@example.com",
"typeOfSubscriber": "type of subscriber",
};
try {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
if (response.ok) {
const data = await response.json();
setResponseMessage(data.message); // Assuming the response has a 'message' property
} else {
setResponseMessage(`Request failed with status code: ${response.status}`);
}
} catch (error) {
setResponseMessage(`An error occurred: ${error}`);
}
};
return (
{responseMessage}
);
};
export default YourComponent;
This React component, named `YourComponent`, utilizes the `useEffect` hook to make an asynchronous POST request to a specified URL (`https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=unsubscribe`) when the component mounts. The request includes a JSON payload containing subscriber information. Successful responses are logged to the console, while errors are handled and logged accordingly. The component renders a basic `<div>` placeholder for your React component JSX.
import React, { useEffect } from 'react';
const YourComponent = () => {
useEffect(() => {
const url = "https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=unsubscribe";
const payload = {
"topic": "Topic",
"subscriberEmail": "john@example.com",
"typeOfSubscriber": "type of subscriber",
"reasonToUnsubscribe": "reason to unsubscriber",
};
const fetchData = async () => {
try {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
if (response.ok) {
const data = await response.json();
console.log(data); // Replace with your logic for handling the response data
} else {
console.error(`Request failed with status code: ${response.status}`);
}
} catch (error) {
console.error('An error occurred:', error);
}
};
fetchData();
}, []); // This ensures that the fetchData function is called when the component mounts
return (
{/* Your React component JSX */}
);
};
export default YourComponent;
This React functional component, `MyComponent`, sends a POST request to a specified URL using the Fetch API. It includes a JSON payload and updates the component state with the response, displaying the result in a button-triggered UI. Error handling is implemented to display relevant messages based on the success or failure of the request.
import React, { useState } from 'react';
const MyComponent = () => {
const url = "https://100035.pythonanywhere.com/api/scales/?scale_type=nps&type=response&api_key=c2636d98-4f43-4be1-9e3b-47cdfcbe832b";
const payload = {
username: "parth",
scale_id: "6571f93d24d47ca1b5e90b2e",
score: 5,
instance_id: 3,
process_id: "101",
brand_name: "my brand",
product_name: "my product",
};
const [responseText, setResponseText] = useState('');
const postData = async () => {
try {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
if (response.status === 201) {
const data = await response.json();
setResponseText(JSON.stringify(data, null, 2));
} else {
setResponseText(`Request failed with status code: ${response.status}\n${await response.text()}`);
}
} catch (error) {
setResponseText(`Request failed with an exception: ${error.message}`);
}
};
return (
{responseText}
);
};
export default MyComponent;
This Flutter app demonstrates asynchronous data fetching using the HTTP package. The `fetchData` function makes a POST request to a specified URL, expecting a JSON response. The received data is then decoded, and error handling is implemented. The app’s UI consists of a simple Scaffold with an app bar and a centered text widget.
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: YourWidget(),
);
}
}
class YourWidget extends StatefulWidget {
@override
_YourWidgetState createState() => _YourWidgetState();
}
class _YourWidgetState extends State {
@override
void initState() {
super.initState();
fetchData();
}
void fetchData() async {
final url = Uri.parse("https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=subscriberlist");
try {
final response = await http.post(url);
if (response.statusCode == 200) {
final data = jsonDecode(response.body);
print(data); // Replace with your logic for handling the response data
} else {
print("Request failed with status code: ${response.statusCode}");
}
} catch (error) {
print("An error occurred: $error");
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Flutter App"),
),
body: Center(
child: Text("Your Flutter UI"),
),
);
}
}
This Flutter app initiates an asynchronous HTTP POST request to a specified URL, including a JSON payload. The `makeRequest` function handles the request, decodes the response, and prints the data if the status code is 200. The app’s UI consists of a simple Scaffold with an app bar and a centered text widget. Adjust the URL and payload as needed for your specific use case.
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyWidget(),
);
}
}
class MyWidget extends StatefulWidget {
@override
_MyWidgetState createState() => _MyWidgetState();
}
class _MyWidgetState extends State {
@override
void initState() {
super.initState();
makeRequest();
}
void makeRequest() async {
final url = Uri.parse(
"https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=subscribe");
final payload = {
"topic": "Topic",
"subscriberEmail": "john@example.com",
"typeOfSubscriber": "type of subscriber",
};
try {
final response = await http.post(url, body: jsonEncode(payload), headers: {
'Content-Type': 'application/json',
});
if (response.statusCode == 200) {
final data = jsonDecode(response.body);
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
}
} catch (error) {
print("Request failed with an exception: $error");
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Flutter App"),
),
body: Center(
child: Text("Your Flutter UI"),
),
);
}
}
This Flutter code defines a widget named `YourWidget` with a button triggering a POST request when pressed. The request is sent to a specified URL with a JSON payload containing information for unsubscribing. The response is then processed, and relevant status or error messages are printed, showcasing a basic implementation for handling API interactions in a Flutter app.
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
class YourWidget extends StatefulWidget {
@override
_YourWidgetState createState() => _YourWidgetState();
}
class _YourWidgetState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Your Flutter App"),
),
body: Center(
child: ElevatedButton(
onPressed: () {
fetchData();
},
child: Text("Make Request"),
),
),
);
}
void fetchData() async {
final url = Uri.parse("https://100085.pythonanywhere.com/uxlivinglab/newsletter/v1/c2636d98-4f43-4be1-9e3b-47cdfcbe832b/?type=unsubscribe");
Map headers = {
'Content-Type': 'application/json',
};
Map payload = {
"topic": "Topic",
"subscriberEmail": "john@example.com",
"typeOfSubscriber": "type of subscriber",
"reasonToUnsubscribe": "reason to unsubscriber",
};
try {
final response = await http.post(
url,
headers: headers,
body: jsonEncode(payload),
);
if (response.statusCode == 200) {
final data = jsonDecode(response.body);
print(data); // Replace with your logic for handling the response data
} else {
print("Request failed with status code: ${response.statusCode}");
}
} catch (error) {
print("An error occurred: $error");
}
}
}
void main() {
runApp(MaterialApp(
home: YourWidget(),
));
}
This Flutter app demonstrates sending a POST request to a specified URL using the `http` package. The request includes a JSON payload, and the app provides UI feedback through an ElevatedButton. The app handles responses, printing the result or error details based on the success or failure of the request.
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
final String url = "https://100035.pythonanywhere.com/api/scales/?scale_type=nps&type=response&api_key=c2636d98-4f43-4be1-9e3b-47cdfcbe832b";
final Map payload = {
"username": "parth",
"scale_id": "6571f93d24d47ca1b5e90b2e",
"score": 5,
"instance_id": 3,
"process_id": "101",
"brand_name": "my brand",
"product_name": "my product",
};
Future postData() async {
try {
final response = await http.post(
Uri.parse(url),
headers: {
'Content-Type': 'application/json',
},
body: jsonEncode(payload),
);
if (response.statusCode == 201) {
final data = jsonDecode(response.body);
print("Resource created successfully");
print(data);
} else {
print("Request failed with status code: ${response.statusCode}");
print(response.body);
}
} catch (error) {
print("Request failed with an exception: $error");
}
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Flutter HTTP Request'),
),
body: Center(
child: ElevatedButton(
onPressed: postData,
child: Text('Make Request'),
),
),
),
);
}
}
Set up the Dowell Subscribe Newsletter API name, unique ID and the base url(below). It’s a prerequisite to have WP-GET API plugin installed in your wordpress website
Step 1: Establish the Dowell Subscribe Newsletter API endpoint Get list of Subscriber with the inclusion of the API key, and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Get list of Subscriber to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Subscribe to newsletters with the inclusion of the API key, and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Subscribe to newsletters to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Unsubscribe to newsletters with the inclusion of the API key, and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Unsubscribe to newsletters to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
Step 1: Establish the API endpoint Distribute Newsletters with the inclusion of the API key, and configure the request body to contain the required POST fields.
Step 2: Test the endpoint Distribute Newsletters to obtain a jQuery response from the API. Ensure that the API is functioning correctly by sending a test request and examining the response.
Step 3: To display the output fetched from the API service, copy the shortcode provided by the plugin and add it onto your wordpress website page.
D’Well Research validates and explores each stage of open innovation using user experience research from the field to support user-centered product design of medium and large companies globally.