title: Why the response is always Invalid request body?
body: <p>I'm facing an issue for a week ...creating an entity for an assistant from my company website via curl. Every time I send a request with an array inside the PHP it throws the error. The main error is 'Invalid request body' the reason is when I pass the synonyms it says "synonyms should be of type Array". My array which I pass is...<a href="https://i.stack.imgur.com/u1nq1.jpg" rel="nofollow noreferrer">.......here</a></p>
  
  <pre><code>(3) ["wer", "were", "rrr"]
  0: "wer"
  1: "were"
  2: "rrr"
  length: 3
  __proto__: Array(0)
  </code></pre>
  
  <p>and the code where I pass the values are </p>
  
  <pre><code>curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"entity\": \"" . $intentname . "\",\"fuzzy_match\": true,\"values\":[{\"value\":\"" . $value . "\",\"type\":\"" . $type . "\",\"synonyms\":\"" . $array . "\"}]}");
      curl_setopt($ch, CURLOPT_USERPWD, 'apikey' . ':' . '' . $apikey . '');
  </code></pre>
  
  <p>but when I try to convert it to JSON it trows something like the error is JSON position...</p>
  
  <p>The common error is </p>
  
  <pre><code>error: "Invalid Request Body", errors: Array(1), code: 400}
  code: 400
  error: "Invalid Request Body"
  errors: [{…}]
  __proto__: Object
  </code></pre>
  
  <p>I have tried to change it several arrays through PHP and js but the issue doesn't resolve. Tried many StackOverflow questions none of them resolves the issue.</p>
  
  <p>Thank you. </p>