Skip to content

Custom Field API Documentation

Custom field management endpoints for creating, updating, copying, deleting, and retrieving custom fields for subscriber lists.

Create a Custom Field

POST /api.php

API Usage Notes

  • Authentication required: User API Key
  • Required permissions: CustomField.Create
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: customfield.create
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
SubscriberListIDIntegerYesID of the subscriber list
FieldNameStringConditionalName of the custom field (required if PresetName not provided)
FieldTypeStringConditionalType of field: "Single line", "Paragraph text", "Multiple choice", "Drop down", "Checkboxes", "Hidden field", "Date field", "Time field" (required if PresetName not provided)
PresetNameStringNoPreset name (e.g., "Country"). If set, only SubscriberListID is required
DataTypeStringNoSimplified data type: "text", "longtext", "number", "datetime", "date", "time", "timestamp", "single-select", "multi-select". Overrides FieldType and other fields
DefaultValueStringNoDefault value for the custom field
ValidationMethodStringNoValidation method: "Disabled", "Numbers", "Letters", "Numbers and letters", "Email address", "URL", "Date", "Time", "Custom"
ValidationRuleStringConditionalValidation rule (required if ValidationMethod is "Custom")
MergeTagAliasStringNoCustom merge tag alias (alphanumeric, spaces, dots, hyphens, underscores only)
OptionLabelArrayNoArray of option labels (for dropdown/multiple choice fields)
OptionValueArrayNoArray of option values (for dropdown/multiple choice fields)
OptionSelectedArrayNoArray of selected option keys (for dropdown/multiple choice fields)
IsRequiredStringNoWhether field is required: "Yes" or "No" (default: "No")
IsUniqueStringNoWhether field must be unique: "Yes" or "No" (default: "No")
VisibilityStringNoField visibility: "Public", "User Only", or "Hidden" (default: "User Only")
IsGlobalStringNoWhether field is global: "Yes" or "No" (default: "No")
YearsStringConditionalYear range for date fields (required if FieldType is "Date field"). Format: "YYYY-YYYY" (e.g., "2010-2030")
MetaObjectNoAdditional metadata for the field
UniqueIdentifierBooleanNoWhether field should be marked as unique identifier
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "customfield.create",
    "SessionID": "your-session-id",
    "SubscriberListID": 123,
    "FieldName": "Company Name",
    "FieldType": "Single line",
    "DefaultValue": "",
    "ValidationMethod": "Disabled",
    "IsRequired": "No",
    "IsUnique": "No",
    "Visibility": "Public"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": "",
  "CustomFieldID": 456
}
json
{
  "Success": false,
  "ErrorCode": [1, 2],
  "ErrorText": ["Missing subscriber list id", "Missing field name"]
}
txt
0: Success
1: Missing subscriber list id
2: Missing field name
3: Missing field type
4: Missing validation rule
5: Invalid preset name
7: Invalid data type
8: Invalid subscriber list id
1000: Merge tag alias code has been set for another custom field
1001: Merge tag alias code includes invalid characters

Update a Custom Field

POST /api.php

API Usage Notes

  • Authentication required: User API Key
  • Required permissions: CustomField.Update
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: customfield.update
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
CustomFieldIDIntegerYesID of the custom field to update
FieldNameStringYesName of the custom field
FieldTypeStringYesType of field: "Single line", "Paragraph text", "Multiple choice", "Drop down", "Checkboxes", "Hidden field", "Date field", "Time field"
SubscriberListIDIntegerNoID of the subscriber list
DefaultValueStringNoDefault value for the custom field
ValidationMethodStringNoValidation method: "Disabled", "Numbers", "Letters", "Numbers and letters", "Email address", "URL", "Date", "Time", "Custom"
ValidationRuleStringConditionalValidation rule (required if ValidationMethod is "Date", "Time", or "Custom")
MergeTagAliasStringNoCustom merge tag alias (alphanumeric, spaces, dots, hyphens, underscores only)
OptionLabelArrayNoArray of option labels (for dropdown/multiple choice fields)
OptionValueArrayNoArray of option values (for dropdown/multiple choice fields)
OptionSelectedArrayNoArray of selected option keys (for dropdown/multiple choice fields)
IsRequiredStringNoWhether field is required: "Yes" or "No"
IsUniqueStringNoWhether field must be unique: "Yes" or "No"
VisibilityStringNoField visibility: "Public", "User Only", or "Hidden"
IsGlobalStringNoWhether field is global: "Yes" or "No"
YearsStringNoYear range for date fields. Format: "YYYY-YYYY"
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "customfield.update",
    "SessionID": "your-session-id",
    "CustomFieldID": 456,
    "FieldName": "Company Name (Updated)",
    "FieldType": "Single line",
    "Visibility": "User Only",
    "IsRequired": "Yes"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": ""
}
json
{
  "Success": false,
  "ErrorCode": [1, 6],
  "ErrorText": ["Missing custom field id", "Invalid custom field id"]
}
txt
0: Success
1: Missing custom field id
2: Missing field name
3: Missing field type
4: Missing validation rule
6: Invalid custom field id
7: Invalid field type
8: Invalid validation method
9: Invalid visibility value
10: Invalid IsRequired value
11: Invalid IsUnique value
12: Invalid IsGlobal value
1000: Merge tag alias code has been set for another custom field
1001: Merge tag alias code includes invalid characters

