Closed marco-gentili closed 3 years ago
Hi @marco-gentili
If you have any such query about usage of existing features please raise a support ticket to Sendinblue after logging in to your account here: https://account.sendinblue.com/support. For now, You can use this script to add your attributes while creating a new contact:
let defaultClient = SibApiV3Sdk.ApiClient.instance;
let apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = 'YOUR API KEY';
let apiInstance = new SibApiV3Sdk.ContactsApi();
let createContact = new SibApiV3Sdk.CreateContact();
// adding the attributes while creating a contact
createContact = {
"attributes": {
"FIRSTNAME":"John Doe"
},
"email":"example@example.com"
};
apiInstance.createContact(createContact).then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});```
Hi,
I am struggling to add the attribute propriety while I am creating a new contact.
I would like to add the first name while someone subscribing to the newsletter, how can I do that?
I tried to add the attribute in the options and in the body
but
it did not work,Thank you