chmp_post_list: Add Members to a List

Description Usage Arguments Examples

View source: R/lists.R

Description

Add Members to a List

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
chmp_post_list(
  conn,
  list_id = NULL,
  email_address = NULL,
  status = NULL,
  skip_merge_validation = TRUE,
  email_type = NULL,
  merge_fields = NULL,
  interests = NULL,
  language = NULL,
  vip = NULL,
  location = NULL,
  marketing_permissions = NULL,
  ip_signup = NULL,
  timestamp_signup = NULL,
  ip_opt = NULL,
  timestamp_opt = NULL,
  tags = NULL,
  key = NULL,
  parse = TRUE,
  invisibly = TRUE,
  ...
)

chmp_post_list_(
  conn,
  list_id = NULL,
  email_address = NULL,
  status = NULL,
  skip_merge_validation = TRUE,
  email_type = NULL,
  merge_fields = NULL,
  interests = NULL,
  language = NULL,
  vip = NULL,
  location = NULL,
  marketing_permissions = NULL,
  ip_signup = NULL,
  timestamp_signup = NULL,
  ip_opt = NULL,
  timestamp_opt = NULL,
  tags = NULL,
  key = NULL,
  ...
)

Arguments

conn

a connection object. see ChmpClient

list_id

Required: The unique ID for the list

email_address

Required: Email address for a subscriber.

status

Required: Subscriber's current status. Possible values: "subscribed", "unsubscribed", "cleaned", "pending", or "transactional".

skip_merge_validation

If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. The Mailchimp API defaults this to FALSE, but chimpr authors prefer a more permissive default of TRUE.

email_type

Type of email this member asked to get ('html' or 'text').

merge_fields

A dictionary of merge fields audience fields where the keys are the merge tags. For example, "FNAME":"Freddie"

interests

The key of this object's properties is the ID of the interest in question.

language

If set/detected, the subscriber's language

vip

VIP status for subscriber.

location

Subscriber location information. See API for details.

marketing_permissions

The marketing permissions for the subscriber. See API for details.

ip_signup

IP address the subscriber signed up from.

timestamp_signup

The date and time the subscriber signed up for the list in ISO 8601 format.

ip_opt

The IP address the subscriber used to confirm their opt-in status.

timestamp_opt

The date and time the subcscriber confirmed their opt-in status in ISO 8601 format.

tags

The tags that are associated with a member

key

A Mailchimp API key. See https://developer.mailchimp.com/documentation/mailchimp/ to get a key

parse

(logical) Whether to parse to list (FALSE) or data.frame (TRUE). Default: TRUE

invisibly

Logical: TRUE by default. If TRUE, the HTTP request will be returned invisibly; FALSE and it will be returned explicitly.

...

Curl options passed to HttpClient

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
(conn <- ChmpClient$new())

chmp_post_list(conn,
               list_id = "your-list-id",
               email_address = "person@website.com",
               status = "subscribed")


## End(Not run)

sckott/chimpr documentation built on Sept. 17, 2021, 11:04 a.m.