Copy Custom Fields Between Lists

POST /api.php

API Usage Notes

  • Authentication required: User API Key
  • Required permissions: CustomField.Create
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: customfields.copy
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
SourceListIDIntegerYesID of the source subscriber list
TargetListIDIntegerYesID of the target subscriber list
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "customfields.copy",
    "SessionID": "your-session-id",
    "SourceListID": 123,
    "TargetListID": 456
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": ""
}
json
{
  "Success": false,
  "ErrorCode": [1, 2],
  "ErrorText": ["Missing source subscriber list id", "Missing target subscriber list id"]
}
txt
0: Success
1: Missing source subscriber list id
2: Missing target subscriber list id
3: Invalid source subscriber list id
4: Invalid target subscriber list id

Delete Custom Fields

POST /api.php

API Usage Notes

  • Authentication required: User API Key
  • Required permissions: CustomFields.Delete
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: customfields.delete
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
CustomFieldsStringYesComma-separated list of custom field IDs to delete (e.g., "123,456,789")
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "customfields.delete",
    "SessionID": "your-session-id",
    "CustomFields": "456,789,1011"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": ""
}
json
{
  "Success": false,
  "ErrorCode": [1],
  "ErrorText": ["Custom field ids are missing"]
}
txt
0: Success
1: Custom field ids are missing

Get Custom Fields

POST /api.php

API Usage Notes

  • Authentication required: User API Key
  • Required permissions: CustomFields.Get
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: customfields.get
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
SubscriberListIDIntegerYesID of the subscriber list
OrderFieldStringNoField to order by: "FieldName", "CustomFieldID", "FieldType", "IsRequired", "IsUnique", "Visibility", "IsGlobal" (default: "FieldName")
OrderTypeStringNoOrder direction: "ASC" or "DESC" (default: "ASC")
ReturnGlobalCustomFieldsBooleanNoWhether to include global custom fields in the response (default: false)
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "customfields.get",
    "SessionID": "your-session-id",
    "SubscriberListID": 123,
    "OrderField": "FieldName",
    "OrderType": "ASC",
    "ReturnGlobalCustomFields": false
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": "",
  "TotalFieldCount": 5,
  "CustomFields": [
    {
      "CustomFieldID": "456",
      "RelListID": "123",
      "FieldName": "Company Name",
      "FieldType": "Single line",
      "FieldDefaultValue": "",
      "ValidationMethod": "Disabled",
      "IsRequired": "No",
      "IsUnique": "No",
      "Visibility": "Public",
      "IsGlobal": "No"
    }
  ]
}
json
{
  "Success": false,
  "ErrorCode": [1],
  "ErrorText": ["Missing subscriber list id"]
}
txt
0: Success
1: Missing subscriber list id
2: Invalid subscriber list id

Create a Global Custom Field

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: global.customfield.create
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
FieldNameStringYesName of the global custom field
FieldTypeStringYesType of field: "Single line", "Paragraph text", "Multiple choice", "Drop down", "Checkboxes", "Hidden field", "Date field", "Time field"
DefaultValueStringNoDefault value for the custom field
ValidationMethodStringNoValidation method: "Disabled", "Numbers", "Letters", "Numbers and letters", "Email address", "URL", "Date", "Time", "Custom"
ValidationRuleStringConditionalValidation rule (required if ValidationMethod is "Custom")
MergeTagAliasStringNoCustom merge tag alias (alphanumeric, spaces, dots, hyphens, underscores only)
OptionLabelArrayNoArray of option labels (for dropdown/multiple choice fields)
OptionValueArrayNoArray of option values (for dropdown/multiple choice fields)
OptionSelectedArrayNoArray of selected option keys (for dropdown/multiple choice fields)
IsRequiredStringNoWhether field is required: "Yes" or "No" (default: "No")
IsUniqueStringNoWhether field must be unique: "Yes" or "No" (default: "No")
VisibilityStringNoField visibility: "Public" or "User Only" (default: "User Only")
YearsStringConditionalYear range for date fields (required if FieldType is "Date field"). Format: "YYYY-YYYY" (e.g., "2010-2030")
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "global.customfield.create",
    "SessionID": "admin-session-id",
    "FieldName": "Industry",
    "FieldType": "Drop down",
    "DefaultValue": "",
    "ValidationMethod": "Disabled",
    "IsRequired": "No",
    "IsUnique": "No",
    "Visibility": "Public",
    "OptionLabel": ["Technology", "Healthcare", "Finance", "Retail"],
    "OptionValue": ["tech", "health", "finance", "retail"],
    "OptionSelected": []
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": "",
  "CustomFieldID": 789
}
json
{
  "Success": false,
  "ErrorCode": [2, 3],
  "ErrorText": ["Missing field name", "Missing field type"]
}
txt
0: Success
2: Missing field name
3: Missing field type
4: Missing validation rule
5: Missing years (for date fields)
1000: Merge tag alias code has been set for another custom field
1001: Merge tag alias code includes invalid characters

