Path Parameters
Unique identifier of the comment being requested.
Body Parameters
Description of the comment.
Flag to pin or unpin the comment.
// Replace API_KEY with your api key
curl --location --request PUT 'https://api.supahub.com/api/v1/comments/:commentId' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer API_KEY' \
--data-urlencode 'commentDescription=Updated comment text' \
--data-urlencode 'pinComment=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("commentDescription", "Updated comment text");
urlencoded.append("pinComment", "false");
const requestOptions = {
method: "PUT",
headers: myHeaders,
body: urlencoded,
redirect: "follow",
};
fetch("https://api.supahub.com/api/v1/comments/:commentId", 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({
'commentDescription': 'Updated comment text',
'pinComment': 'false'
});
let config = {
method: 'put',
maxBodyLength: Infinity,
url: 'https://api.supahub.com/api/v1/comments/:commentId',
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/comments/:commentId"
payload = 'commentDescription=Updated%20comment%20text&pinComment=false'
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)