sendgrid v1.8.0 SendGrid.Contacts.Recipients View Source

Module to interact with modifying contacts.

See SendGrid’s Contact API Docs for more detail.

Link to this section Summary

Functions

Adds a contact to the contacts list available in Marketing Campaigns. At a minimum, an email address must provided. Additionaly, custom fields that have already been created can added as well

Link to this section Functions

Link to this function add(email_address, custom_fields \\ %{}) View Source
add(String.t, %{}) :: :ok | {:error, [String.t]}

Adds a contact to the contacts list available in Marketing Campaigns. At a minimum, an email address must provided. Additionaly, custom fields that have already been created can added as well.

{:ok, recipient_id} = add("test@example.com", %{"name" => "John Doe"})

{:ok, recipient_id} = add("test@example.com")