post_segment: Create a new segment

Description Usage Arguments Value Examples

View source: R/POST_lists.R

Description

Create a new segment in a specific list.

Usage

1
2
post_segment(list_id = NULL, name = NULL, static_segment = NULL,
  apikey = NULL, user = "anystring", ...)

Arguments

name

The name of the segment.

static_segment

Vector of emails. Any emails provided that are not present will be ignored. Passing an empty vector will create a static segment without any subscribers. This field cannot be provided with the options field.

apikey

API key for mailchimp account

user

User to use in authentication. Can be any string you like. Defaults to "anystring".

...

Query string parameters. See available parameters under CREATE here: API documentation.

Value

Response body parameters. See response parameters under CREATE here: API documentation.

Examples

1
2
3
**## Not run:**
post_segment <- post_segment(name = "my_new_segment", static_segment = c("e@mail1.com", "e@mail2.com"),  apikey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-usxx")
## End(**Not run**)

56north/mailchimpR documentation built on May 5, 2019, 11:27 a.m.