/groups/group_name/subscribers/:subscriber_id/assign

Assigns a subscriber to the group with the given name. If the group doesn't exist, it gets created. If multiple groups with the same name exist, the subscriber is assigned to the oldest group. [Rate limited]

post/groups/group_name/subscribers/{id}/assign

Request

  • Base URL
    https://api.mailerlite.com/api/v2
  • URL
    https://api.mailerlite.com/api/v2/groups/group_name/subscribers/{id}/assign
  • Auth
    API key in header X-MailerLite-ApiKey

Path parameters

idinteger required

The ID of the subscriber to assign to the group

Request body

group_namestring

The name of the group that the subscriber will be assigned to.

Response

200

idinteger
namestring
emailstring
sentinteger
openedinteger
clickedinteger
typestring
date_subscribeunknown
date_unsubscribeunknown
date_createdstring

Example response

{
  "id": 1343965485,
  "name": "John",
  "email": "demo@mailerlite.com",
  "type": "active",
  "fields": [
    {
      "key": "email",
      "value": "demo@mailerlite.com",
      "type": "TEXT"
    }
  ],
  "date_created": "2016-04-04"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.