Add Subscriber Doi

Adding a subscriber using Double-Opt-In (apiAddSubscriberDoi)

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

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

This function uses the double opt-in method. The given subscriber will receive an e-mail containing an activation link. Only after clicking this link is the subscriber added to the subscriber list. If this is not desired, apiAddSubscriber should 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 Example

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->apiAddSubscriberDoi(array('subscriberList'=>$subscriber));

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