Skip to main content
POST
/
custom-fields
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",
    "projectId": "229f1f77bcf86cd9273048038",
    "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",
    "projectId": "229f1f77bcf86cd9273048038",
    "createdAt": "2026-01-09T05:42:22.171Z",
    "updatedAt": "2026-01-09T05:42:22.171Z"
  }
}

Authorizations

Authorizations
string | header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body Parameters

fieldName
string
required
The programmatic name for the custom field. Must be unique within the project. Cannot be one of the reserved names: 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.
fieldType
string
required
The data type of the custom field. Must be one of: string, number, boolean, date.
description
string
A human-readable description of what the field represents.
defaultValue
string
A fallback value used when a contact does not have an explicit value for this field.

Response

Custom field created successfully
success
boolean
Indicates whether the request was successful.
message
string
Confirmation message.Example: "Custom field created successfully"
data
object
The created custom field.