v2 API Reference
Accounts
Lists
Subscribers
Messaging
Message Log (MOMT) Reports
Transactional Messages
Custom Fields
Create a Custom Field
This endpoint creates a custom field.
Copy
Ask AI
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: "
Copy
Ask AI
{
"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
}
}
Request URL
Copy
Ask AI
POST https://app.tatango.com/api/v2/lists/<ID>/custom_field
Authorizations
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.
Path Parameters
ID of the list
Body
application/json
Response
200
application/json
Custom field created successfully
The response is of type object
.
Was this page helpful?
Copy
Ask AI
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: "
Copy
Ask AI
{
"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
}
}
Assistant
Responses are generated using AI and may contain mistakes.