curl "https://app.tatango.com/api/v2/lists/<ID>/custom_field" -d '{"custom_field":{"label":"The Label","key":"the_key","content_type":"text","max_length":9999,"pattern":"[A-Za-z0-9]","should_validate_regex_via_api":false,"default_value":"The Default Value"}}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-u [email protected]:my_api_key \
-H "Host: example.org" \
-H "Cookie: "{
"status": "OK",
"custom_field": {
"list_id": 30,
"key": "the_key",
"pattern": "[A-Za-z0-9]",
"max_length": 9999,
"default_value": "The Default Value",
"can_insert": true,
"can_segment": true,
"created_at": "2023-11-22T08:14:19.000-08:00",
"updated_at": "2023-11-22T08:14:19.000-08:00",
"mask": null,
"label": "The Label",
"content_type": "text",
"should_validate_regex_via_api": false
}
}This endpoint creates a custom field.
curl "https://app.tatango.com/api/v2/lists/<ID>/custom_field" -d '{"custom_field":{"label":"The Label","key":"the_key","content_type":"text","max_length":9999,"pattern":"[A-Za-z0-9]","should_validate_regex_via_api":false,"default_value":"The Default Value"}}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-u [email protected]:my_api_key \
-H "Host: example.org" \
-H "Cookie: "{
"status": "OK",
"custom_field": {
"list_id": 30,
"key": "the_key",
"pattern": "[A-Za-z0-9]",
"max_length": 9999,
"default_value": "The Default Value",
"can_insert": true,
"can_segment": true,
"created_at": "2023-11-22T08:14:19.000-08:00",
"updated_at": "2023-11-22T08:14:19.000-08:00",
"mask": null,
"label": "The Label",
"content_type": "text",
"should_validate_regex_via_api": false
}
}POST https://app.tatango.com/api/v2/lists/<ID>/custom_field
Tatango authenticates API requests by validating an API key passed via HTTP Basic Authentication. Use your login email as the username and your API key as the password.
ID of the list
Show child attributes
A human-readable label
The custom field key. Must only contain lower case characters, numbers and underscores
Allowed content types are: text, datetime and number
text, datetime, number The max length allowed for data in this custom field. Maximum value is 9999.
x <= 9999A validation regex for the content of the data in the custom field
Whether or not the pattern regex should be validated via the API
A default value for when none is provided. Must adhere to the pattern regex
Custom field created successfully
"OK"
Show child attributes
ID of the list this custom field belongs to
The unique identifier for the custom field
Regular expression pattern for validation
Maximum length allowed for the field value
Default value for the custom field
Whether this field can be used for data insertion
Whether this field can be used for segmentation
Timestamp when the custom field was created
Timestamp when the custom field was last updated
Display mask for the field
Display label for the custom field
Type of content allowed in the field
Whether to validate the regex pattern via API
Was this page helpful?