method
path
Body Parameters
string
required
Email address of the user subscribing to updates.
string
Name of the subscribing user.
boolean
required
Set to
true to subscribe, false to unsubscribe.// Replace API_KEY with your api key and :changelogId with changelog id
curl --location --request PUT 'https://api.supahub.com/api/v1/changelogs/subscribe' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer API_KEY' \
--data-urlencode '[email protected]' \
--data-urlencode 'subscribe=false'
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");
myHeaders.append("Authorization", "Bearer API_KEY"); // Replace API_KEY with your api key
const urlencoded = new URLSearchParams();
urlencoded.append("userEmail", "[email protected]");
urlencoded.append("userName", "User Name");
urlencoded.append("subscribe", "false");
const requestOptions = {
method: "PUT",
headers: myHeaders,
body: urlencoded,
redirect: "follow",
};
fetch("https://api.supahub.com/api/v1/changelogs/subscribe", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
const axios = require('axios');
const qs = require('qs');
let data = qs.stringify({
'userEmail': '[email protected]',
'userName': 'User Name',
'subscribe': 'true'
});
let config = {
method: 'put',
maxBodyLength: Infinity,
url: 'https://api.supahub.com/api/v1/changelogs/subscribe',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer API_KEY' // Replace API_KEY with your api key
}
data : data
};
async function makeRequest() {
try {
const response = await axios.request(config);
console.log(JSON.stringify(response.data));
}
catch (error) {
console.log(error);
}
}
makeRequest();
import requests
url = "https://api.supahub.com/api/v1/changelogs/subscribe"
payload = '[email protected]&userName=User%20Name&subscribe=true'
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Bearer API_KEY' # Replace API_KEY with your key.
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)