Add Subscriber

Adding a subscriber (apiAddSubscriber)

Use this function to add subscribers into a subscriber list. The subscriber must have a valid e-mail. Personalization fields may be passed (max 25). For this, the customFieldID and all relevant content must be passed. If an incorrect customFieldID is passed, no personalization fields are applied.

If a subscriber to be created is already present in the system, their personalization fields will be overwritten with the new values.

If the double opt-in method is desired for logging in, apiAddSubscriberDoi must be used.

Request

NameTypeExampleRequiredComment
subscriberListsubscriberList (50) subscriberListA maximum of 50 subscribers can be passed per call.

Error Response

CodeInterpretation
204No subscribers were passed.
404No valid list IDs were passed.
416An invalid e-mail address was passed.

PHP5 Beispiel

try{
 $subscriber[0] = array(
 'listID' => '123456789',
 'email' => 'mustermann@test.de',
 'customFields' => array(
 0 => array(
 'customFieldID' => '12345',
 'customFieldValue' => 'Herr'
 ),
 1 => array(
 'customFieldID' => '12346',
 'customFieldValue' => 'Dr.'
 ),
 2 => array(
 'customFieldID' => '123457',
 'customFieldValue' => 'Max'
 ),
 3 => array(
 'customFieldID' => '123458',
 'customFieldValue' => 'Mustermann'
 ),
 )
 );

 $response=$client->apiAddSubscriber(array('subscriberList'=>$subscriber));

}
catch (SoapFault $exception) {
 echo ($exception->getMessage());
}