Add Subscriber Field

Add a custom field (apiAddSubscriberField)

Using this function, you can create a new personalization field.

Request

NameTypeExampleRequiredComment
customFieldNameStringSurname1 Text, 2 Number, 3 Text with linebreak, 4 Boolean
customFieldTypeInteger11 Text, 2 Number, 3 Text with linebreak, 4 Boolean

Error Response

CodeInterpretation
404No valid custom names or custom types were passed.

PHP5 Example

try{
    $customField = array('customFieldName' => 'Surname', 'customFieldType' => 1);
    $response=$client->apiAddSubscriberField($customField);
}
catch (SoapFault $exception) {
    echo ($exception->getMessage());
}