const url = '<base-url>/api/v1/approvals/<approvalId>/decision';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
cookie: 'better-auth.session_token=<better-auth.session_token>'
},
body: JSON.stringify({
threadKey: 'string',
approved: true,
claimAction: 'queue',
expectedInputHash: 'string'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));