Adding contact to a list in SendGrid
This article will assist you in creating a delivery which will add a lead email to a specific list in SendGrid.
SendGrid's API guide - https://docs.sendgrid.com/api-reference/contacts/add-or-update-a-contact
Creating your delivery
1)
Firstly create a JSON PUT delivery to the URL - https://api.sendgrid.com/v3/marketing/contacts
2)
Next add your JSON body in the below format:
{
"contacts": [
{
"email": "[email]"
}
],
"list_ids": [
"ABC123-9876-1234-ABCD-ab12cd56ef78"
]
}
The List ID will be found in the URL when you load up your List in SendGrid.
3)
Finally, add your SendGrid API key into the headers in the format shown below:
Send a test and check if the test lead was added to your list in SendGrid.
As always, feel free to raise a support ticket with any questions or concerns.
Comments