title: SurveyMonkey creating a collector in Powershell returning "The body provided was not a proper JSON string
body: <p>I'm using Powershell to automate a survey creation, adding a collector, and sending the survey invitation - a pretty common use case.  I was able to create a survey but I'm running into an issue in creating the collector.  I created a collector via Postman but I get the error <code>&quot;1001 - The body provided was not a property JSON string&quot;</code> when using Powershell. I've tried everything I can think of but continue to get the error no matter how I create the JSON. Here is the code I'm using:</p>
  <pre><code>$SurveyCollector = [PSCustomObject]@{ type = 'email' } 
  
  $BodyText = $SurveyCollector | Select-Object -Property type |ConvertTo-Json -Depth 100 -Compress 
  
  $Results = Invoke-RestMethod -Uri $uri -StatusCodeVariable &quot;ExtIDscv&quot; -SkipHttpErrorChe -Method 
  Post -ContentType &quot;application/json&quot; -Authentication Bearer -Token $SecureToken -body -$BodyText 
  </code></pre>
  <p>I'm sure I'm missing something simple. I'd appreciate any help.</p>