View Source ActiveCampaign.List (active_campaign v0.2.3)

Documentation for ActiveCampaign.List.

Link to this section Summary

Functions

Create a list

Create a list group permission

Delete a list

Retrieve a list

Retrieve all lists

Link to this section Functions

@spec create(map()) :: {:ok, map()} | {:error, any()}

Create a list

examples

Examples

iex> ActiveCampaign.List.create(%{
  name: "Name of List",
  stringid: "Name-of-list",
  sender_url: "http://activecampaign.com",
  sender_reminder: "You are receiving this email as you subscribed to a newsletter when making an order on our site.",
  send_last_broadcast: 0,
  carboncopy: "",
  subscription_notify: "",
  unsubscription_notify: "",
  user: 1
})
{:ok, %{"list" => %{...}}}
Link to this function

create_list_group_permission(list_group)

View Source
@spec create_list_group_permission(map()) :: {:ok, map()} | {:error, any()}

Create a list group permission

examples

Examples

iex> ActiveCampaign.List.create_list_group_permission(%{
  listid: 1,
  groupid: 1
})
{:ok, %{...}}
@spec delete(integer()) :: {:ok, map()} | {:error, any()}

Delete a list

@spec get(integer()) :: {:ok, map()} | {:error, any()}

Retrieve a list

examples

Examples

iex> ActiveCampaign.List.get(1)
{:ok, %{"list" => %{...}}}
@spec list(map()) :: {:ok, map()} | {:error, any()}

Retrieve all lists

The number of lists returned defaults to 20, and can be changed with a limit parameter.

examples

Examples

iex> ActiveCampaign.List.list()
{:ok, %{"lists" => [...]}}

iex> ActiveCampaign.List.list(%{limit: 1})
{:ok, %{"lists" => [%{...}]}}

iex> ActiveCampaign.List.list(%{"filters[name]" => "blue"})
{:ok, %{"lists" => [%{"name" => "Blue Team", ...}, ...]}}