I'm using Sendinblue API 8.3.1 for creating contacts.
When I try to create contact with attributes for saving first name and last name with the email address, the email address is well saved but not attributes.
Here is my code :
$config = \SendinBlue\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'MY API KEY');
$apiInstance = new \SendinBlue\Client\Api\ContactsApi(new \GuzzleHttp\Client(), $config);
$createContact = new \SendinBlue\Client\Model\CreateContact();
$createContact['email'] = 'me@mydomain.com';
$createContact['listIds'] = [2];
$createContact['attributes'] = new \SendinBlue\Client\Model\CreateAttribute(['FIRSTNAME' => 'John', 'LASTNAME' => 'Doe'])
try {
$result = $apiInstance->createContact($createContact);
} catch (\SendinBlue\Client\ApiException $e) {
die($e->getMessage());
}
What am I doing wrong ?