Hello. I am sending a POST request to create a new mailbox using Axios.js in the following format:
const data = {
active: 1,
domain: "MY-DOMAIN",
local_part: username,
name: username,
password: invite,
quota: 1024,
force_pw_update: 1,
tls_enforce_in: 1,
tls_enforce_out: 1
};
const config = {
headers: {
"Content-Type": "application/json",
"Authorization": "MY-API-TOKEN"
}
};
axios.post('https://MYDOMAIN/api/v1/add/mailbox', data, config)
.then(response => {
console.log(response.data);
if (response.status == 200) {
res.send(`blahblahblah`)
console.log(JSON.stringify(response.content)); // debugging feature
};
})
.catch(error => {
console.error(error);
res.status(500).send('blahblahblah');
});
It does not return anything and the status code is 200, but the mailbox is not created. I’ve verified it’s nothing related to CORS.
Has this maybe happened to anyone/does anyone know what might be going on?