You are here

public function MailchimpAutomations::addWorkflowEmailSubscriber in Mailchimp 8

Adds a subscriber to a Mailchimp workflow automation email queue.

Parameters

string $workflow_id: The unique id for the Automation workflow.

string $workflow_email_id: The unique id for the Automation workflow email.

string $email: The email address of the subscriber.

array $parameters: Associative array of optional request parameters.

Return value

object

See also

http://developer.mailchimp.com/documentation/mailchimp/reference/automat...

File

lib/mailchimp-api-php/src/MailchimpAutomations.php, line 139

Class

MailchimpAutomations

Namespace

Mailchimp

Code

public function addWorkflowEmailSubscriber($workflow_id, $workflow_email_id, $email, $parameters = []) {
  $tokens = [
    'workflow_id' => $workflow_id,
    'workflow_email_id' => $workflow_email_id,
  ];
  $parameters += [
    'email_address' => $email,
  ];
  return $this
    ->request('POST', '/automations/{workflow_id}/emails/{workflow_email_id}/queue', $tokens, $parameters);
}