CustomField.Create

Description

Creates a new custom field for given subscriber list.

Request Parameters

APIKey = {string} (required)
The API key you are using to authenticate the access.
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
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

CustomField.Update

Description Updates custom field information. Request Parameters APIKey = {string}...

CustomFields.Copy

Description Copies custom fields of a subscriber list to another subscriber list. Request...

CustomFields.Get

Description Retrieves custom fields of given subscriber list. Request Parameters APIKey =...

CustomFields.Delete

Description Deletes given custom fields. Request Parameters APIKey = {string} (required) The...