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",
    "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"
  }
}

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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
fieldName
string
required

The programmatic name for the custom field. Must be unique within the project and must not be a reserved name.

Example:

"planTier"

fieldType
enum<string>
required

The data type of the custom field.

Available options:
string,
number,
date
Example:

"string"

description
string

A human-readable description of the field's purpose.

Example:

"The user's subscription tier"

defaultValue
any

A fallback value used when a contact does not have an explicit value for this field.

Example:

"free"

Response

Custom field created successfully

success
boolean
Example:

true

message
string
Example:

"Custom field created successfully"

data
object