Skip to content

Instantly share code, notes, and snippets.

@arnaudbreton
Forked from swooop/managemanycontacts.sh
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arnaudbreton/4f491662cbdfd28292f5 to your computer and use it in GitHub Desktop.
Save arnaudbreton/4f491662cbdfd28292f5 to your computer and use it in GitHub Desktop.
Adding multiple contacts to a list
curl -X POST \
--user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
https://api.mailjet.com/v3/REST/contactslist/$ID/managemanycontacts \
-H "Content-Type: application/json" \
-d '{
"Action": "addnoforce",
"Contacts": [
{
"Email": "jimsmith@example.com",
"Name": "Jim",
"Properties": {
"Property1": "value",
"Property2": "value2"
}
},
{
"Email": "janetdoe@example.com",
"Name": "Janet",
"Properties": {
"Property1": "value",
"Property2": "value2"
}
}
]
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment