1

I am trying to add subscriber to list through Getresponse api for single contact subscription to list i have to call api like this

$getresponse = new GetResponse(api key);
                    $result = $getresponse->addContact(listid,
                        $lead['name'],
                        $lead['email']
                    );

Now i want to add multiple emails at a single call, i cant use foreach loop for each contact, is there a function or endpoint to add multiple emails at a single call?

Bala
  • 913
  • 9
  • 18
Punabaka Abhinav
  • 502
  • 1
  • 9
  • 17

2 Answers2

3

Getresponse official API shows only one contact.

https://apidocs.getresponse.com/v3/resources/contacts#contacts.create

As of now, there is no API endpoints for import contacts as bulk (csv or JSON).

Bala
  • 913
  • 9
  • 18
0

Yes, Bala is correct. There is no such API method for GetResponse to insert multiple contacts. However, please check the below API codes to insert single contact to GetResponse.

include('GetResponseAPI3.class.php');

$getresponse = new GetResponse('your-getresponse-token-here');

$var = $getresponse->addContact(array ( 'name' => 'FirstName LastName', 'email' => 'emailid@something.com', 'dayOfCycle' => 0, 'campaign' => array('campaignId' => 'Campaign-id'), 'ipAddress' => 'XXX.XXX.XX.XX' ) );

var_dump($var);