const url = '<base-url>/api/v1/devices/pairing-codes';
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
cookie: 'better-auth.session_token=<better-auth.session_token>'
},
body: JSON.stringify({deviceName: 'string', platform: 'ios'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));