What is the curl command required to add an email to a sendgrid marketing list? I have looked through the documentation and I am having trouble understanding what the actual curl commands would be because the authorization section and the actual api endpoints are split up. I have tried:
curl -X "POST" "https://api.sendgrid.com/v3/contactdb/recipients" -H "Authorization: Bearer YOURUSERPASSWORDSTRING" -H "Content-Type: application/json" -d '{"list":"Beta List", "email":"bla@bla.com", "name":""}'
It still seems to give me issues even if I add a dummy name and YOURUSERPASSWORDSTRING is determined by calling the following in terminal:
echo -n "user:password\!" | openssl base64
What am I missing? Also, is there a better way to do this using javascript/Meteor.js? Thanks!