added
Contact import endpoint now supports JSON body
over 2 years ago by Sendinblue
You can now create contact import jobs using a complete JSON definition for your contact attributes.
In order to achieve this you can pass the JSON payload in the contact import API via fileUrl
or jsonBody
. Just add a json file in the fileUrl
parameter or JSON formatted data in the jsonBody
parameter.
curl --request POST \
2 --url https://api.sendinblue.com/v3/contacts/import \
3 --header 'Accept: application/json' \
4 --header 'Content-Type: application/json' \
5--data '
6{ "listIds": [
7 67
8 ],
9 "emailBlacklist": false,
10 "smsBlacklist": false,
11 "updateExistingContacts": true,
12 "emptyContactsAttributes": false,
13 "notifyUrl": "http://mywebhook.com",
14 "jsonBody": [{
15 "email": "[email protected]",
16 "attributes": {
17 "LNAME": "smith",
18 "FNAME": "andreas",
19 "COUNTRY": "NE"
20 }},{
21 "email": "[email protected]",
22 "attributes": {
23 "LNAME": "jackson",
24 "FNAME": "Mark",
25 "COUNTRY": "DE",
26 "BIRTHDAY": "11/02/1989",
27 "PREFERED_COLOR": "BLACK"
28 }}],
29}
30'