CustomField.Create

Description

Creates a new custom field for given subscriber list.

Request Parameters

SessionID = {string} (required)
Session ID which is needed to authenticate the access. It's optional and required for desktop applications only
Command = {CustomField.Create} (required)
API Command
ResponseFormat = {JSON | XML} (required)
Response format
JSONPCallBack = {bool}
Send this parameter for cross-domain. More info about JSONP can be found here: http: //en.wikipedia.org/wiki/JSON#JSONP
SubscriberListID = {integer} (required)
ID of subscriber list
PresetName = {Gender | Age | Employment | Income | Education | Days of the week | Months of the year | U.S. states | Continents | Satisfaction | Importance | Agreement | Comparison}
You can create a new custom field by selecting a preset. This way all options of the preset will be created by backend.
FieldName = {string} (required)
Name of new custom field
FieldType = {Single line | Paragraph text | Multiple choice | Drop down | Checkboxes | Hidden field} (required)
Type of new custom field
FieldDefaultValue = {string} (required)
Default value of new custom field
OptionLabel[n] = {string} (required)
Label of nth option
OptionValue[n] = {string} (required)
Value of nth option
OptionSelected = {array} (required)
Array of selected option ids (Option ids are n)
ValidationMethod = {Disabled | Numbers | Letters | Numbers and letters | Email address | URL | Date | Time | Custom} (required)
Validation method of custom field
ValidationRule = {string} (required)
Validation rule of custom field
Visibility = {Public | User Only}
Whether to show custom field in subscriber area or not
IsRequired = {Yes | No}
Whether to make the custom field mandatory to fill in or not
IsUnique = {Yes | No}
Whether to force custom field entry to be unique or not
IsGlobal = {Yes | No}
If this parameter is set to 'Yes', custom field will be valid for all lists in the user account

Response Parameters

Success = {true | false}
States if there is an error or not
ErrorCode = {integer}
If there is an error, error's code
CustomFieldID = {integer}
ID of new custom field

Error Codes

1
Subscriber list id is missing
2
Field name is missing
3
Field type is missing
4
Validation rule is missing
5
Invalid custom field preset name
99998
Authentication failure or session expired
99999
Not enough privileges