POST /accounts/custom-field
Creates a new custom field for accounts. The field key is auto-generated from the label and cannot be set manually.
Key generation rule: Spaces are replaced with underscores, the result is uppercased, and _C is appended. Only spaces are transformed — all other characters pass through as-is.
| Label | Generated key |
|---|
Contract Value | CONTRACT_VALUE_C |
Net-Revenue | NET-REVENUE_C |
Revenue (USD) | REVENUE_(USD)_C |
curl -X POST "https://eapi.recotap.com/api/v1/accounts/custom-field" \
-H "X-Api-Key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"label": "Contract Value",
"labelType": "number",
"description": "Total contract value in USD"
}'
Request body
| Field | Type | Required | Description |
|---|
label | string | Yes | Display name — the key is auto-generated from this e.g. "Contract Value" |
labelType | string | Yes | One of: singleLineText, multiLineText, singleSelection, multiSelection, number, date |
description | string | No | Human-readable description e.g. "Annual contract value in USD". Stored as null if not provided. |
options | string[] | Conditional | Required (min 1 item) when labelType is singleSelection or multiSelection e.g. ["inbound", "outbound", "partner"] |
Response data
[
{
"key": "CONTRACT_VALUE_C",
"label": "Contract Value",
"labelType": "number",
"description": "Total contract value in USD",
"options": [],
"objectType": "accounts",
"status": "active"
}
]
If a field with the same generated key already exists and is active, the request returns 409 Conflict.