Sha256: b932410b6e3d1b4ba3ad6460fb9552551e3953b74ec09d4ffa95a4384bfe3c68

Contents?: true

Size: 1.27 KB

Versions: 5

Compression:

Stored size: 1.27 KB

Contents

# Subscribers

## Get all subscribers

```ruby
client.subscribers
```

with options

```ruby
client.subscribers(limit: 5, offset: 10)
```

## Get single subscriber

```ruby
client.subscriber(subscriber_id)
```

or with email

```ruby
client.subscriber('user@example.com')
```

## Create subscriber

```ruby
client.create_subscriber(email: 'john@example.com', name: 'John Smith')
```

## Update single subscriber

```ruby
client.update_subscriber(subscriber_id, options)
```

or with email

```ruby
client.update_subscriber('user@example.com', options)
```

`options` can be:

- `fields` [Array]: Associated array where key is the same as field key.
- `type` [String]: Available values: `unsubscribed`, `active`
- `resend_autoresponders` [Boolean]: Defines if it is needed to resend autoresponders

## Search for subscribers

```ruby
options = {
  query: 'example',
  limit: 1,
  minimized: true
}

client.search_subscribers(query, options)
```

## Get groups subscriber belongs to

```ruby
client.subscriber_groups(subscriber_id)
```

or with email

```ruby
client.subscriber_groups('user@example.com')
```

## Get activites (clicks, opens, etc.) of selected subscriber
```ruby
client.subscriber_activities(subscriber_id)
```

or with email

```ruby
client.subscriber_activities('user@example.com')
```

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mailerlite-1.16.0 examples/subscribers.md
mailerlite-1.15.0 examples/subscribers.md
mailerlite-1.14.0 examples/subscribers.md
mailerlite-1.13.1 examples/subscribers.md
mailerlite-1.13.0 examples/subscribers.md