POST Localization on id

When i make a post on my api i have that response:

“data”: {
“name”: “Conseil”

“data”: null,
“error”: {
“status”: 400,
“name”: “ApplicationError”,
“message”: “locale is missing”,
“details”: {}

if someone can help me please
(i take the post method il my swagger documentation api plugin)

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));