I have a campaign and I send it with $mj->post to a contact list.
But I want to manage a test with the following code from the API
$response = $mj->post(Resources::$NewsletterTest, ['id' => $idNewsletter, 'body' => $body]);
But then I define the $body with a personnalmessage like this :
$body = [
'Recipients' => [
[
'Email' => "myemail@myemail.com",
'Name' => "John",
'Vars' => [
'personalmessage' => "Hello John this is a test"
]
]
]
];
I get the follwing error :
"Invalid json input:
object ".Recipients..item"->"TTestRecipient" has no property "Vars"" ["StatusCode"]=> int(400)
And I do not understand how to correct the problem