# ExCampaignMonitor

[![ version](](
[![ downloads](](

A simple wrapper for the Campaign Monitor JSON API.

## Installation

1. Install the package by adding `ex_campaign_monitor` to your list of dependencies in `mix.exs`:
def deps do
    {:ex_campaign_monitor, "~> 0.9"}

2. Add your Campaign Monitor account API key and a List ID to your application's config:
  config :ex_campaign_monitor,
    :api_key, "YOUR_API_KEY",
    :list_id, "YOUR_LIST_ID",

3. Call a function on the `ExCampaignMonitor` module, for example:
defmodule MyApp.PageController do
  use MyAppWeb, :controller

  def index(conn, params) do
      email: params["email"], # email address of the user you want to subscribe
      consent_to_track: params["consent], #
      name: params["name"],
      custom_fields: [
          key: "website",
          value: params["website"]
    send_resp(conn, "Subscriber added")

## Features
### [Subscribers](
  - [x] Adding a subscriber
  - [x] Updating a subscriber
  - [x] Importing many subscribers
  - [x] Getting a subscriber
  - [x] Unsubscribing a subscriber
  - [x] Deleting a subscriber
### [Lists](
  - [x] Active subscribers
  - [x] Creating a List
  - [x] Getting list details
  - [x] List webhooks
  - [x] Activate a webhook
  - [x] Creating a webhook
  - [x] Deleting a webhook
### [Transactional](
 - [x] Smart email