You can use the UrlFetchApp class. This allows you to send POST requests.
The below uses the templates/render endpoint.
const url = "https://api.shotstack.io/v1/templates/render";
const payload = {
id: "be86bfc2-a19b-4ab6-aa6c-f70242a388fc",
merge: [
{
find: "name",
replace: "Noure"
}
]
};
const options = {
"method": "post",
"headers": {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
},
"payload": JSON.stringify(payload)
};
function render() {
const response = UrlFetchApp.fetch(url, options);
console.log(response.getContentText());
}
