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 emailaddress@mydomain.com: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 emailaddress@mydomain.com: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
Custom field created successfully
The response is of type object
.
Was this page helpful?