Update a Global Custom Field

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: global.customfield.update
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
CustomFieldIDIntegerYesID of the global custom field to update
FieldNameStringYesName of the global custom field
FieldTypeStringYesType of field: "Single line", "Paragraph text", "Multiple choice", "Drop down", "Checkboxes", "Hidden field", "Date field", "Time field"
DefaultValueStringNoDefault value for the custom field
ValidationMethodStringNoValidation method: "Disabled", "Numbers", "Letters", "Numbers and letters", "Email address", "URL", "Date", "Time", "Custom"
ValidationRuleStringConditionalValidation rule (required if ValidationMethod is "Date", "Time", or "Custom")
MergeTagAliasStringNoCustom merge tag alias (alphanumeric, spaces, dots, hyphens, underscores only)
OptionLabelArrayNoArray of option labels (for dropdown/multiple choice fields)
OptionValueArrayNoArray of option values (for dropdown/multiple choice fields)
OptionSelectedArrayNoArray of selected option keys (for dropdown/multiple choice fields)
IsRequiredStringNoWhether field is required: "Yes" or "No"
IsUniqueStringNoWhether field must be unique: "Yes" or "No"
VisibilityStringNoField visibility: "Public" or "User Only"
YearsStringNoYear range for date fields. Format: "YYYY-YYYY"
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "global.customfield.update",
    "SessionID": "admin-session-id",
    "CustomFieldID": 789,
    "FieldName": "Industry Sector",
    "FieldType": "Drop down",
    "Visibility": "Public",
    "IsRequired": "Yes"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": ""
}
json
{
  "Success": false,
  "ErrorCode": [1, 6],
  "ErrorText": ["Missing custom field id", "Invalid custom field id"]
}
txt
0: Success
1: Missing custom field id
2: Missing field name
3: Missing field type
4: Missing validation rule
6: Invalid custom field id
7: Invalid field type
8: Invalid validation method
9: Invalid visibility value
10: Invalid IsRequired value
11: Invalid IsUnique value
1000: Merge tag alias code has been set for another custom field
1001: Merge tag alias code includes invalid characters

Delete Global Custom Fields

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: global.customfields.delete
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
CustomFieldsStringYesComma-separated list of global custom field IDs to delete (e.g., "123,456,789")
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "global.customfields.delete",
    "SessionID": "admin-session-id",
    "CustomFields": "789,790,791"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": ""
}
json
{
  "Success": false,
  "ErrorCode": [1],
  "ErrorText": ["Custom field ids are missing"]
}
txt
0: Success
1: Custom field ids are missing

Get Global Custom Fields

POST /api.php

API Usage Notes

  • Authentication required: Admin API Key
  • Legacy endpoint access via /api.php only (no v1 REST alias configured)

Request Body Parameters:

ParameterTypeRequiredDescription
CommandStringYesAPI command: global.customfields.get
SessionIDStringNoSession ID obtained from login
APIKeyStringNoAPI key for authentication
OrderFieldStringNoField to order by: "FieldName", "CustomFieldID", "FieldType", "IsRequired", "IsUnique", "Visibility", "IsGlobal" (default: "FieldName")
OrderTypeStringNoOrder direction: "ASC" or "DESC" (default: "ASC")
bash
curl -X POST https://example.com/api.php \
  -H "Content-Type: application/json" \
  -d '{
    "Command": "global.customfields.get",
    "SessionID": "admin-session-id",
    "OrderField": "FieldName",
    "OrderType": "ASC"
  }'
json
{
  "Success": true,
  "ErrorCode": 0,
  "ErrorText": "",
  "TotalFieldCount": 3,
  "CustomFields": [
    {
      "CustomFieldID": "789",
      "RelListID": "0",
      "RelOwnerUserID": "0",
      "FieldName": "Industry Sector",
      "FieldType": "Drop down",
      "FieldDefaultValue": "",
      "ValidationMethod": "Disabled",
      "IsRequired": "No",
      "IsUnique": "No",
      "Visibility": "Public",
      "IsGlobal": "Yes"
    }
  ]
}
json
{
  "Success": false,
  "ErrorCode": 0
}
txt
0: Success

Any questions? Contact us.