Either you are not sending the “locale” property along with your data. Or you are not making the request correctly.
This error happend to me to because i forgot to set the headers of my post request to:
{ “Content-Type”: “application/json” }
Example request done with the node-fetch package form node:
const entryToCreate = {
name: “Conseil”,
locale: "fr-FR",
};
fetch("http://localhost:1337/api/job-role/1/localizations", {
method: "POST",
body: JSON.stringify(entryToCreate),
headers: { "Content-Type": "application/json" },
})
.then((response) => response.json())
.then((data) => console.log(data));