Adding contact to a list in SendGrid
This article will briefly outline how you can create a LeadByte 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
Firstly create a JSON PUT delivery to the URL - https://api.sendgrid.com/v3/marketing/contacts
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.
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