Beside common fields of a contact like emails, names, addresses, cellphone numbers, etc. You can add customized fields to your mail lists to store more information about your list's contacts such as their preferences, scores, etc. and then you can organize contacts based on specific interest groups within your list/audience.
Parameters
api_token
string
Your API token. You can find it in your API main page when logged in.
type
string
Choose one of these types: text, number, datetime.
label
string
Field' label
tag
string
The tag name may have alpha-numeric characters, as well as dashes and underscores.
default_value
string
Default value of the field
$client = new Acelle\Client(
'https://app.sastamail.com/api/v1',
'*|api_token|*'
);
$client->list()->addCustomField('5fd18406c7b1d', [
'type' => 'text',
'label' => 'Custom',
'tag' => 'CUSTOM_FIELD_1',
'default_value' => 'test',
]);
{
"status": 1,
"message": "List's field was created",
"field": {
"mail_list_id": 2,
"type": "text",
"label": "Custom",
"tag":"CUSTOM_FIELD_1",
"default_value":"test",
"uid":"5fcae3cb6298f",
"updated_at":"2020-12-05 01:35:07",
"created_at":"2020-12-05 01:35:07","id":7
}
}