Create a custom field
Request
|
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
|
header |
string |
true |
Determines the expected format and data type to retrieve the response data. Value: |
|
|
path |
string |
true |
The ID of the email list where the custom field is created. |
|
|
path |
string |
true |
The supported file format for getting a response. Possible values: |
|
|
query |
string |
true |
The API key of your account. |
|
|
body |
string |
true |
The name of the custom field. |
|
|
body |
string |
false |
Specifies the data type of the custom field. This must be one of the following values.
|
|
|
body |
string |
false |
If you want to create a |
|
|
body |
Boolean |
false |
Specifies whether the custom field is mandatory or not when adding a subscriber to your list. You must specify a value of |
|
|
body |
Boolean |
false |
Specifies whether the custom field is visible to your subscribers in the Update Profile page. You must specify a value of |
POST https://{hostname}/v3/lists/{MailingListID}/customfields/create.{Format}?apikey=
Request body:
{
"Name": "Town",
"CustomFieldType": "SingleSelectDropdown",
"Options": "Athens,London,New York"
}Response
|
Status |
Description |
Headers |
Schema |
|---|---|---|---|
|
|
The request is successful. |
|
N/A |
{
"Code": 0,
"Error": null,
"Context": "b42b4e0f-ca2f-403d-8231-32a2405651af"
}-
Code- the response code. This is0if successful. -
Error- the response error message. This isnullif successful. -
Context- the ID of the custom field created.