Crear cuenta Mailrelay Crear cuenta Mailrelay Crear cuenta Mailrelay

Send immediate autoresponder when updating subscribers via API

Published by Mailrelay on June 9, 2017


Today, we present a new feature for your email campaigns. Our staff updated our API for sending an immediate autoresponder when a suscriber is updated.

It is an interesting improvement for those who work with our API for managing the Mailrelay account.

Which function has been updated?

The updateSubscriber function of our API has been improved, which you can see here:


This function is used to update subscribers, for example to change contacts from one group to another.

What has changed?

Only a small change was made, adding a new parameter, In the function:


This parameter defines whether, after updating the subscriber, the system will check the settings  and if necessary, send an autoresponder.

For example:

Suppose you have created two groups, one group called blog and another called customers.

The customer group has an associated autoresponder that sends an emailwhen a new subscriber is added to this group, an autoresponder with immediate response.

If you have a subscriber in the blog group.

When you upgrade the subscriber to the customers group, simply change the parameter to true for the system to send the autoresponder when the suscriber is updated to the other group.

How is it used?

If you don’t specify the sendAutoresponders parameter, everything will work as before, that is, the subscriber wil be updated, but the system will not send the autoresponder.

That is, if you don’t change the code you are already using, everything will work as before.

If you decide to use this parameter, two things can happen:

  1. If you specify it as “false” the autoresponder will not be sent
  2. And if you set it to “true”, the autoresponder will be sent

► Practice example using this function

In this case, the subscriber would be upgraded and the system would send the autoresponder, if you move the subscriber to  group with a an active autoresponder with immediate response:

$postData = array(
       ‘function’ => ‘updateSubscriber’,
        ‘apiKey’ => $apiKey,
        ‘id’ => 1,
         ’email’ => ‘’,
         ‘groups’ => array(1),
         ‘sendAutoresponders’ => true

If the parameter:

  1. Is set to false
  2. Or it is not specified

The autoresponder with immediate response would not be sent.

Does this affect previous codes?

No, if you don’t change any of the codes you already use, everything will continue working as before.

We hope this new feature is useful!

barra suscripción

Subscribe to Mailrelay's newsletter

We don't offer the typical PDF download that no one reads, just a subscription to great weekly contents


Leave a comment

Your email address will not be published. Required fields are marked *

Menu Title