It is a method to create a new user field, the value of which can be set for each recipient, and then it can be substituted in the letter.
Principle of use
|Syntax and URL to call the method
|createField (string name, string type)
||API access key.
||Variable to be substituted. It must be unique and case sensitive. Also, it is not recommended to create a field with the same name as the standard field names (tags, email, phone, email_status, phone_status, etc.) as the importContacts. Admissible characters: Latin letters, numbers, «_» and «-». The first character must be a letter. No spaces are allowed.
||Field type Possible options:
- string — string;
- text — one or more strings;
- number — integer or number with decimal point;
- date — date (the DD.MM.YYYY, DD-MM-YYYY, YYYY.MM.DD, YYYY-MM-DD format is supported);
- bool — 1/0, yes/no.
The field type is relevant only for the web interface, the controls are adjusted to the possible values. Values of different types are stored in the same way, in the text form.
||Field name. If it is not used, an automatical generation by the «name» field will take place.
|Object with an id field containing the code of the field created.Example of the return value: