Skip to main content
POST
/
customfield
Create custom field
curl --request POST \
  --url https://api.sendx.io/api/v1/rest/customfield \
  --header 'Content-Type: application/json' \
  --header 'X-Team-ApiKey: <api-key>' \
  --data '{
  "name": "Account Type",
  "type": 123,
  "description": "Customer account classification"
}'
{
"name": "Account Type",
"type": 0,
"description": "Customer account classification"
}
🎯 Purpose: Custom fields extend the default contact schema with business-specific data:
  • Customer preferences and attributes
  • Behavioral tracking fields
  • Integration-specific identifiers
  • Segmentation criteria
📊 Field Types:
  • 0 - Text: Single-line text (max 255 chars)
  • 1 - Number: Integer or decimal values
  • 2 - Date: Date values (YYYY-MM-DD)
  • 3 - Boolean: True/false values
  • 4 - Phone number: International phone number format
💡 Use Cases:
  • Customer lifetime value (Number)
  • Subscription expiry date (Date)
  • Product preferences (Text)
  • Account type (Text)
  • Last purchase date (Date)
  • Loyalty points (Number)
🔄 Field Usage:
  • Set values during contact creation/update
  • Use in segmentation rules
  • Personalize email content with merge tags
  • Export in contact reports
⚡ Best Practices:
  • Use descriptive field names
  • Choose appropriate field types
  • Document field purposes
  • Limit total custom fields for performance

Authorizations

X-Team-ApiKey
string
header
required

Team API key for authentication. Find your API key in SendX Settings → Team API Key.

Example:

X-Team-ApiKey: your_team_api_key_here

Body

application/json
name
string
required

Custom field name (must be unique within team)

Example:

"Account Type"

type
integer
required

Field data type.

Values:

  • 0 - Text (max 255 characters)
  • 1 - Number (integer or decimal)
  • 2 - Date (YYYY-MM-DD format)
  • 3 - Boolean (true/false)
  • 4 - Phone number (international format)
description
string
required

Field description for documentation

Example:

"Customer account classification"

Response

✅ Custom field created successfully

id
string

Unique field identifier with custom_field_ prefix

Example:

"custom_field_abc123def456ghi789"

name
string

Custom field name

Example:

"Account Type"

type
integer

Field data type.

Values:

  • 0 - Text (max 255 characters)
  • 1 - Number (integer or decimal)
  • 2 - Date (YYYY-MM-DD format)
  • 3 - Boolean (true/false)
  • 4 - Phone number (international format)
description
string

Field description for documentation

Example:

"Customer account classification"

I