Create a new custom field to store additional contact attributes using the AutoSend API.
curl --request POST \
--url https://api.autosend.com/v1/custom-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fieldName": "company",
"fieldType": "string"
}'
{
"success": true,
"message": "Custom field created successfully",
"data": {
"id": "6960953e729f65f154369408",
"fieldName": "company",
"fieldType": "string",
"createdAt": "2026-01-09T05:42:22.171Z",
"updatedAt": "2026-01-09T05:42:22.171Z"
}
}
curl --request POST \
--url https://api.autosend.com/v1/custom-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fieldName": "company",
"fieldType": "string"
}'
{
"success": true,
"message": "Custom field created successfully",
"data": {
"id": "6960953e729f65f154369408",
"fieldName": "company",
"fieldType": "string",
"createdAt": "2026-01-09T05:42:22.171Z",
"updatedAt": "2026-01-09T05:42:22.171Z"
}
}
<token>, where <token> is your auth token.firstName, first_name, lastName, last_name, email, mobile, unsubscribed, unsubscribe, unsubscribe_groups, unsubscribe_preferences, userId, externalId, createdAt, updatedAt, contactLists, address, address_line_1, address_line_2, city, state, zip, country.string, number, boolean, date.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The programmatic name for the custom field. Must be unique within the project and must not be a reserved name.
"planTier"
The data type of the custom field.
string, number, date "string"
A human-readable description of the field's purpose.
"The user's subscription tier"
A fallback value used when a contact does not have an explicit value for this field.
"free"
curl --request POST \
--url https://api.autosend.com/v1/custom-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fieldName": "company",
"fieldType": "string"
}'
{
"success": true,
"message": "Custom field created successfully",
"data": {
"id": "6960953e729f65f154369408",
"fieldName": "company",
"fieldType": "string",
"createdAt": "2026-01-09T05:42:22.171Z",
"updatedAt": "2026-01-09T05:42:22.171Z"
}
}